Gui!! Experts

10/28/2011 19:20 |xabi|#1
Welcome members

i made my server load From GUI Well, and i delete the Consol But There Were Some Commands that you can write it in Consol !! Work

When i made GUI The Commands OF Course Not Work!! there is a line in Program

which it

CommandsAI(consol.ReadLine());

when i write doesn't work so i need to convert it to my Gui

So What is The Solve
10/28/2011 21:03 Lateralus#2
"Console" is misspelled. I don't know what you're asking though, honestly.
10/28/2011 21:26 |xabi|#3
that when i write a word see it's command or not so consol.readline

this read the line which i wrote

so when i changed the system to GUI

so now no consol so all depend on GUI!!

now when i write a word in text box need to check it command or not!!

so !!did you understand me!!
10/28/2011 21:38 Lateralus#4
Yeah. Then you'd just... take the value in the textbox and pass it to the "check if command" method.
10/28/2011 21:40 |xabi|#5
man man if i write a @save and press enter need my GUI Save the server

i already made the command but my Gui in text box not read it
10/28/2011 21:47 Lateralus#6
Make an accessor to return the textbox value so that you can access it from a different class besides form if you need to and pass it to whatever your command method is named - in your example, CommandsAI.

I mean, that's literally it. I can't code it for you because I don't know how your stuff is laid out. Just do what I said.
10/28/2011 22:05 |xabi|#7
ok man U didn't understand me

any way thanks for contact with me i get idea

#request close
10/29/2011 02:04 _DreadNought_#8
Create a textbox and a button, On button click just do
Code:
CommandsAI(textbox1.Text);
simples.
10/29/2011 04:05 Spirited#9
You should really have it so the GUI has a menu. I think I covered that in my GUI tutorial (search my threads from my profile). If you have a menu, you can directly access commands. I think I did an example with an "Exit" command. Check it out.
10/29/2011 10:18 pro4never#10
Already covered in this thread... but if you want to write TO the gui... Do a multi line textbox with a simple accessor using something like WriteLine(string) where it removes entries from the end of the collection and adds to the start (if over a specified amount of lines obviously)


reading FROM console just do a little line for console command and a "execute' type button.

On button activation just pass the field.Text to your command handler and clear the text inside of it.

Simple stuff really.
10/29/2011 12:22 |xabi|#11
thanks of all you

#request close