Ejemplo n.º 1
0
        static void Main()
        {
#if (DEBUG)
            debug = true;
#endif

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LoginForm loginForm = new LoginForm();

            Application.Run(loginForm);
            if (loginForm.DialogResult == DialogResult.OK)
            {
                charList  = loginForm.charList;
                musicList = loginForm.musicList;
                eList     = loginForm.eviList;

                CharForm CharSelect = new CharForm();
                CharSelect.clientSocket = loginForm.clientSocket;
                //CharSelect.clientSocket = connection;
                CharSelect.charList = charList;

                Application.Run(CharSelect);
                if (CharSelect.DialogResult == DialogResult.OK)
                {
                    ClientForm AODXClientForm = new ClientForm();
                    AODXClientForm.clientSocket = CharSelect.clientSocket;
                    AODXClientForm.eviList      = eList;
                    AODXClientForm.songs        = musicList;
                    AODXClientForm.strName      = CharSelect.strName;
                    try
                    {
                        Application.Run(AODXClientForm);
                    }
                    catch (Exception ex)
                    {
                        if (debug)
                        {
                            MessageBox.Show(ex.Message + ".\r\n" + ex.StackTrace.ToString(), "AODXClient", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        static void Main()
        {
            #if (DEBUG)
            debug = true;
            #endif

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LoginForm loginForm = new LoginForm();

            Application.Run(loginForm);
            if (loginForm.DialogResult == DialogResult.OK)
            {
                charList = loginForm.charList;
                musicList = loginForm.musicList;
                eList = loginForm.eviList;

                CharForm CharSelect = new CharForm();
                CharSelect.clientSocket = loginForm.clientSocket;
                //CharSelect.clientSocket = connection;
                CharSelect.charList = charList;

                Application.Run(CharSelect);
                if (CharSelect.DialogResult == DialogResult.OK)
                {
                    ClientForm AODXClientForm = new ClientForm();
                    AODXClientForm.clientSocket = CharSelect.clientSocket;
                    AODXClientForm.eviList = eList;
                    AODXClientForm.songs = musicList;
                    AODXClientForm.strName = CharSelect.strName;
                    try
                    {
                        Application.Run(AODXClientForm);
                    }
                    catch (Exception ex)
                    {
                        if (debug)
                            MessageBox.Show(ex.Message + ".\r\n" + ex.StackTrace.ToString(), "AODXClient", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }