コード例 #1
0
        private void cmbCommandType_SelectedIndexChanged(object sender, EventArgs e)
        {
            lblPlaybackCmd.Visible = false;
            cmbPlaybackCmd.Visible = false;


            RC.CommandType cmdType = (RC.CommandType)cmbCommandType.SelectedIndex;
            if (BasicCommand.RequiresArguments(cmdType))
            {
                switch (cmdType)
                {
                case RC.CommandType.Playback:
                    lblPlaybackCmd.Visible = true;
                    cmbPlaybackCmd.Visible = true;
                    break;
                }
            }
        }
コード例 #2
0
        private void btnExecute_Click(object sender, EventArgs e)
        {
            txtResult.Text = string.Empty;

            try
            {
                RC.CommandType cmdType = (RC.CommandType)cmbCommandType.SelectedIndex;
                string[]       args    = null;

                if (BasicCommand.RequiresArguments(cmdType))
                {
                    switch (cmdType)
                    {
                    case RC.CommandType.Playback:
                        args = new string[] { cmbPlaybackCmd.Text };
                        break;
                    }
                }

                string restlt = string.Empty;

                switch (cmbDestination.SelectedIndex)
                {
                case 0:
                    RemoteControlHelper.SendPlayerCommand(cmdType, args);
                    txtResult.Text = "[ Player commands do not return results. ]";
                    break;

                case 1:
                    string dest = txtDestinationName.Text;
                    txtResult.Text = RemoteControlHelper.SendServiceCommand(dest, cmdType, args);
                    break;
                }
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                txtResult.Text = ex.Message;
            }
        }
コード例 #3
0
 public ComboBoxData(string description, string commandString, OPMRemoteControl.CommandType cmdType)
 {
     _description = description;
     _commandString = commandString;
     _cmdType = cmdType;
 }
コード例 #4
0
 public ComboBoxData(string description, string commandString, OPMRemoteControl.CommandType cmdType)
 {
     _description   = description;
     _commandString = commandString;
     _cmdType       = cmdType;
 }