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();
     }
 }
Esempio n. 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();
            }
        }
Esempio n. 3
0
        public void Execute(object parameter)
        {
            var k = KailleraWindowController.getMgr();

            k.showCurrGameWindow();
        }
Esempio n. 4
0
 public void Execute(object parameter)
 {
     KailleraWindowController.getMgr().exitGame();
 }
Esempio n. 5
0
 public void Execute(object parameter)
 {
     KailleraWindowController.getMgr().showUsersWindow();
 }
 private KailleraWindowController()
 {
     instance = this;
 }
Esempio n. 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();
        }
Esempio n. 9
0
 private KailleraWindowController()
 {
     instance = this;
 }