public static void InitBeforeBaseLoader() { if (!blinit) { form?.BringToFront(); form?.replOutput?.AppendText("Loading...\n"); System.Windows.Forms.Application.DoEvents(); } blinit = true; }
private void CreateUserControls() { // окно настроек settingsForm.Location = new Point(0, 0); this.Controls.Add(settingsForm); settingsForm.BringToFront(); settingsForm.Visible = false; settingsForm.VisibleChanged += UpdateSettings; }
public static void SetVisible(bool visible) { //if form is already visible - bring to front if (form.Visible == true && visible == true) { form.BringToFront(); } else { form.Visible = visible; } }
protected void OptimisationForm_Load(object sender, EventArgs e) { base.MDIContainerForm_Load(); SettingsForm.MdiParent = this; SettingsForm.Show(); RunForm.MdiParent = this; RunForm.Show(); CompletedForm.MdiParent = this; CompletedForm.Show(); SettingsForm.BringToFront(); }
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(); } }
/// <summary> /// Cancel the optimisation /// this method switches back to the OptimisationSettingsForm /// </summary> public void CancelOptimisationClick() { SettingsForm.BringToFront(); CancelOptimisation(this, EventArgs.Empty); }
public void CancelNoiseClick() { SettingsForm.BringToFront(); CancelNoiseCalculation(this, EventArgs.Empty); }