Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (PeroPero, 1 invisible), 858 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 23 1 2 3 22 23
C# wrapper 2.0 - RELEASE #344240
10/15/10 13:49
10/15/10 13:49
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
I'm proud to finally release an updated version of the C# wrapper for Acknex.

this version features, compared to the old c# wrapper, the following features (thanks to the many suggestions in the C# wrapper - REALESE thread) :

- no more var variables, only doubles or int
- no more NativeSTRING only normal string
- functions and variables are now commented
- works without unsafe code (no more allowing of unsafe code)
- a more object oriented approach
etc...


download the wrapper

or visit the homepage for some tutorials and how to use the wrapper !


P.S.:
oh and if anyone got more suggestions or notices any bugs, don't hesitate to post them here !

Last edited by Stromausfall; 10/16/10 21:19.

get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper 2.0 - RELEASE [Re: Stromausfall] #344241
10/15/10 13:56
10/15/10 13:56
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Wow! great work! got it!

Thank's.

Re: C# wrapper 2.0.1 - RELEASE [Re: 3dgs_snake] #344266
10/15/10 17:55
10/15/10 17:55
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
a new version of the wrapper, some flags and some documentary was missing...


download the wrapper 2.0.1

Last edited by Stromausfall; 10/15/10 17:56.

get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper 2.0.1 - RELEASE [Re: Stromausfall] #344361
10/16/10 19:51
10/16/10 19:51
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Very nice update laugh thanks!


Click and join the 3dgs irc community!
Room: #3dgs
Re: C# wrapper 2.0.2 - RELEASE [Re: Joozey] #344369
10/16/10 21:13
10/16/10 21:13
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
and again a new version ^^
fixed a bug where assigning EngineObjects to some EngineVar variables didn't work

here's the new version : wrapper 2.0.2

Last edited by Stromausfall; 10/16/10 22:01.

get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper 2.0.1 - RELEASE [Re: Stromausfall] #344375
10/16/10 22:21
10/16/10 22:21
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
cool!
some very nice changes!
best thing is that you use double instead of the old Var!
It's easier than before and much clearer!
Thanks!


Visit my site: www.masterq32.de
Re: C# wrapper 2.0.1 - RELEASE [Re: MasterQ32] #344382
10/16/10 22:37
10/16/10 22:37
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
sounds great! but i don't have time to look into it at the moment. you could post some code examples. laugh

Re: C# wrapper 2.0.1 - RELEASE [Re: ventilator] #344384
10/16/10 22:51
10/16/10 22:51
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
@ventilator, here's an example from the homepage..
the lambda usage still seams a bit awkward but without a doubt much better than the var solution (thanks again ^^)

Code:
using System;
using System.Collections;
using AcknexWrapper;

namespace panelExampleTwo
{
    class Program
    {
        private static PANEL testPanel = null;
        private static FONT testFont = null;
        private static BMAP background = null;
        private static BMAP knob = null;

        //the main method, called by the scheduler
        private static IEnumerable myMainMethod()
        {
            double dummyVariable = 0;

            //create an empty panel
            testPanel = PANEL.pan_create(null, 0);
            //make the panel visible
            testPanel.SHOW = true;

            //create a font
            testFont = FONT.font_create("Arial#40");

            //display the dummyVariable
            testPanel.pan_setdigits(
                0,
                200,
                400,
                "dummyVariable = %2.f",
                testFont,
                1,
                () => dummyVariable);

            //create a background
            background =
                BMAP.bmap_createblack(200, 50, 128);

            //create a knob
            knob =
                BMAP.bmap_createblack(25, 25, 32);

            //make the knob white
            knob.bmap_fill(
                new Color(255, 255, 255), 100);

            dummyVariable = 75;

            //create a slider which sets the dummyVariable
            testPanel.pan_setslider(
                0,
                50,
                50,
                background,
                knob,
                0,
                100,
                (double x) => dummyVariable = x,
                null);

            //activate mouse
            EngVar.mouse_mode = 4;

            yield return 1;
        }

        static void Main(string[] args)
        {
            //open the engine
            EngFun.engine_open(null, null);

            //create/load an empty level
            EngFun.level_load(null);

            //start the scheduler
            Scheduler.StartScheduler(myMainMethod);
        }
    }
}



Last edited by Stromausfall; 10/16/10 22:53.

get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper 2.0.1 - RELEASE [Re: Stromausfall] #344436
10/17/10 12:10
10/17/10 12:10
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
nice, that's a huge improvement! laugh

what i still would change is this:

testPanel = PANEL.pan_create(null, 0);
testPanel = new Panel(null, 0);

but that's a rather small thing...

edit:
and for the method names i would leave away the prefixes like pan_.

Re: C# wrapper 2.0.1 - RELEASE [Re: ventilator] #344455
10/17/10 15:55
10/17/10 15:55
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
@ventilator
at first i also used constructors, but then i thought about, what happens if the creation of a engine object doesn't work - for example wrong path for a sound (which doesn't throw an error afaik) - the user wouldn't know and a c# object would still be created... and the other option would be to throw exceptions, but that's too much imho...
but i guess the difference is minimal and constructors might be better after all

i didn't think about leaving away the prefixes, it would look cleaner, but also a bit harder to trace back the class method to the acknex function for the user imho!


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Page 1 of 23 1 2 3 22 23

Moderated by  TWO 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1