/* * Displays the wrapper form to the user. */ private static void DisplayWrapperForm() { // Focus the wrapper form or display it to the user if (Program.WrapperForm.Visible) { // Restore normal window state if form is minimized if (Program.WrapperForm.WindowState == FormWindowState.Minimized) { Program.WrapperForm.WindowState = FormWindowState.Normal; } // Activates the wrapper form and gives it focus Program.WrapperForm.Activate(); } else { // Prompt for initial team domain to load or shows the wrapper form if (Program.Settings.Data.InitialTeamToLoad.Equals(String.Empty)) { using (TeamPickerForm teamPickerForm = new TeamPickerForm()) { if (teamPickerForm.ShowDialog() == DialogResult.OK) { Program.Settings.Data.InitialTeamToLoad = teamPickerForm.SlackTeamDomain; Program.WrapperForm.Show(); } } } else { // Displays the wrapper form to the user and gives it focus Program.WrapperForm.Show(); Program.WrapperForm.Activate(); } } }
/* * Displays the wrapper form to the user. */ private static void DisplayWrapperForm() { // Focus the wrapper form or display it to the user if(Program.WrapperForm.Visible) { // Restore normal window state if form is minimized if(Program.WrapperForm.WindowState == FormWindowState.Minimized) { Program.WrapperForm.WindowState = FormWindowState.Normal; } // Activates the wrapper form and gives it focus Program.WrapperForm.Activate(); } else { // Prompt for initial team domain to load or shows the wrapper form if(!Program.IsInitialTeamInitialized) { using(TeamPickerForm teamPickerForm = new TeamPickerForm()) { if(teamPickerForm.ShowDialog() == DialogResult.OK) { // Store the initial team domain to load Program.Settings.Data.InitialTeamToLoad = teamPickerForm.SlackTeamDomain; // Load the active team site and show the wrapper form Program.WrapperForm.LoadActiveTeamSite(); Program.WrapperForm.Show(); } } } else { // Displays the wrapper form to the user and gives it focus Program.WrapperForm.Show(); Program.WrapperForm.Activate(); } } }