Ejemplo n.º 1
0
 private void OnAccelerationUnitChanged(UnitAcceleratedTypes accelerationUnit)
 {
     UITreeHelper.ChangeLabelText(UITreeHelper.GetAll <LabelControl>(this.container, "Acceleration"), accelerationUnit.GetDescription());
     unitChangedHandler.Invoke();
     foreach (var m in UITreeHelper.GetAll <AccelerationInputer>(this.container, "Acceleration"))
     {
         m.UpdateUnitType(accelerationUnit);
         if (!string.IsNullOrEmpty(m.Suffix))
         {
             m.Suffix = accelerationUnit.GetDescription();
         }
     }
 }
Ejemplo n.º 2
0
 private void OnPressureUnitChanged(UnitPressureTypes pressureUnit)
 {
     UITreeHelper.ChangeLabelText(UITreeHelper.GetAll <LabelControl>(this.container, "Pressure"), pressureUnit.GetDescription());
     unitChangedHandler.Invoke();
     foreach (var m in UITreeHelper.GetAll <PressureInputer>(this.container, "Pressure"))
     {
         m.UpdateUnitType(pressureUnit);
         if (!string.IsNullOrEmpty(m.Suffix))
         {
             m.Suffix = pressureUnit.GetDescription();
         }
     }
 }
Ejemplo n.º 3
0
 private void OnSpeedUnitChanged(UnitSpeedTypes speedUnit)
 {
     UITreeHelper.ChangeLabelText(UITreeHelper.GetAll <LabelControl>(this.container, "Speed"), speedUnit.GetDescription());
     unitChangedHandler.Invoke();
     foreach (var m in UITreeHelper.GetAll <SpeedInputer>(this.container, "Speed"))
     {
         m.UpdateUnitType(speedUnit);
         if (!string.IsNullOrEmpty(m.Suffix))
         {
             m.Suffix = speedUnit.GetDescription();
         }
     }
 }