Ejemplo n.º 1
0
 private void SetDefaultFalconGaugeFormat()
 {
     if (FalconGauge != null)
     {
         FalconGaugeFormat = new FalconGaugeFormat()
         {
             TotalSize                 = FalconGauge.FormatTotalSize,
             IntegralPartMinSize       = FalconGauge.FormatIntegralPartMinSize,
             FractionalPartSize        = FalconGauge.FormatFractionalPartSize,
             PadFractionalPartWithZero = true,
         };
     }
 }
Ejemplo n.º 2
0
        private void UpdateFalconGaugeDigitValues()
        {
            if (owner == null)
            {
                return;
            }

            string outputString = FalconGaugeFormat != null?FalconGaugeFormat.ToString(FalconValue) : string.Empty;

            using (IEnumerator <char> outputStringEnumerator = outputString.Reverse().GetEnumerator())
            {
                foreach (FalconGaugeDigit digit in FalconGaugeDigits)
                {
                    if (!outputStringEnumerator.MoveNext())
                    {
                        digit.Value        = ' ';
                        digit.DecimalPoint = false;
                    }
                    else
                    {
                        if (outputStringEnumerator.Current != '.')
                        {
                            digit.Value        = outputStringEnumerator.Current;
                            digit.DecimalPoint = false;
                        }
                        else
                        {
                            digit.DecimalPoint = true;

                            if (!outputStringEnumerator.MoveNext())
                            {
                                digit.Value = ' ';
                            }
                            else
                            {
                                digit.Value = outputStringEnumerator.Current;
                            }
                        }
                    }
                }
            }

            WriteOutputState();
        }
Ejemplo n.º 3
0
 public SevenSegmentDisplay()
 {
     RemoveSevenSegmentDisplayCommand = new RelayCommand(ExecuteRemoveSevenSegmentDisplay);
     FalconGaugeFormat = new FalconGaugeFormat();
 }