Esempio n. 1
0
 public void UpdateGameProtectionDelay()
 {
     GameProtection.BackupInterval = Convert.ToInt32(S.GET <RTC_SettingsNetCore_Form>().nmGameProtectionDelay.Value);
     if (GameProtection.isRunning)
     {
         GameProtection.Reset(false);
     }
 }
Esempio n. 2
0
        public void btnGpJumpNow_Click(object sender, EventArgs e)
        {
            try
            {
                btnGpJumpNow.Visible = false;

                //Do this to prevent any potential race
                var sk = StockpileManager_UISide.BackupedState;;

                if (sk != null)
                {
                    GameProtection.AddBackupState(sk);
                    sk.Run();
                }

                GameProtection.Reset(false);
            }
            finally
            {
                btnGpJumpNow.Visible = true;
            }
        }
Esempio n. 3
0
        public void btnGpJumpBack_Click(object sender, EventArgs e)
        {
            try
            {
                btnGpJumpBack.Visible = false;

                if (!GameProtection.HasBackedUpStates)
                {
                    return;
                }

                GameProtection.PopAndRunBackupState();
                GameProtection.Reset(false);
            }
            finally
            {
                if (GameProtection.HasBackedUpStates)
                {
                    btnGpJumpBack.Visible = true;
                }
            }
        }