Example #1
0
 protected override void OnHotKeyPress()
 {
     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();
     }
 }
Example #2
0
        public ChatViewModel(int gamenum, KailleraWindowController mgr, Game game = null)
        {
            wind         = new ChatWindow();
            gameNumber   = gamenum;
            wind.Userup += UpdateUsers;
            updater     += wind.WindowUpdate;
            wind.listBox1.ItemsSource = DisplayUsers;
            wind.addBuddyList        += addBuddy;

            wind.Logger = ChatLogger.getLog(game);

            //Set small line height to avoid large line breaks
            Paragraph p = wind.richTextBox1.Document.Blocks.FirstBlock as Paragraph;

            p.LineHeight           = 1;
            wind.textBox1.KeyDown += Chat_sendMessageIfEnter;

            wind.Closed += (object sender, EventArgs e) => winClosed(sender, e);

            wind.gameNumber = gamenum;

            //If this is a game chat, we want to leave the game upon window close
            if (gamenum != 0)
            {
                wind.Closed += beginLeaveGame;
                wind.Title   = game.name;
            }
            wind.Show();

            //Make this the active window in the tray manager
            KailleraTrayManager.Instance.addActiveWindow(wind);
        }
Example #3
0
        public ChatViewModel(int gamenum, KailleraWindowController mgr, Game game = null)
        {
            wind = new ChatWindow();
            gameNumber = gamenum;
            wind.Userup += UpdateUsers;
            updater += wind.WindowUpdate;            
            wind.listBox1.ItemsSource = DisplayUsers;
            wind.addBuddyList += addBuddy;

            wind.Logger = ChatLogger.getLog(game);

            //Set small line height to avoid large line breaks
            Paragraph p = wind.richTextBox1.Document.Blocks.FirstBlock as Paragraph;
            p.LineHeight = 1;
            wind.textBox1.KeyDown += Chat_sendMessageIfEnter;

            wind.Closed += (object sender, EventArgs e) => winClosed(sender, e);

            wind.gameNumber = gamenum;

            //If this is a game chat, we want to leave the game upon window close
            if (gamenum != 0)
            {
                wind.Closed += beginLeaveGame;
                wind.Title = game.name;
            }
            wind.Show();

            //Make this the active window in the tray manager
            KailleraTrayManager.Instance.addActiveWindow(wind);
        }
Example #4
0
 protected override void OnHotKeyPress()
 {
     KailleraWindowController.getMgr().toggleMinimize();
 }
Example #5
0
 protected override void OnHotKeyPress()
 {
     KailleraWindowController.getMgr().showServerChatWindow();
 }