public void UpdateGameProtectionDelay() { GameProtection.BackupInterval = Convert.ToInt32(S.GET <RTC_SettingsNetCore_Form>().nmGameProtectionDelay.Value); if (GameProtection.isRunning) { GameProtection.Reset(false); } }
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; } }
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; } } }