コード例 #1
0
ファイル: Program.cs プロジェクト: wccrawford/Game-Trainer
        private Process OpenProcess(string ProcessName)
        {
            Process TargetProcess = new Process();

            if (!TargetProcess.ChooseProcess(ProcessName))
            {
                Console.WriteLine(ProcessName + " not found!");
                return null;
            }

            if (!TargetProcess.OpenProcess())
            {
                Console.WriteLine("Can't open process!");
                return null;
            }

            return TargetProcess;
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: wccrawford/Game-Trainer
        private Process OpenProcess()
        {
            Process TargetProcess = new Process();

            if (!TargetProcess.ChooseProcess(HackInfo.ProcessName))
            {
                System.Windows.Forms.MessageBox.Show(HackInfo.GameName + " not found!");
                throw(new Exception("Can't find process"));
            }

            if (!TargetProcess.OpenProcess())
            {
                System.Windows.Forms.MessageBox.Show("Can't open process!");
                throw(new Exception("Can't open process"));
            }

            return TargetProcess;
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: wccrawford/Game-Trainer
 private void InitInstructions()
 {
     lblInstructions.Text = "";
     Process p = new Process();
     for (int x=0; x < HackInfo.Hacks.Length; x++)
     {
         lblInstructions.Text += p.GetKeyName(HackInfo.Hacks[x].Key) + " - " + HackInfo.Hacks[x].Name + System.Environment.NewLine;
     }
 }