void OnHistoryDestroyed(object sender, EventArgs e) { historyWindow = null; logger.Debug("History Destroyed"); }
protected void OnButtonHistoryClicked(object sender, EventArgs e) { if(historyWindow == null) { historyWindow = new ChatHistory(); historyWindow.Destroyed += OnHistoryDestroyed; historyWindow.Show(); } else { historyWindow.Present(); } }