[Guide] Adding a GUI

11/01/2010 05:16 FuriousFang#16
Quote:
Originally Posted by SilentKill View Post
Guess that means i gota try to find out how to keep it in console and just be able to hide it then..
Change the "World.PrintLine"s to "Console.PrintLine", then go to the project settings and change it back to console. Change the main statement back and add the GUI start to the end of the main statement. Good luck! =]
11/01/2010 12:42 FrontBoy#17
damn man release this for beta co source please
11/01/2010 12:44 StefanHAKER#18
Quote:
Originally Posted by FrontBoy View Post
damn man release this for beta co source please
Hahahahaha, it is for all sources L0L
Anyway you are not enough qualifed to copy paste things..
Keep Using your console ;)
11/01/2010 19:08 BioHazarxPaul#19
Quote:
Originally Posted by StefanHAKER View Post
Hahahahaha, it is for all sources L0L
Anyway you are not enough qualifed to copy paste things..
Keep Using your console ;)
it really wasnt that hard to convert the only thing i had issues on and still seam to is gettin the text to go into the text box i seen some use the console.writeline and it goes into the gui text box ill look into that after class.. unless someone wants to tell me i know it has to do with the writeline void.

Quote:
Originally Posted by Korvacs View Post
I should point out GUI's are not the best option for running a server, their threading style is different which makes them significantly less efficient.

A better way to do this would be to have it use a console, but hide the console so that it cant be visible and then on a separate thread start your GUI, that way the GUI's threading doesnt mess up the rest of the server.

This isnt hard to achieve the open source project has a semi finished map viewing dialog which is loaded from the console with a command currently.
question korvacs I left the threading and everything the way it was i just changed the console to windows to hide the console is this the right way? and of course i did the change to writeline so it will display on gui
11/02/2010 00:08 Korvacs#20
No, by setting the project back to a windows forms application youve done the opposite of what i said, please use your initiative and google first next time:

The search i performed:

[Only registered and activated users can see links. Click Here To Register...]

The first link from that search:

[Only registered and activated users can see links. Click Here To Register...]
11/02/2010 00:18 BioHazarxPaul#21
Quote:
Originally Posted by Korvacs View Post
No, by setting the project back to a windows forms application youve done the opposite of what i said, please use your initiative and google first next time:

The search i performed:

[Only registered and activated users can see links. Click Here To Register...]

The first link from that search:

[Only registered and activated users can see links. Click Here To Register...]
alright sorry I was reading that one 2 I just figure it would work changing it to forms i dunno what i was thinking sorry. :(

"thanks i got it working."
11/02/2010 01:04 Scarecrоw#22
Quote:
Originally Posted by SilentKill View Post
alright sorry I was reading that one 2 I just figure it would work changing it to forms i dunno what i was thinking sorry. :(

"thanks i got it working."
Don't be sorry Napoloeon Dynamite.
11/09/2010 06:06 Arcо#23
Code:
public static void StartServer()
        {
            try
            {
                try
                {
                    // Put your code from the main statement in Program.cs here
                }
                catch (Exception e) { World.WriteLine(e.ToString()); }
            }
            catch (Exception EXC)
            {
                World.WriteLine(EXC);
            }
        }
Lolwtf
11/09/2010 09:04 FuriousFang#24
Quote:
Originally Posted by WTFIDKBBQ View Post
Code:
public static void StartServer()
        {
            try
            {
                try
                {
                    // Put your code from the main statement in Program.cs here
                }
                catch (Exception e) { World.WriteLine(e.ToString()); }
            }
            catch (Exception EXC)
            {
                World.WriteLine(EXC);
            }
        }
Lolwtf
My original code is split in half so it configures and loads the database, then starts the server threads. That's why there are two.

Code:
public static void StartServer()
        {
            try
            {
                try
                {
                    // Where the config file is read and maps start to load
                }
                catch (Exception e) { World.WriteLine(e.ToString()); }
                // server is loaded
            }
            catch (Exception EXC)
            {
                World.WriteLine(EXC);
            }
        }
I've gotten better since this source. This was just one of my less organized ones.
07/07/2011 08:32 S/W#25
Any one can repast his guide??