protected override void OnTimedUpdate() { base.OnTimedUpdate(); SetText(labelGrainsL, Spinetester.instance.Tension.Left.ToString("0.0")); SetText(labelGrainsR, Spinetester.instance.Tension.Right.ToString("0.0")); SetText(labelGrainsVal, Spinetester.instance.Tension.Total.ToString("0.0")); SetText(labelGramsL, UnitsConverter.GrainsToGrams(Spinetester.instance.Tension.Left).ToString("0.0")); SetText(labelGramsR, UnitsConverter.GrainsToGrams(Spinetester.instance.Tension.Right).ToString("0.0")); SetText(labelGramsVal, UnitsConverter.GrainsToGrams(Spinetester.instance.Tension.Total).ToString("0.0")); }
protected override void OnTimedUpdate() //TODO: take tension from event { base.OnTimedUpdate(); if (COMtimer > 0) { if (--COMtimer == 0) { SetVisibility(labelCOMfound, false); } } string format = Settings.DebugMode ? "0.00" : "0.0"; SetText(labelTension, UnitsConverter.GrainsToGrams(Spinetester.instance.Tension.Total).ToString(format)); }
public string GetTestedWeightString(bool grams) { return(grams ? UnitsConverter.GrainsToGrams(Tension).ToString(Weight.GramFormat) : UnitsConverter.ToGrains(Tension).ToString(Weight.GrainFormat)); }