Exemplo n.º 1
0
 private void RefreshValue(ref TextBox i_txtCh, Adam4000_ChannelStatus i_status, float i_fValue)
 {
     if (i_status == Adam4000_ChannelStatus.Normal)
     {
         if (m_adamConfig.Format == Adam4000_DataFormat.EngineerUnit)
         {
             if (m_adamConfig.Temperature == Adam_Temperature.Centigrade)
             {
                 i_txtCh.Text = i_fValue.ToString("#0.0") + " 'C";
             }
             else
             {
                 i_txtCh.Text = i_fValue.ToString("#0.0") + " 'F";
             }
         }
         else // ohms
         {
             i_txtCh.Text = i_fValue.ToString("#0.000") + " ohms";
         }
     }
     else
     {
         i_txtCh.Text = i_status.ToString();
     }
 }
Exemplo n.º 2
0
 private void RefreshValue(ref TextBox i_txtCh, Adam4000_ChannelStatus i_status, float i_fValue)
 {
     if (i_status == Adam4000_ChannelStatus.Normal)
     {
         i_txtCh.Text = i_fValue.ToString(AnalogInput.GetFloatFormat(m_Adam4000Type, m_adamConfig.TypeCode)) + " " + AnalogInput.GetUnitName(m_Adam4000Type, m_adamConfig.TypeCode);
     }
     else
     {
         i_txtCh.Text = i_status.ToString();
     }
 }
Exemplo n.º 3
0
 private void RefreshValue(ref TextBox i_txtCh, Adam4000_ChannelStatus i_status, float i_fValue, byte i_byRange)
 {
     if (i_status == Adam4000_ChannelStatus.Normal)
     {
         if (m_adamConfig.Format == Adam4000_DataFormat.EngineerUnit)
         {
             i_txtCh.Text = i_fValue.ToString(AnalogInput.GetFloatFormat(m_Adam4000Type, i_byRange)) + " " + AnalogInput.GetUnitName(m_Adam4000Type, i_byRange);
         }
         else if (m_adamConfig.Format == Adam4000_DataFormat.Percent)
         {
             i_txtCh.Text = i_fValue.ToString("#0.00") + " %";
         }
     }
     else
     {
         i_txtCh.Text = i_status.ToString();
     }
 }