private void SelectOutputData(bool initialLoad)
        {
            for (int i = 0; i < cmbOutputData.Items.Count; i++)
            {
                ComboBoxData data = cmbOutputData.Items[i] as ComboBoxData;
                if (data != null && txtOutputData.Text.StartsWith(data.CommandString))
                {
                    cmbOutputData.SelectedIndex = i;

                    if (data.CommandType == OPMRemoteControl.CommandType.KeyPress)
                    {
                        lblKeyPress.Text    = _button.OutputData.Replace(data.CommandString + "?", string.Empty);
                        lblKeyPress.Visible = true;
                    }
                    else
                    {
                        lblKeyPress.Visible = false;
                    }

                    return;
                }
            }

            if (initialLoad)
            {
                cmbOutputData.Text = _button.OutputData;
            }
        }
        private void OnNewCommandText(object sender, EventArgs e)
        {
            ComboBoxData data = cmbOutputData.SelectedItem as ComboBoxData;

            if (data != null)
            {
                return;
            }

            txtOutputData.Text = cmbOutputData.Text;
            SelectOutputData(false);
        }
        private void OnNewCommand(object sender, EventArgs e)
        {
            ComboBoxData data = cmbOutputData.SelectedItem as ComboBoxData;

            if (data != null)
            {
                if (data.CommandType == OPMRemoteControl.CommandType.KeyPress)
                {
                    lblKeyPress.Visible = true;
                    txtOutputData.Text  =
                        "KeyPress?{" + lblKeyPress.Text + "}";
                }
                else
                {
                    lblKeyPress.Visible = false;
                    txtOutputData.Text  = data.CommandString;
                }
            }
        }