Beispiel #1
0
        private void PreparingServerIsUpdatingSandBox(StrongString releaseDate)
        {
            UpdatingServerSandBox mySandBox = new UpdatingServerSandBox(this, ref releaseDate);

            this.IsShowingSandBox = true;
            this.ShowingSandBox   = mySandBox;
            mySandBox.Show();
            mySandBox.Location = new Point((this.Width / 2) - (mySandBox.Width / 2),
                                           (this.Height / 2) - (mySandBox.Height / 2));
            mySandBox.ClosedForRetry = false;
            //-----------------------------------------------
            mySandBox.FormClosed           += MyTest_FormClosed;
            mySandBox.ButtonControl1.Click += ButtonControl1_Click;
            mySandBox.ButtonControl2.Click += ButtonControl2_Click;
            //------------------------------------------------
        }
Beispiel #2
0
 private void MyTest_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (sender is NoInternetConnectionSandBox)
     {
         NoInternetConnectionSandBox Father = (NoInternetConnectionSandBox)sender;
         if (Father.ClosedForRetry)
         {
         }
         else
         {
             Close();
         }
     }
     else if (sender is ServerBreakSandBox)
     {
         ServerBreakSandBox Father = (ServerBreakSandBox)sender;
         if (Father.ClosedForRetry)
         {
         }
         else
         {
             Close();
         }
     }
     else if (sender is UpdatingServerSandBox)
     {
         UpdatingServerSandBox Father = (UpdatingServerSandBox)sender;
         if (Father.ClosedForRetry)
         {
         }
         else
         {
             Close();
         }
     }
 }