Пример #1
0
 public static void InitBeforeBaseLoader()
 {
     if (!blinit)
     {
         form?.BringToFront();
         form?.replOutput?.AppendText("Loading...\n");
         System.Windows.Forms.Application.DoEvents();
     }
     blinit = true;
 }
Пример #2
0
 private void CreateUserControls()
 {
     // окно настроек
     settingsForm.Location = new Point(0, 0);
     this.Controls.Add(settingsForm);
     settingsForm.BringToFront();
     settingsForm.Visible         = false;
     settingsForm.VisibleChanged += UpdateSettings;
 }
Пример #3
0
 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;
     }
 }
Пример #4
0
        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();
        }
Пример #5
0
        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();
            }
        }
Пример #6
0
 /// <summary>
 /// Cancel the optimisation
 /// this method switches back to the OptimisationSettingsForm
 /// </summary>
 public void CancelOptimisationClick()
 {
     SettingsForm.BringToFront();
     CancelOptimisation(this, EventArgs.Empty);
 }
Пример #7
0
 public void CancelNoiseClick()
 {
     SettingsForm.BringToFront();
     CancelNoiseCalculation(this, EventArgs.Empty);
 }