Beispiel #1
0
        private void GetAgentMode()
        {
            var checkedButton = this.agentModeGroupBox.Controls.OfType <RadioButton>()
                                .FirstOrDefault(rb => rb.Checked);

            if (checkedButton == this.AM_LOG_INRadioButton)
            {
                this.agentMode    = Csta.AgentMode_t.AM_LOG_IN;
                this.DialogResult = DialogResult.OK;
            }
            else if (checkedButton == this.AM_LOG_OUTRadioButton)
            {
                this.agentMode    = Csta.AgentMode_t.AM_LOG_OUT;
                this.DialogResult = DialogResult.OK;
            }
            else if (checkedButton == this.AM_NOT_READYRadioButton)
            {
                this.agentMode    = Csta.AgentMode_t.AM_NOT_READY;
                this.DialogResult = DialogResult.OK;
            }
            else if (checkedButton == this.AM_READYRadioButton)
            {
                this.agentMode    = Csta.AgentMode_t.AM_READY;
                this.DialogResult = DialogResult.OK;
            }
            else if (checkedButton == this.AM_WORK_NOT_READYRadioButton)
            {
                this.agentMode    = Csta.AgentMode_t.AM_WORK_NOT_READY;
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                this.DialogResult = DialogResult.Cancel;
            }
        }
 private void GetAgentMode()
 {
     var checkedButton = this.agentModeGroupBox.Controls.OfType<RadioButton>()
                               .FirstOrDefault(rb => rb.Checked);
     if (checkedButton == this.AM_LOG_INRadioButton)
     {
         this.agentMode = Csta.AgentMode_t.AM_LOG_IN;
         this.DialogResult = DialogResult.OK;
     }
     else if (checkedButton == this.AM_LOG_OUTRadioButton)
     {
         this.agentMode = Csta.AgentMode_t.AM_LOG_OUT;
         this.DialogResult = DialogResult.OK;
     }
     else if (checkedButton == this.AM_NOT_READYRadioButton)
     {
         this.agentMode = Csta.AgentMode_t.AM_NOT_READY;
         this.DialogResult = DialogResult.OK;
     }
     else if (checkedButton == this.AM_READYRadioButton)
     {
         this.agentMode = Csta.AgentMode_t.AM_READY;
         this.DialogResult = DialogResult.OK;
     }
     else if (checkedButton == this.AM_WORK_NOT_READYRadioButton)
     {
         this.agentMode = Csta.AgentMode_t.AM_WORK_NOT_READY;
         this.DialogResult = DialogResult.OK;
     }
     else
         this.DialogResult = DialogResult.Cancel;
 }