コード例 #1
0
        private void buttonRemoteButton_Click(object sender, EventArgs e)
        {
            if (!Tray.Registered)
            {
                MessageBox.Show(this, "Cannot learn a new launch button without being connected to an active IR Server",
                                "Can't learn button", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            GetKeyCodeForm getKeyCode = new GetKeyCodeForm();

            getKeyCode.ShowDialog(this);

            string keyCode = getKeyCode.KeyCode;

            if (String.IsNullOrEmpty(keyCode))
            {
                return;
            }

            _launchKeyCode = keyCode;
        }
コード例 #2
0
ファイル: Setup.cs プロジェクト: astalavister/IR-Server-Suite
    private void buttonRemoteButton_Click(object sender, EventArgs e)
    {
      if (!Tray.Registered)
      {
        MessageBox.Show(this, "Cannot learn a new launch button without being connected to an active IR Server",
                        "Can't learn button", MessageBoxButtons.OK, MessageBoxIcon.Stop);
        return;
      }

      GetKeyCodeForm getKeyCode = new GetKeyCodeForm();
      getKeyCode.ShowDialog(this);

      string keyCode = getKeyCode.KeyCode;

      if (String.IsNullOrEmpty(keyCode))
        return;

      _launchKeyCode = keyCode;
    }