private void NetCoreSpec_ServerConnectionLost(object sender, EventArgs e) { if (UICore.isClosing || UICore.FirstConnect) { return; } SyncObjectSingleton.FormExecute(() => { if (S.GET <RTC_ConnectionStatus_Form>() != null && !S.GET <RTC_ConnectionStatus_Form>() .IsDisposed) { S.GET <RTC_ConnectionStatus_Form>() .lbConnectionStatus.Text = $"{(string)AllSpec.VanguardSpec?[VSPEC.NAME] ?? "Vanguard"} connection timed out"; UICore.LockInterface(); UI_DefaultGrids.connectionStatus.LoadToMain(); } S.GET <RTC_VmdAct_Form>() .cbAutoAddDump.Checked = false; GameProtection.WasAutoCorruptRunning = CorruptCore.RtcCore.AutoCorrupt; S.GET <UI_CoreForm>().AutoCorrupt = false; }); GameProtection.Stop(false); if (S.GET <UI_CoreForm>() .cbUseAutoKillSwitch.Checked&& AllSpec.VanguardSpec != null) { AutoKillSwitch.KillEmulator(); } }
private void cbUseGameProtection_CheckedChanged(object sender, EventArgs e) { if (cbUseGameProtection.Checked) { GameProtection.Start(); } else { GameProtection.Stop(); btnGpJumpBack.Visible = false; btnGpJumpNow.Visible = false; } }
private void NetCoreSpec_ServerConnectionLost(object sender, EventArgs e) { UIConnector.ConnectionLostLockout.WaitOne(); Console.WriteLine("Thread id {0} got Mutex... (specconnectionlost)", System.Threading.Thread.CurrentThread.ManagedThreadId); if (UICore.isClosing || UICore.FirstConnect) { return; } SyncObjectSingleton.FormExecute(() => { if (S.GET <RTC_ConnectionStatus_Form>() != null && !S.GET <RTC_ConnectionStatus_Form>() .IsDisposed) { S.GET <RTC_ConnectionStatus_Form>() .lbConnectionStatus.Text = $"{(string) AllSpec.VanguardSpec?[VSPEC.NAME] ?? "Vanguard"} connection timed out"; UICore.LockInterface(); UI_DefaultGrids.connectionStatus.LoadToMain(); } S.GET <RTC_VmdAct_Form>() .cbAutoAddDump.Checked = false; GameProtection.WasAutoCorruptRunning = CorruptCore.RtcCore.AutoCorrupt; S.GET <UI_CoreForm>().AutoCorrupt = false; }); GameProtection.Stop(false); if (S.GET <UI_CoreForm>() .cbUseAutoKillSwitch.Checked&& AllSpec.VanguardSpec != null) { AutoKillSwitch.KillEmulator(); } UIConnector.ConnectionLostLockout.ReleaseMutex(); Console.WriteLine("Thread id {0} released Mutex (specconnectionlost)...", Thread.CurrentThread.ManagedThreadId); }