private void setUpBatteryLife() { BatteryLife = new CenterDial(); BatteryLife.Size = new Size(guageSzStd, guageSzStd); BatteryLife.Location = new Point(guageSzStd, 0); BatteryLife.GaugeSurfaceColor = Color.WhiteSmoke; BatteryLife.DialOutlineColor = Color.Black; BatteryLife.MajorLabel = "BatteryLife"; BatteryLife.LabelColor = Color.Black; BatteryLife.TickLabelColor = Color.Black; BatteryLife.MinorLabel = "%"; BatteryLife.MajorTickDegrees = 30; BatteryLife.MajorTickColor = Color.Black; BatteryLife.MinorTickDegrees = BatteryLife.MajorTickDegrees / 5; BatteryLife.MinorTickColor = Color.Black; BatteryLife.NeedleColor = Color.Black; BatteryLife.Min = 0; BatteryLife.MinDisplayedValue = 0; BatteryLife.Max = 120; BatteryLife.MaxDisplayedValue = 100; RedLineRange CriticalRange = new RedLineRange(); CriticalRange.LowerBound = 0; CriticalRange.UpperBound = 30; CriticalRange.OverrideTickLabelColor = true; CriticalRange.MajorTickColor = Color.Red; CriticalRange.MinorTickColor = Color.Red; CriticalRange.TickLabelColor = Color.Black; BatteryLife.AddRedLineRange(CriticalRange); RedLineRange WarningRange = new RedLineRange(); WarningRange.LowerBound = 30; WarningRange.UpperBound = 50; WarningRange.OverrideTickLabelColor = true; WarningRange.MajorTickColor = Color.DarkGoldenrod; WarningRange.MinorTickColor = Color.DarkGoldenrod; WarningRange.TickLabelColor = Color.Black; BatteryLife.AddRedLineRange(WarningRange); RedLineRange OkRange = new RedLineRange(); OkRange.LowerBound = 50; OkRange.UpperBound = 100; OkRange.OverrideTickLabelColor = true; OkRange.MajorTickColor = Color.Green; OkRange.MinorTickColor = Color.Green; OkRange.TickLabelColor = Color.Black; BatteryLife.AddRedLineRange(OkRange); this.Controls.Add(BatteryLife); BatteryLife.SetValue(78.7f); }
private void setUpAltimeter() { Altitude = new CenterDial(); Altitude.Size = new Size(guageSzStd, guageSzStd); Altitude.MajorLabel = "Altitude"; Altitude.MinorLabel = "meters"; Altitude.MajorTickDegrees = 30; Altitude.CounterClockWise = true; Altitude.MinorTickDegrees = Altitude.MajorTickDegrees / 5; Altitude.Min = 0; Altitude.MinDisplayedValue = 0; Altitude.Max = 720; Altitude.MaxDisplayedValue = 600; this.Controls.Add(Altitude); Altitude.SetValue(100); }
private void SetUpSpeedGauge() { SpeedGauge = new CenterDial(); SpeedGauge.MajorLabel = "Speed"; SpeedGauge.MinorLabel = "m/s"; SpeedGauge.Max = 12; SpeedGauge.Min = 0; SpeedGauge.MaxDisplayedValue = 10; SpeedGauge.MinDisplayedValue = 1; SpeedGauge.LowestValueAngle = 80; this.Controls.Add(SpeedGauge); }
private void setUpRPM() { RPM = new CenterDial(); RPM.Size = new Size(guageSzStd, guageSzStd); RPM.Location = new Point(guageSzStd*2, 0); RPM.MajorLabel = "RPM"; RPM.MinorLabel = "x1000"; RPM.MajorTickDegrees = 18; RPM.MinorTickDegrees = RPM.MajorTickDegrees / 5; RPM.Min = 0; RPM.MinDisplayedValue = 0; RPM.Max = 20; RPM.MaxDisplayedValue = 10; RedLineRange WarningRange = new RedLineRange(); WarningRange.LowerBound = 8; WarningRange.UpperBound = 10; WarningRange.OverrideTickLabelColor = true; WarningRange.MajorTickColor = Color.Red; WarningRange.MinorTickColor = Color.Red; WarningRange.TickLabelColor = Color.YellowGreen; RPM.AddRedLineRange(WarningRange); this.Controls.Add(RPM); RPM.Value =4.0f; }
private void SetUpHeadingGauge() { HeadingGauge = new CenterDial();//direction the craft is moving HeadingGauge.Max = 360; HeadingGauge.Min = 0; HeadingGauge.MaxDisplayedValue = 359; HeadingGauge.MinDisplayedValue = 0; HeadingGauge.MajorTickDegrees = 30; HeadingGauge.MinorTickDegrees = 6; HeadingGauge.LowestValueAngle = -90; HeadingGauge.MajorLabel = "Heading"; HeadingGauge.MinorLabel = "Degrees"; this.Controls.Add(HeadingGauge); }
private void SetUpRPMGauge() { RPMGauge = new CenterDial(); RPMGauge.Value = 1000; RPMGauge.MajorLabel = "Main Rotor"; RPMGauge.MinorLabel = "RPM"; RPMGauge.Min = 0; RPMGauge.Max = 3600; RPMGauge.MinDisplayedValue = 0; RPMGauge.MaxDisplayedValue = 3000; RPMGauge.LowestValueAngle = 60; RedLineRange GoodRPM = new RedLineRange(); GoodRPM.LowerBound = 1400; GoodRPM.UpperBound = 1600; GoodRPM.MajorTickColor = Color.Green; GoodRPM.MinorTickColor = Color.Green; GoodRPM.TickLabelColor = Color.Green; RPMGauge.AddRedLineRange(GoodRPM); RedLineRange WarningRPM = new RedLineRange(); WarningRPM.LowerBound = 1200; WarningRPM.UpperBound = 1800; WarningRPM.MajorTickColor = Color.Yellow; WarningRPM.MinorTickColor = Color.Yellow; WarningRPM.TickLabelColor = Color.Yellow; RPMGauge.AddRedLineRange(WarningRPM); RedLineRange OverRPM = new RedLineRange(); OverRPM.LowerBound = 1801; OverRPM.UpperBound = 3600; RPMGauge.AddRedLineRange(OverRPM); this.Controls.Add(RPMGauge); }
private void SetUpBatteryVoltageGauge() { BatteryVoltageGauge = new CenterDial(); BatteryVoltageGauge.MajorLabel = "Batt Voltage"; BatteryVoltageGauge.MinorLabel = "Volts"; BatteryVoltageGauge.Min = 14; BatteryVoltageGauge.Max = 20; BatteryVoltageGauge.MinDisplayedValue = 15; BatteryVoltageGauge.MaxDisplayedValue = 19; BatteryVoltageGauge.CounterClockWise = false; BatteryVoltageGauge.LowestValueAngle = 90; RedLineRange BatteryUnderVoltage = new RedLineRange(); BatteryUnderVoltage.UpperBound = 16; BatteryUnderVoltage.LowerBound = 0; BatteryVoltageGauge.AddRedLineRange(BatteryUnderVoltage); this.Controls.Add(BatteryVoltageGauge); BatteryVoltageGauge.Value = 18; }
private void SetUpBatteryTemperatureGauge() { BatteryTemperatureGauge = new CenterDial(); BatteryTemperatureGauge.MajorLabel = "Batt Temp"; BatteryTemperatureGauge.MinorLabel = "Degrees C"; BatteryTemperatureGauge.MajorTickDegrees = 20; BatteryTemperatureGauge.MinorTickDegrees = 4; BatteryTemperatureGauge.Min = -60; BatteryTemperatureGauge.Max = 120; BatteryTemperatureGauge.MinDisplayedValue = -40; BatteryTemperatureGauge.MaxDisplayedValue = 100; BatteryTemperatureGauge.LowestValueAngle = 120; RedLineRange BatteryOverTemp = new RedLineRange(); BatteryOverTemp.UpperBound = 120; BatteryOverTemp.LowerBound = 50; BatteryTemperatureGauge.AddRedLineRange(BatteryOverTemp); RedLineRange BatteryUnderTemp = new RedLineRange(); BatteryUnderTemp.LowerBound = -60; BatteryUnderTemp.UpperBound = 0; BatteryUnderTemp.TickLabelColor = Color.Blue; BatteryUnderTemp.OverrideTickLabelColor = true; BatteryUnderTemp.MinorTickColor = Color.Blue; BatteryUnderTemp.MajorTickColor = Color.Blue; BatteryTemperatureGauge.AddRedLineRange(BatteryUnderTemp); this.Controls.Add(BatteryTemperatureGauge); }
private void SetUpBatteryLevelGauge() { BatteryLevelGauge = new CenterDial(); BatteryLevelGauge.Size = GaugeSize; BatteryLevelGauge.MajorLabel = "Battery Level"; BatteryLevelGauge.MinorLabel = "Percent"; BatteryLevelGauge.CounterClockWise = true; BatteryLevelGauge.LabelColor = Color.White; BatteryLevelGauge.Min = 0; BatteryLevelGauge.Max = 120; BatteryLevelGauge.MinDisplayedValue = 0; BatteryLevelGauge.MaxDisplayedValue = 100; RedLineRange BatteryOK = new RedLineRange(); BatteryOK.MajorTickColor = Color.LightGreen; BatteryOK.MinorTickColor = Color.LightGreen; BatteryOK.TickLabelColor = Color.LightGreen; BatteryOK.OverrideTickLabelColor = true; BatteryOK.LowerBound = 51; BatteryOK.UpperBound = 100; BatteryLevelGauge.AddRedLineRange(BatteryOK); RedLineRange BatteryLow = new RedLineRange(); BatteryLow.TickLabelColor = Color.Yellow; BatteryLow.MajorTickColor = Color.Yellow; BatteryLow.MinorTickColor = Color.Yellow; BatteryLow.OverrideMajorTickColor = true; BatteryLow.LowerBound = 21; BatteryLow.UpperBound = 50; BatteryLevelGauge.AddRedLineRange(BatteryLow); RedLineRange BatteryCritical = new RedLineRange(); BatteryCritical.TickLabelColor = Color.Red; BatteryCritical.OverrideTickLabelColor = true; BatteryCritical.LowerBound = 0; BatteryCritical.UpperBound = 20; BatteryLevelGauge.AddRedLineRange(BatteryCritical); this.Controls.Add(BatteryLevelGauge); }
private void SetUpBatteryCurrentGauge() { BatteryCurrentGauge = new CenterDial(); BatteryCurrentGauge.MajorLabel = "Batt Current"; BatteryCurrentGauge.MinorLabel = "Amperes"; BatteryCurrentGauge.Min = 0; BatteryCurrentGauge.Max = 120; BatteryCurrentGauge.MinDisplayedValue = 0; BatteryCurrentGauge.MaxDisplayedValue = 70; BatteryCurrentGauge.LowestValueAngle = 15; RedLineRange BatteryOverCurrent = new RedLineRange(); BatteryOverCurrent.LowerBound = 50; BatteryOverCurrent.UpperBound = 120; BatteryCurrentGauge.AddRedLineRange(BatteryOverCurrent); this.Controls.Add(BatteryCurrentGauge); }
private void SetUpAltitudeGauge() { AltitudeGauge = new CenterDial(); AltitudeGauge.MajorLabel = "Altitude"; AltitudeGauge.MinorLabel = "metres"; AltitudeGauge.Max = 60; AltitudeGauge.Min = 0; AltitudeGauge.MinDisplayedValue = 0; AltitudeGauge.MaxDisplayedValue = 50; this.Controls.Add(AltitudeGauge); }