예제 #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;
 }