示例#1
0
        private void DispatcherTimerTick(object sender, EventArgs e)
        {
            try
            {
                LabelErrors.Content        = _dcsbiosDecoder.HasErrors ? _dcsbiosDecoder.LastFormulaError : string.Empty;
                LabelFormulaResult.Content = _dcsbiosDecoder.HasErrors ? "-" : _dcsbiosDecoder.GetResultString();

                if (_dcsbiosDecoder.DecoderSourceType == DCSBiosOutputType.IntegerType)
                {
                    if (_dcsbiosDecoder.UseFormula)
                    {
                        LabelSourceRawDCSBIOSValue.Content = "-";
                    }
                    else
                    {
                        LabelSourceRawDCSBIOSValue.Content = _dcsbiosDecoder.UintDcsBiosValue;
                    }
                }
                else
                {
                    LabelSourceRawDCSBIOSValue.Content = _dcsbiosDecoder.StringDcsBiosValue;
                }
            }
            catch (Exception ex)
            {
                LabelErrors.Content = ex.Message;
            }

            // Forcing the CommandManager to raise the RequerySuggested event
            CommandManager.InvalidateRequerySuggested();
        }