public void DCSBIOSStringReceived(object sender, DCSBIOSStringDataEventArgs e)
 {
     try
     {
         if (e.Address == _comm1DcsbiosOutputFreq.Address)
         {
             lock (_lockCOMM1DialsObject)
             {
                 var tmp = _comm1Frequency;
                 _comm1Frequency = e.StringData;
                 if (tmp != _comm1Frequency)
                 {
                     Interlocked.Add(ref _doUpdatePanelLCD, 1);
                 }
             }
         }
         if (e.Address == _comm2DcsbiosOutputFreq.Address)
         {
             lock (_lockCOMM2DialsObject)
             {
                 var tmp = _comm2Frequency;
                 _comm2Frequency = e.StringData;
                 if (tmp != _comm2Frequency)
                 {
                     Interlocked.Add(ref _doUpdatePanelLCD, 1);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex, "DCSBIOSStringReceived()");
     }
 }
Пример #2
0
 public void DCSBIOSStringReceived(object sender, DCSBIOSStringDataEventArgs e)
 {
     try
     {
     }
     catch (Exception ex)
     {
         Common.LogError(78030, ex, "DCSBIOSStringReceived()");
     }
 }
Пример #3
0
 public void DCSBIOSStringReceived(object sender, DCSBIOSStringDataEventArgs e)
 {
     try
     {
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex, "DCSBIOSStringReceived()");
     }
 }
Пример #4
0
        public void DCSBIOSStringReceived(object sender, DCSBIOSStringDataEventArgs e)
        {
            try
            {
                if (_decoderSourceType == DCSBiosOutputType.INTEGER_TYPE)
                {
                    return;
                }

                if (_dcsbiosOutput?.Address == e.Address)
                {
                    if (TreatStringAsNumber && string.IsNullOrWhiteSpace(e.StringData))
                    {
                        StringDcsBiosValue = "0";
                    }
                    else
                    {
                        if (string.IsNullOrWhiteSpace(e.StringData))
                        {
                            StringDcsBiosValue = "";
                        }
                        else if (e.StringData.Length < _dcsbiosOutput.MaxLength)
                        {
                            StringDcsBiosValue = e.StringData.Substring(0, e.StringData.Length);
                        }
                        else
                        {
                            StringDcsBiosValue = e.StringData.Substring(0, _dcsbiosOutput.MaxLength);
                        }
                    }

                    /*
                     * If DCS-BIOS sends null string data and the decoder should
                     * treat it as number then it will be represented by zero.
                     */

                    if (_treatStringAsNumber && uint.TryParse(string.IsNullOrWhiteSpace(e.StringData) ? "0" : e.StringData.Substring(0, _dcsbiosOutput.MaxLength), out var tmpUint))
                    {
                        UintDcsBiosValue = tmpUint;
                    }
                    _valueUpdated = true;
                }
            }
            catch (Exception ex)
            {
                Common.LogError(ex, "DCSBIOSStringReceived()");
            }
        }
Пример #5
0
 public void DCSBIOSStringReceived(object sender, DCSBIOSStringDataEventArgs e)
 {
     try
     {
         /*
          * if (string.IsNullOrWhiteSpace(e.StringData))
          * {
          *  Common.DebugP("Received DCSBIOS stringData : " + e.StringData);
          *  return;
          * }
          *
          */
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex, "DCSBIOSStringReceived()");
     }
     ShowFrequenciesOnPanel();
 }
 public void DCSBIOSStringReceived(object sender, DCSBIOSStringDataEventArgs e)
 {
 }