protected override void OnShown(EventArgs e) { base.OnShown(e); RebindProfiles(); if (!JinxBotConfiguration.ConfigurationFileExists) { FirstRunWizard wizard = new FirstRunWizard(); wizard.ShowDialog(this); } if (JinxBotConfiguration.Instance.Profiles.Length == 0) { CreateProfileWizard cpw = new CreateProfileWizard(); cpw.ShowDialog(this); } ThumbnailPreviewManager.Initialize(this); if (m_programArgs != null && m_programArgs.Length > 0) { (this as IJumpListWindowTarget).HandleJumpListCall(m_programArgs); m_programArgs = null; } }
private void LoadOrDisplayProfile(ClientProfile cp) { if (cp != null) { if (m_activeClients.ContainsKey(cp)) { m_activeClients[cp].ProfileDocument.Show(); } else { try { JinxBotClient client = new JinxBotClient(cp); client.Client.Connected += client_Connected; client.Client.Disconnected += client_Disconnected; m_activeClients.Add(cp, client); client.ProfileDocument.Show(this.dock); ThumbnailPreviewManager.AddThumbnail(client.ProfileDocument); } catch (BattleNetSettingsErrorsException ex) { ProfileLoadErrorDialog dlg = new ProfileLoadErrorDialog(ex); dlg.ShowDialog(); } } } }
private void displayErrorLogToolStripMenuItem_Click(object sender, EventArgs e) { if (displayErrorLogToolStripMenuItem.Checked) { GlobalErrorHandler.ErrorLog.Hide(); displayErrorLogToolStripMenuItem.Checked = false; ThumbnailPreviewManager.RemoveThumbnail(GlobalErrorHandler.ErrorLog); } else { GlobalErrorHandler.ErrorLog.Show(this.dock); displayErrorLogToolStripMenuItem.Checked = true; ThumbnailPreviewManager.AddThumbnail(GlobalErrorHandler.ErrorLog); } }