Пример #1
0
 public void Execute(object parameter)
 {
     if (MessageBox.Show("Disconnect and close Application?  Note that you can continue running Kaillera in your system tray.", "Disconnect?", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
     {
         KailleraWindowController.getMgr().shutDown();
     }
 }
Пример #2
0
        public void Start(Object o)
        {
            connectionClosed += EndConnection;
            WindowMngr        = o as KailleraNET.KailleraWindowController;
            if (initConnection())
            {
                //Send Logon
                messager = new UDPMessenger(ip);
                messager.AddMessages(new UserLogonInstruction(username + "\0", 1));
                messager.SendMessages(client);
                //Begin recieving and processing loop
                alive = new Thread(KeepAlive);
                //alive.Start(ip);

                /*     System.Timers.Timer KeepAliveTimer = new System.Timers.Timer();
                 *   KeepAliveTimer.Elapsed += new System.Timers.ElapsedEventHandler(KeepAliveSameThread);
                 *   KeepAliveTimer.Interval = 60000;
                 *   KeepAliveTimer.AutoReset = true;
                 *   KeepAliveTimer.Enabled = true;
                 */
                alive.Start(ip);
                Recieve();
            }
            else //If we didn't connect successfully, return to the main window
            {
                KailleraWindowController.getMgr().connectionFailed();
            }
        }
Пример #3
0
        public void Execute(object parameter)
        {
            var k = KailleraWindowController.getMgr();

            k.showCurrGameWindow();
        }
Пример #4
0
 public void Execute(object parameter)
 {
     KailleraWindowController.getMgr().exitGame();
 }
Пример #5
0
 public void Execute(object parameter)
 {
     KailleraWindowController.getMgr().showUsersWindow();
 }
 private KailleraWindowController()
 {
     instance = this;
 }
Пример #7
0
        public void Start(Object o)
        {
            connectionClosed += EndConnection;
            WindowMngr = o as KailleraNET.KailleraWindowController;
            if (initConnection())
            {
                //Send Logon
                messager = new UDPMessenger(ip);
                messager.AddMessages(new UserLogonInstruction(username + "\0", 1));
                messager.SendMessages(client);
                //Begin recieving and processing loop
                alive = new Thread(KeepAlive);
                //alive.Start(ip);
                /*     System.Timers.Timer KeepAliveTimer = new System.Timers.Timer();
                     KeepAliveTimer.Elapsed += new System.Timers.ElapsedEventHandler(KeepAliveSameThread);
                     KeepAliveTimer.Interval = 60000;
                     KeepAliveTimer.AutoReset = true;
                     KeepAliveTimer.Enabled = true;
                 */
                alive.Start(ip);
                Recieve();
            }
            else //If we didn't connect successfully, return to the main window
            {
                KailleraWindowController.getMgr().connectionFailed();
            }

            
        }
        public void Execute(object parameter)
        {
            var k = KailleraWindowController.getMgr();

            k.showServerChatWindow();
        }
Пример #9
0
 private KailleraWindowController()
 {
     instance = this;
 }