Пример #1
0
        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();
            }
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }
Пример #4
0
        private void BtnBrowseTarget_Click(object sender, EventArgs e)
        {
            if (!UnityWatch.LoadTarget())
            {
                return;
            }

            if (!VanguardCore.vanguardConnected)
            {
                VanguardCore.Start();
            }

            EnableInterface();
        }
Пример #5
0
        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();
 }
Пример #7
0
 private void btnStartClient_Click(object sender, EventArgs e)
 {
     Hook.Start();
     VanguardCore.Start();
     btnRefreshDomains.Visible = true;
 }