static void CloseScreen()
 {
     if (master != null)
     {
         if (master.InvokeRequired)
         {
             MethodInvoker InvalidateMe = delegate
             {
                 master.Close();
             };
             try
             {
                 master.Invoke(InvalidateMe);
             }
             catch
             {
             }
         }
         else
         {
             master.Close();
             master = null;
         }
     }
 }
 public static void ShowWindow()
 {
     if (!Calibrating && master == null)
     {
         master = new CalibrationScreen {Owner = Earth3d.MainWindow};
         master.Show();
     }
 }
 public static void ShowWindow()
 {
     if (!Calibrating && master == null)
     {
         master       = new CalibrationScreen();
         master.Owner = Earth3d.MainWindow;
         master.Show();
     }
 }
 private void CalibrationScreen_FormClosed(object sender, FormClosedEventArgs e)
 {
     master = null;
     // Earth3d.ReadyToRender = true;
     Calibrating = false;
 }
 private void CalibrationScreen_FormClosed(object sender, FormClosedEventArgs e)
 {
     master = null;
        // Earth3d.ReadyToRender = true;
     Calibrating = false;
 }
        static void CloseScreen()
        {
            if (master != null)
            {

                if (master.InvokeRequired)
                {
                    MethodInvoker InvalidateMe = delegate
                    {
                        master.Close();
                    };
                    try
                    {
                        master.Invoke(InvalidateMe);
                    }
                    catch
                    {
                    }
                }
                else
                {
                    master.Close();
                    master = null;
                }
            }
        }
 private void CalibrationScreen_FormClosed(object sender, FormClosedEventArgs e)
 {
     master = null;
     Calibrating = false;
 }