コード例 #1
0
        public AddTeleport(Main2 _parent, Cheat c)
        {
            InitializeComponent();
            parent = _parent;
            before = buttonAdd.Text;
            UpdateAdd();

            refresh = new Task(delegate
            {
                while (true)
                {
                    c.ReadGameData();
                    if (InvokeRequired)
                    {
                        Invoke((MethodInvoker) delegate
                        {
                            textBoxXR.Text = c.gd.x.ToString("0.00");
                            textBoxYR.Text = c.gd.y.ToString("0.00");
                        });
                    }

                    Thread.Sleep(10);
                }
            }, cts.Token);
            refresh.Start();
        }
コード例 #2
0
        public Main2()
        {
            forExternal = this;
            Thread.CurrentThread.Name = "Interface";
            InitializeComponent();
            LoadDefaultTP();
            BlockEnable();

            Program.StartGameDetection();
        }
コード例 #3
0
        private static void Main()
        {
            ListenerLog     = new TextWriterTraceListener("log.txt", "log");
            ListenerConsole = new TextWriterTraceListener(Console.Out, "Console");
            Debug.Listeners.Clear();
            Debug.Listeners.Add(ListenerLog);
            Debug.Listeners.Add(ListenerConsole);
            Debug.AutoFlush = true;
            Debug.WriteLine("██████████████████████████████████████████ " + DateTime.Now + " ██████████████████████████████████████████");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            GUI = new Main2();
            Application.Run(GUI);

            // EXIT

            gameDetection?.Abort();
            cheatThread?.Abort();
        }