Beispiel #1
0
 public void AnimationFactoryWorker(object sender, EventArgs e)
 {
     if (!Enabled)
     {
         return;
     }
     if (CurrentNum <= MAXIMUM_TICK)
     {
         this.BackgroundImage =
             ThereIsConstants.Actions.RotateImage(
                 new Bitmap(Image.FromFile(ThereIsConstants.Path.Datas_Path +
                                           ThereIsConstants.Path.DoubleSlash + MyRes.GetString(TheBackGroundNameInRes))),
                 CurrentNum * 0.5f);
         CurrentNum++;
     }
     else
     {
         ClosedForRetry = true;
         if (IsShowingAnotherSandBox)
         {
             if (ShowingAnotherSandBox != null && !ShowingAnotherSandBox.IsDisposed)
             {
                 if (ShowingAnotherSandBox is NoInternetConnectionSandBox)
                 {
                     ShowingAnotherSandBox.FormClosed -= ErrorSandBox_FormClosed;
                 }
                 ShowingAnotherSandBox.Close();
             }
         }
         Close();
     }
 }
Beispiel #2
0
 //----------------------------------------------
 protected override void OnGotFocus(EventArgs e)
 {
     if (IsShowingAnotherSandBox && ShowingAnotherSandBox != null)
     {
         ShowingAnotherSandBox.Focus();
     }
     else
     {
     }
     base.OnGotFocus(e);
 }
Beispiel #3
0
 public void SetTheHighestSandBox(SandBoxBase mySandBox)
 {
     if (IsShowingAnotherSandBox && ShowingAnotherSandBox != null)
     {
         Enabled = false;
         ShowingAnotherSandBox.Enabled = false;
         ShowingAnotherSandBox.SetTheHighestSandBox(mySandBox);
     }
     else
     {
         IsShowingAnotherSandBox = true;
         ShowingAnotherSandBox   = mySandBox;
         mySandBox.Focus();
     }
 }
Beispiel #4
0
 public SandBoxBase GetTheHighestSandBox(bool WantMeToFocusThem, bool SetTheEnabledToFalse = true)
 {
     if (IsShowingAnotherSandBox && ShowingAnotherSandBox != null)
     {
         if (WantMeToFocusThem)
         {
             if (MyHallSandBox != null)
             {
                 MyHallSandBox.Focus();
             }
             Focus();
             if (ShowingAnotherSandBox != null)
             {
                 ShowingAnotherSandBox.Focus();
             }
         }
         if (SetTheEnabledToFalse && !(ShowingAnotherSandBox is HallSandBox) && Enabled)
         {
             Enabled = false;
         }
         return(ShowingAnotherSandBox.GetTheHighestSandBox(WantMeToFocusThem));
     }
     else
     {
         if (WantMeToFocusThem)
         {
             if (MyHallSandBox != null)
             {
                 MyHallSandBox.Focus();
             }
             Focus();
             if (SetTheEnabledToFalse && Enabled)
             {
                 //Enabled = false;
             }
         }
         return(this);
     }
 }