Beispiel #1
0
        private void playButtonPanel_MouseUp(object sender, MouseEventArgs e)
        {
            if (usernameTextBox1.Text == "username" || usernameTextBox1.Text == "" || passwordTextBox1.Text == "password" || passwordTextBox1.Text == "")
            {
                MessageBox.Show(this, "Please fill out both username and password fields.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            new Task(() => {
                if (ProcessInformation.IsOpen("Project Altis Launcher"))
                {
                    HandleIDs.SendMessage(
                        HandleIDs.GetChildWindows(ProcessInformation.WindowHandle("Project Altis Launcher"))[(int)ControlLocation.UsernameText],
                        (int)WindowMessages.WM_SETTEXT, 0, usernameTextBox1.Text
                        );

                    HandleIDs.SendMessage(
                        HandleIDs.GetChildWindows(ProcessInformation.WindowHandle("Project Altis Launcher"))[(int)ControlLocation.PasswordText],
                        (int)WindowMessages.WM_SETTEXT, 0, passwordTextBox1.Text
                        );

                    HandleIDs.SendMessage(
                        HandleIDs.GetChildWindows(ProcessInformation.WindowHandle("Project Altis Launcher"))[(int)ControlLocation.PlayButton],
                        (int)WindowMessages.BM_CLICK, 0, null
                        );
                }
            }).Start();

            loadingLabel.Visible    = true;
            loadingProgress.Visible = true;
            loadingProgress.MarqueeAnimationSpeed = 30;
        }
Beispiel #2
0
 private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         ReleaseCapture();
         HandleIDs.SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, null);
     }
 }