예제 #1
0
 public void Run()
 {
     Login();
     CreateForm();
     ProcessServerResponse();
     Packets.PublicKeys PK = new Packets.PublicKeys(m_PublicKey);
     m_CachedUpdate = new Packets.GameUpdate(0, 0, 0, null);
     Send(PK);
     m_ProcessServerResponse    = new Thread(() => SetTimer(this));
     m_ProcessUDPServerResponse = new Thread(() => UdpProcessServerResponse());
     m_ManageGameUpdate         = new Thread(() => SetGameUpdate(this));
     m_ProcessServerResponse.Start();
     m_ProcessUDPServerResponse.Start();
     m_ClientForm.ShowDialog();
     Close();
 }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            LoginForm loginForm = new LoginForm();

            Application.Run(loginForm);
            if (loginForm.DialogResult == DialogResult.OK)
            {
                UserForm clientForm = new UserForm();
                clientForm.clientSocket = loginForm.clientSocket;
                clientForm.userName     = loginForm.userName;
                clientForm.server       = loginForm.epServer;

                clientForm.ShowDialog();
            }
        }