[Release] Adding form to load (LOTF)

04/02/2009 23:38 justprownage#1
I bet most of you already know how to do this, but this is just for the people that don't know how to make the form open up.

First, open LOTF.

Then right-click on COServerProject in the Solution Explorer.

Click Add > Windows Form...
Then Form1.cs should be in the Solution Explorer.

Now go to View > Toolbox and you can start adding buttons and stuff.

Now to make the form load with the console, you go to General.cs

Above Console.ReadLine(); , add this code:
Code:
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
Note: if you rename Form1.cs to something else, Make Application.Run(new YourFormName());

#Edit
If you get The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
You need to add a reference by right-clicking on COServerProject > Add Reference > System.Core in the .NET tab.


Now the form will load and you make a control panel with the Toolbox provided on the side.

Look at my signature and you'll see how mine looks like. It looks kinda basic, but I'm accustomed to it.
04/02/2009 23:41 PeTe Ninja#2
also if it says sometime about using ______ in the form go to your pserver place and right click add SYSTEM.CORE =]] justprownage explains it better than me :D
04/02/2009 23:52 justprownage#3
Quote:
Originally Posted by PeTe Ninja View Post
also if it says sometime about using ______ in the form go to your pserver place and right click add SYSTEM.CORE =]] justprownage explains it better than me :D
Thanks for reminding me ;D
04/03/2009 00:18 kinshi88#4
Code:
Form2 form = new Form2();
form.ShowDialog();
Yes?
04/03/2009 01:52 PeTe Ninja#5
Quote:
Originally Posted by kinshi88 View Post
Code:
Form2 form = new Form2();
form.ShowDialog();
Yes?
what you trying to do? maybe your right i dont know, for mine i just made it do these things...

- new account creation ( if was already in there WILL NOT REPLACE ) (if made it will say created )

- change rates ( view rates also )
- open database (localhost/phpmyadmin)
- shutdown/restart server
- send message ingame
- delete all accounts and characters
- save all ( including last save time ) ( if shutdown server lastsave time didnt show )
- i was going to make a server restart timer.. but i didnt know how before and now i just thought of how i could do it lol xD

i deleted this source and the control panel >< it was awesome...

but yeah :D

still dont know what you trying to do kinshi so please say :D
04/03/2009 02:13 kinshi88#6
Makes the form show.
04/03/2009 02:15 PeTe Ninja#7
oh xD.. dont know but what justprownage did worked for me :D
04/03/2009 04:01 kinshi88#8
Yeah, what he did works too.

Mines better tho =P
04/03/2009 05:44 PeTe Ninja#9
justprownage did you get account creation to work? if you didnt i can tell you how i figured it out :D
04/03/2009 13:20 tao4229#10
Quote:
Originally Posted by kinshi88 View Post
Yeah, what he did works too.

Mines better tho =P
Not really, it's the same thing.
04/03/2009 15:34 kinshi88#11
Quote:
Originally Posted by tao4229 View Post
Not really, it's the same thing.
I know, that's why I put the =P
<3<3
04/03/2009 15:50 PeTe Ninja#12
Quote:
Originally Posted by kinshi88 View Post
I know, that's why I put the =P
<3<3
woah i just noticed congratulations on becoming a moderator =]
04/04/2009 00:39 justprownage#13
Quote:
Originally Posted by PeTe Ninja View Post
justprownage did you get account creation to work? if you didnt i can tell you how i figured it out :D
Gotten it to work 3 weeks ago..
04/04/2009 01:32 PeTe Ninja#14
Quote:
Originally Posted by justprownage View Post
Gotten it to work 3 weeks ago..
nice i dont know when i got it but i dont have mine any more it was so awesome i wish you could of seen it , anyway

does yours replace the files or how did you make it work

i got mine to work by working with TheCoServer account creator from the first lotf source ( tanels & hadesets )
04/04/2009 01:42 justprownage#15
Quote:
Originally Posted by PeTe Ninja View Post
nice i dont know when i got it but i dont have mine any more it was so awesome i wish you could of seen it , anyway

does yours replace the files or how did you make it work

i got mine to work by working with TheCoServer account creator from the first lotf source ( tanels & hadesets )
Well, mine is in ini's so It was much easier. ;-D