SFML community forums

Bindings - other languages => DotNet => Topic started by: AF2013 on March 06, 2014, 11:27:35 pm

Title: C# Documents and Tutorials SFML?
Post by: AF2013 on March 06, 2014, 11:27:35 pm
Hello Everyone,

I just download Visual Studio 2012 then SFML and to my surprise, I dont have messed about putting include files and Lib files folder like VS 2010 !! I just create a Project and I saw SFML then It installed and everythings done for me!

I am very happy when I just click run button to see what it does and it render Window with background Colours!

Now I want to know where I can learn C# SFML Documents and tutorials to help me speed up my programming :)

cheers

P.S. I hope I put in the right post in here as I need know where the C# SFML Documents and tutorials is :)
Title: Re: C# Documents and Tutorials SFML?
Post by: Nexus on March 07, 2014, 10:51:28 am
You can generate the documentation yourself (maybe it's also included in the SDK), and for tutorials I would consult the C++ version.
Title: Re: C# Documents and Tutorials SFML?
Post by: AF2013 on March 07, 2014, 11:00:57 am
That is shame because C# is easier than C++ as you can tell the different in coding wise!
Title: Re: C# Documents and Tutorials SFML?
Post by: Nexus on March 07, 2014, 11:14:09 am
Where is the problem? The differences in the SFML tutorials will be small and mostly syntactical (apart from the missing modules in SFML.NET).
Title: Re: C# Documents and Tutorials SFML?
Post by: AF2013 on March 07, 2014, 04:22:46 pm
Can you please give me example of source example display image on screen for C# SMFL because for simple reason, I try to do in C# even thought there is lack of Documents for C# SMFL ! I dont want to learn C++ SMFL because I prefer C# better!

cheers
Title: Re: C# Documents and Tutorials SFML?
Post by: chilliboy999 on March 07, 2014, 05:26:15 pm
Here you go ;)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SFML;
using SFML.Graphics;

namespace SFML.Net_Test
{
    class Program
    {
        static void Main()
        {
            RenderWindow window = new RenderWindow(new Window.VideoMode(200,200), "test");
            CircleShape cs = new CircleShape(100.0f);
            cs.FillColor = Color.Green;
            window.SetActive();
            while (win.IsOpen())
            {
                window.Clear();
                window.DispatchEvents();
                window.Draw(cs);
                window.Display();
            }
        }
    }
}
Title: Re: C# Documents and Tutorials SFML?
Post by: codicil793 on April 06, 2014, 03:10:34 am
If I may ask, how exactly did you get the C# bindings to work without crashing?

I downloaded the bindings for dotnet, used VS2013, and added the libraries, but it crashes if I make any call or reference to RenderWindow.
Title: Re: C# Documents and Tutorials SFML?
Post by: StormWingDelta on April 06, 2014, 03:19:16 am
I had to add them directly to the project as normal files than changed the files' setting of Copy to Output Directory to Copy Always.  If there is another way I'd love to hear it myself.
Title: Re: C# Documents and Tutorials SFML?
Post by: delio on April 06, 2014, 07:54:29 am
try tutorial : http://instilledbee.wordpress.com/2013/05/12/setting-up-sfml-net-2-0-to-work-with-visual-studio-2012-c-projects/