[Guide] How to Create a Graphic User Interface (GUI)

11/20/2011 00:50 BaussHacker#76
Quote:
Originally Posted by PretendTime View Post
Thanks for the advice i didn't even notice that



What is this "braifnfuck compiler"?
Or I meant IDE.

[Only registered and activated users can see links. Click Here To Register...]
11/20/2011 18:09 PretendTime#77
Quote:
Originally Posted by BaussHacker View Post
Or I meant IDE.
I don't know what that's for or why but i changed the color black cause in Fangs guide he said if i don't like the normal color i could change it if i wanted so i did
11/20/2011 18:14 BaussHacker#78
Brainfuck is a programming language lmao.
11/20/2011 18:16 PretendTime#79
Quote:
Originally Posted by BaussHacker View Post
Brainfuck is a programming language lmao.
Oh i didn't know so sorry
11/20/2011 19:29 BaussHacker#80
Quote:
Originally Posted by PretendTime View Post
Oh i didn't know so sorry
Why do you say sorry? You did nothing wrong ;o
11/21/2011 04:18 PretendTime#81
Quote:
Originally Posted by BaussHacker View Post
Why do you say sorry? You did nothing wrong ;o
I felt stupid =[

And to Fang i was curious if there a way to add a register page via the gui without out having it load the website? Not sure if i made sense or not
11/21/2011 06:57 Spirited#82
Quote:
Originally Posted by PretendTime View Post
I felt stupid =[

And to Fang i was curious if there a way to add a register page via the gui without out having it load the website? Not sure if i made sense or not
It's not a good idea.
That would take the register page and make it so anyone can change the database. You want the register page to be on the same server of the account database OR have it so it's a secret. Anyone can reverse-compile C# to read it.
11/21/2011 22:17 PretendTime#83
Quote:
Originally Posted by Fаng View Post
It's not a good idea.
That would take the register page and make it so anyone can change the database. You want the register page to be on the same server of the account database OR have it so it's a secret. Anyone can reverse-compile C# to read it.
So doing this is out of the question?

[Only registered and activated users can see links. Click Here To Register...]
11/22/2011 01:29 Spirited#84
Quote:
Originally Posted by PretendTime View Post
So doing this is out of the question?

[Only registered and activated users can see links. Click Here To Register...]
No, just make the register box a browser and have it connect to the website. DO NOT give them control of that... as I said.
11/22/2011 02:46 PretendTime#85
Quote:
Originally Posted by Fаng View Post
No, just make the register box a browser and have it connect to the website. DO NOT give them control of that... as I said.
Okay man will do that now and toy with it thanks for answering all my question =D
11/23/2011 12:18 abdeen#86
i followed your guide and it was helpful , after i done with it i created a GUI with a button to start server , when i click it , server is starts so laggy , and its makes my pc so laggy too , so i edited it to make it start server when i run the program , and same issue , working but so laggy .

any idea how to solve this ?
11/23/2011 18:46 Spirited#87
Quote:
Originally Posted by abdeen View Post
i followed your guide and it was helpful , after i done my with it i created a GUI with a button to start server , when i click it , server is starts so laggy , and its makes my pc so laggy too , so i edited it to make it start server when i run the program , and same issue , working but so laggy .

any idea how to solve this ?
Don't have a gui then.
11/23/2011 19:14 abdeen#88
Quote:
Originally Posted by Fаng View Post
Don't have a gui then.
lol , are you joking ? or you are serious ?

here is the code to start the server

PHP Code:
        private void Start_Click(object senderEventArgs e)
        {
            const 
string message =
                
"Are you sure that you would like to Start the form?";
            const 
string caption "Form Starting";
            var 
result MessageBox.Show(messagecaption,
                                         
MessageBoxButtons.YesNo,
                                         
MessageBoxIcon.Question);
            if (
result == DialogResult.No)
            {
                return;
            }
            else
            {
                
Application.EnableVisualStyles();
                
Program.StartEngine();
            }
        } 
11/23/2011 23:00 BaussHacker#89
My GUI code.
Code:
    public partial class Cmd : Form
    {
        public Cmd()
        {
            InitializeComponent();

            CheckForIllegalCrossThreadCalls = false;
        }


        public void Write(string Out)
        {
            textBox1.AppendText(Out + Environment.NewLine);
        }
        public ErrorHandler ErrorHandler;

        private void Cmd_Load(object sender, EventArgs e)
        {
            Server.Open();
        }

        private void closeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Server.Close();
            Environment.Exit(0);
        }

        private void restartToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Server.Close();
            Process.Start(Process.GetCurrentProcess().MainModule.FileName.Replace(".vhost", ""));
            Environment.Exit(0);
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }
    }
Code:
public class Console
    {
        public static GUI.Cmd Cmd;

        /// <summary>
        /// Get's or set's the title of the cmd window.
        /// </summary>
        public static string Title
        {
            get { return Cmd.Text; }
            set
            {
                Cmd.Text = value;
            }
        }

        /// <summary>
        /// Writing one line to the cmd window.
        /// </summary>
        /// <param name="Out"></param>
        public static void WriteLine(string Out)
        {
            Cmd.Write(Out);
        }
    }
Code:
[STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Console.Cmd = new GUI.Cmd();
            Application.Run(Console.Cmd);
        }
Obviously simple, but working. Not after getting an advanced GUI, just wanted fullscreen cmd and a menu.
11/24/2011 00:30 Spirited#90
I'm dead serious. If you have to ever question yourself on if I'm joking or not, then I'm not joking. Just don't have a gui. There's nothing wrong with not having a gui.