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(); } }
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); }
protected override void OnHotKeyPress() { KailleraWindowController.getMgr().toggleMinimize(); }
protected override void OnHotKeyPress() { KailleraWindowController.getMgr().showServerChatWindow(); }