private void btnAutoExec_Click(object sender, EventArgs e) { FormKeyDetect kd = new FormKeyDetect { contrato = this }; if (button5.ForeColor == Color.LimeGreen) { txtClipboard1.Text = "alias +walkvol \"incrementvar volume 0 1 0.5; +speed\"; alias -walkvol \"incrementvar volume 0 1 -0.5; -speed\"; bind \"shift\" \"+walkvol\""; Clipboard.SetText(txtClipboard1.Text); timerClipboard.Enabled = true; timerClipboard.Start(); lblCoppied.Text = "Bind Added Successfully to autoexec.cfg!"; lblCoppied.Location = new Point(595, 354); lblCoppied.Visible = true; } else { kd.Show(); lblCoppied.Text = "Bind Added Successfully to autoexec.cfg!"; lblCoppied.Location = new Point(595, 354); strClipboardexec = 1; } }
private void btnClipboard_MouseClick(object sender, MouseEventArgs e) { try { if (Properties.Settings.Default.formKeyboard == 0) { if (button1.ForeColor == Color.LimeGreen || button2.ForeColor == Color.LimeGreen || button3.ForeColor == Color.LimeGreen || button4.ForeColor == Color.LimeGreen || button6.ForeColor == Color.LimeGreen || button7.ForeColor == Color.LimeGreen || button8.ForeColor == Color.LimeGreen) { FormKeyDetect fKD = new FormKeyDetect { contrato = this }; fKD.Show(); lblCoppied.Text = "Bind Coppied Successfully!"; lblCoppied.Location = new Point(625, 354); timerClipboard.Enabled = true; timerClipboard.Start(); Properties.Settings.Default.formKeyboard = 1; } if (button5.ForeColor == Color.LimeGreen) { Clipboard.SetText(txtClipboard1.Text); lblCoppied.Text = "Bind Coppied Successfully!"; lblCoppied.Location = new Point(625, 354); lblCoppied.Visible = true; timerClipboard.Enabled = true; timerClipboard.Start(); Properties.Settings.Default.formKeyboard = 1; } } else { MessageBoxButtons buttons = MessageBoxButtons.OK; MessageBoxIcon icon = MessageBoxIcon.Information; string message = "SUPREME"; string caption = "The keyboard is currently open"; DialogResult result; Form form; using (form = new Form()) { form.TopMost = true; result = MessageBox.Show(form, caption, message, buttons, icon); } } } catch { } }