private void CbSelectedGame_SelectedIndexChanged(object sender, EventArgs e) { if (CemuWatch.DontSelectGame) { return; } string selected = cbSelectedGame.SelectedItem.ToString(); if (selected == "Autodetect") { CemuWatch.Start(); return; } if (!CemuWatch.SelectGame(selected)) { cbSelectedGame.SelectedIndex = 0; return; } if (!VanguardCore.vanguardStarted) { VanguardCore.Start(); } else if (VanguardCore.vanguardConnected) { CemuWatch.UpdateDomains(); } }
public void btnLoadTargets_Click(object sender, EventArgs e) { FileTarget[] overrideTargets = null; if (selectedTemplate != null) { lbTargets.Items.Clear(); overrideTargets = selectedTemplate.GetTargets(); //if (targets != null) // lbTargets.Items.AddRange(targets); //overrideTargets. } if (overrideTargets == null) { MessageBox.Show("Error loading target"); } if (!FileWatch.LoadTargets(overrideTargets)) { return; } if (!VanguardCore.vanguardConnected) { VanguardCore.Start(); } EnableTargetInterface(); }
private void BtnLoadTarget_Click(object sender, EventArgs e) { //only use backups for uncorrupt, reset on every reload foreach (string file in Directory.GetFiles(Path.Combine(FileWatch.currentDir, "FILEBACKUPS"))) { try { File.Delete(file); } catch { MessageBox.Show($"Could not delete file {file}"); } } if (!FileWatch.LoadTarget()) { return; } if (!VanguardCore.vanguardConnected) { VanguardCore.Start(); } EnableTargetInterface(); }
private void BtnBrowseTarget_Click(object sender, EventArgs e) { if (!UnityWatch.LoadTarget()) { return; } if (!VanguardCore.vanguardConnected) { VanguardCore.Start(); } EnableInterface(); }
private static void AutoHookTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { try { if (p?.HasExited == false) { return; } SyncObjectSingleton.FormExecute(() => S.GET <StubForm>().lbTargetStatus.Text = "Waiting..."); var procToFind = S.GET <StubForm>().tbAutoAttach.Text; if (string.IsNullOrWhiteSpace(procToFind)) { return; } SyncObjectSingleton.FormExecute(() => S.GET <StubForm>().lbTargetStatus.Text = "Hooking..."); var _p = Process.GetProcesses().First(x => x.ProcessName == procToFind); if (_p != null) { Thread.Sleep(2000); //Give the process 2 seconds SyncObjectSingleton.FormExecute(() => { LoadTarget(_p); if (!VanguardCore.vanguardConnected) { VanguardCore.Start(); } S.GET <StubForm>().EnableTargetInterface(); }); } } catch (Exception ex) { Console.WriteLine($"AutoHook failed.\n{ex.Message}\n{ex.StackTrace}"); } AutoHookTimer.Start(); }
private void btnStartClient_Click(object sender, EventArgs e) { Hook.Start(); VanguardCore.Start(); }
private void btnStartClient_Click(object sender, EventArgs e) { Hook.Start(); VanguardCore.Start(); btnRefreshDomains.Visible = true; }