private void tsbScan_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); frmAscii frm = new frmAscii(); string s = frm.InputAscii(); if (s.Length <= 0) { return; } t.AddKeyCode(s, true); }
private void tstMacro_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); frmMacro frm = new frmMacro(); string s = frm.input_macro(null); if (s == string.Empty) { return; } t.AddKeyCode(s, true); }
private void tsmScan_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); frmAscii frm = new frmAscii(); string strscan = frm.InputAscii(); if (strscan.Length > 0) { t.AddKeyCode(strscan, true); } //frm.ShowDialog(); }
private void tsbSpecial_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); frmOnScreenKbd frm = new frmOnScreenKbd(true); frm.StartPosition = FormStartPosition.CenterParent; string s = frm.InputSpecialKey(); // s = s.Replace("[", ""); // s = s.Replace("]", ""); if (s.Length <= 0) { return; } t.AddKeyCode(s, false); }
private void tsmCombination_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); if (t == null) { return; } frmCombination frm = new frmCombination(); string s = frm.InputCombinationKeys(); if (s.Length > 0) { t.AddKeyCode(s, true); } }
private void tsmRepeat_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); frmRepeat frm = new frmRepeat(); int n = frm.InputRepeat(); if (n <= 0) { return; } string s = n.ToString(); s = "Repeat" + s; t.AddKeyCode(s, true); }
private void tsbLevel_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); if (t == null) { return; } frmLayers frm = new frmLayers(); string s = frm.input_layer(t.Text); if (s == string.Empty) { return; } t.AddKeyCode(s, false); }
static public bool ValidateKeyTextBox(Form frmCaller, KB9TextBox ctrlText) { string strKeys = ctrlText.Text;// GetInputedKeyCodes(); if (strKeys == string.Empty) { return(true); } KB9Validation kb9 = new KB9Validation(); KB9Validation.ERR_VALIDATION err = kb9.ValidateKB9Keycodes(strKeys); if (err == KB9Validation.ERR_VALIDATION.OK) { return(true); } string err_msg = ValidateErrMsg(err); if (err == KB9Validation.ERR_VALIDATION.Less_AltUp || err == KB9Validation.ERR_VALIDATION.Less_RAltUp || err == KB9Validation.ERR_VALIDATION.Less_CtrlUp || err == KB9Validation.ERR_VALIDATION.Less_RCtrlUp || err == KB9Validation.ERR_VALIDATION.Less_RShiftUp || err == KB9Validation.ERR_VALIDATION.Less_ShiftUp || err == KB9Validation.ERR_VALIDATION.Less_WinUp || err == KB9Validation.ERR_VALIDATION.Less_RWinUp) { err_msg += "\n\rDo you want utility append this key to end?"; DialogResult result = MessageBox.Show(frmCaller, err_msg, "Error", MessageBoxButtons.YesNo, MessageBoxIcon.Error); if (result == DialogResult.Yes) { string strAppend = AppendErrKey(err); ctrlText.AddKeyCode(strAppend, false); } } else { err_msg += "\n\rPlease fixed it manually."; MessageBox.Show(frmCaller, err_msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(false); }
private void tsbRepeat_Click(object sender, EventArgs e) { frmOnScreenKbd.Instance().Hide(); KB9TextBox t = GetFocusedTextBox(); if (t == null) { return; } frmRepeat frm = new frmRepeat(); int n = frm.InputRepeat(); if (n <= 0) { return; } string s = n.ToString(); s = "Repeat" + s; t.AddKeyCode(s, true); }
private void tsmDelay_Click(object sender, EventArgs e) { KB9TextBox t = GetFocusedTextBox(); frmDelay frm = new frmDelay(); decimal d = frm.InputDelay(); if (d <= 0) { return; } /* * d *= 10; //delay time is nx0.1 format, so need to x10 to make string * int n = (int)d; * string s = n.ToString(); * * s = "Pause" + s; * */ string s = frmDelay.makePauseString(d); t.AddKeyCode(s, true); //frm.ShowDialog(); }
private void tsbDelay_Click(object sender, EventArgs e) { frmOnScreenKbd.Instance().Hide(); KB9TextBox t = GetFocusedTextBox(); if (t == null) { return; } frmDelay frm = new frmDelay(); decimal d = frm.InputDelay(); if (d <= 0) { return; } //d *= 10; //delay time is nx0.1 format, so need to x10 to make string //int n = (int)d; //string s = n.ToString(); //s = "Pause" + s; string s = frmDelay.makePauseString(d); t.AddKeyCode(s, true); }