Exemplo n.º 1
0
        private void attachButton_Click(object sender, EventArgs e)
        {
            ip = IPTextBox.Text;
            func.ChangeFileLines("config.txt", Convert.ToString(ip), "ip");
            try
            {
                game = func.current_game(ip);
                pid  = func.current_pid(ip);
            }
            catch
            {
                MessageBox.Show("invalid ip/web exception.");
            }

            if (game == "NPEA00385") // I'm sure there's a way better way of doing this.
            {
                Hide();
                RAC1Form rac1 = new RAC1Form
                {
                    TopMost = true
                };
                rac1.ShowDialog();
            }
            else if (game == "NPEA00387")
            {
                Hide();
                RAC3Form rac3 = new RAC3Form
                {
                    TopMost = true
                };
                rac3.ShowDialog();
            }
            else if (game == "NPEA00423")
            {
                Hide();
                RAC4Form rac4 = new RAC4Form
                {
                    TopMost = true
                };
                rac4.ShowDialog();
            }
            else
            {
                MessageBox.Show("Game isn't running or isn't supported yet.");
            }
        }
Exemplo n.º 2
0
        private void attachButton_Click(object sender, EventArgs e)
        {
            ip = IPTextBox.Text;
            //File.WriteAllText(Environment.CurrentDirectory + @"\config.txt", ip);
            func.ChangeFileLines("config.txt", Convert.ToString(ip), "ip");
            try
            {
                game = func.current_game(ip);
                pid  = func.current_pid(ip);
            }
            catch
            {
                MessageBox.Show("invalid ip/web exception.");
            }

            if (game == "NPEA00385")
            {
                RAC1Form rac1 = new RAC1Form();
                rac1.TopMost = true;
                rac1.ShowDialog();
            }
            else if (game == "NPEA00387")
            {
                RAC3Form rac3 = new RAC3Form();
                rac3.TopMost = true;
                rac3.ShowDialog();
            }
            else if (game == "NPEA00423")
            {
                RAC4Form rac4 = new RAC4Form();
                rac4.TopMost = true;
                rac4.ShowDialog();
            }
            else
            {
                MessageBox.Show("Game isn't running or isn't supported yet.");
            }
        }