Exemple #1
0
 public string GetValidationError()
 {
     if (CmdYocto.CommandUsesTime(m_Command.Command) && !txtDuration.IsValidAndNotEmpty)
     {
         return("[Script_Error_BadYoctoTime]");
     }
     if (rdoSingle.Checked && string.IsNullOrWhiteSpace(cmbRelayID.Text))
     {
         return("[Script_Error_YoctoIDEmpty]");
     }
     return(null);
 }
Exemple #2
0
 private void FillUI()
 {
     m_Filling = true;
     try
     {
         rdoAll.Checked    = m_Command.IsAll;
         rdoSingle.Checked = !m_Command.IsAll;
         if (!m_Command.IsAll)
         {
             cmbRelayID.Text = m_Command.RelayID;
         }
         cmbAction.SelectedIndex = (int)m_Command.Command;
         if (CmdYocto.CommandUsesTime(m_Command.Command))
         {
             txtDuration.Value = m_Command.Millisecond;
         }
         else
         {
             txtDuration.Value = 1000;
         }
     }
     finally { m_Filling = false; }
 }