private void GoBackToStartupFormButton_Click(object sender, EventArgs e) { void OpenStartupForm() { this.Hide(); var startupForm = new StartupForm(); startupForm.Closed += (s, args) => this.Close(); startupForm.Show(); } bool anyChangesMade = CheckIfAnyChangesMade(); if (anyChangesMade) { CommonFormService.ShowConfirmAction( "Grįžti atgal", "Ar tikrai norite grįžti į pradžios formą ? (neišaugoti pakeitimai bus atšaukti)", OpenStartupForm); } else { OpenStartupForm(); } }
private void StartDifferentTestButton_Click(object sender, EventArgs e) { this.Hide(); var startupForm = new StartupForm(); startupForm.Closed += (s, args) => this.Close(); startupForm.Show(); }
private void GetBackToStartupForm() { this.Hide(); var startupForm = new StartupForm(); startupForm.Closed += (s, args) => this.Close(); startupForm.Show(); }
private void menuItemGoBack_Click(object sender, EventArgs e) { Form activeChild = this.ActiveMdiChild; if (activeChild == SettingsForm) { StartupForm.Show(); this.Hide(); } else if (activeChild == RunForm && RunForm.lblPercentage.Text.Contains("noise")) { CancelNoiseClick(); } else if (activeChild == RunForm && RunForm.lblPercentage.Text.Contains("preparing")) { CancelPreparation(); } else if (activeChild == AnimatorForm) { SettingsForm.BringToFront(); } else if (activeChild == GoogleEarthForm) { try { GoogleEarthForm.Dispose(); } catch (Exception ex) { } GoogleEarthForm = new GoogleEarthForm(); GoogleEarthForm.MdiParent = this; GoogleEarthForm.Show(); this.WindowState = FormWindowState.Normal; AnimatorForm.BringToFront(); } }