private void numericUpDownDelay_ValueChanged(object sender, EventArgs e) { var zIODefinition = new IODefinition( (byte)IODefinition.IOFlags.Delay, (byte)numericUpDownDelay.Value); var zDisplay = txtKeyOut; zDisplay.Text = zIODefinition.GetDescription(); zDisplay.Tag = zIODefinition; }
private void textBox_KeyDown(object sender, KeyEventArgs e) { var zDisplay = (TextBox)sender; // Console.Out.WriteLine("Key Input: {0} 0x{1}".FormatString(e.KeyCode, e.KeyCode.ToString("x"))); #warning not so sure how non-english keyboards are going to handle the limitation/cast to a byte here. This should probably be an int32 (this could be one of many problems...) var zIODef = new IODefinition(0x00, (byte)e.KeyCode, e); zDisplay.Text = zIODef.GetDescription(); e.Handled = true; zDisplay.Tag = zIODef; }
private void comboBoxSpecialOut_SelectedIndexChanged(object sender, EventArgs e) { if (0 != comboBoxMouseOut.SelectedIndex) // the first entry does nothing { var zIODefinition = new IODefinition( (byte)IODefinition.IOFlags.MouseOut, (byte)(IODefinition.MouseButton)comboBoxMouseOut.SelectedItem); var zDisplay = txtKeyOut; zDisplay.Text = zIODefinition.GetDescription(); zDisplay.Tag = zIODefinition; } }