Ejemplo n.º 1
0
 void showBatteryInfo(double chargeLevel, BatteryPowerSource batteryPowerSource, BatteryState batteryState)
 {
     labelBatteryInfo.Text = string.Format("Batterieladung {0}%{3}PowerSource {1}{3}Status {2}",
                                           100.0 * chargeLevel,
                                           batteryPowerSource.ToString(),
                                           batteryState.ToString(),
                                           System.Environment.NewLine);
 }
Ejemplo n.º 2
0
        public virtual void Save(BinaryWriter outf)
        {
            BatterySwitch.Save(outf);

            outf.Write(FrontElectricTrainSupplyCableConnected);

            outf.Write(ElectricTrainSupplyState.ToString());
            outf.Write(LowVoltagePowerSupplyState.ToString());
            outf.Write(BatteryState.ToString());
        }
Ejemplo n.º 3
0
        public virtual void Save(BinaryWriter outf)
        {
            BatterySwitch.Save(outf);

            outf.Write(FrontElectricTrainSupplyCableConnected);

            outf.Write(ElectricTrainSupplyState.ToString());
            outf.Write(LowVoltagePowerSupplyState.ToString());
            outf.Write(BatteryState.ToString());
            outf.Write(VentilationState.ToString());
            outf.Write(HeatingState.ToString());
            outf.Write(AirConditioningState.ToString());

            outf.Write(HeatFlowRateW);
        }
Ejemplo n.º 4
0
        private void UpdateStatusBarBatteryState(BatteryState batteryState)
        {
            Image previous = _statusElementBattery.Image, next = null;

            switch (batteryState)
            {
                case BatteryState.Empty:
                    next = Properties.Resources.BATTERY_EMPTY;
                    break;
                case BatteryState.Low:
                    next = Properties.Resources.BATTERY_LOW;
                    break;
                case BatteryState.Medium:
                    next = Properties.Resources.BATTERY_MEDIUM;
                    break;
                case BatteryState.High:
                    next = Properties.Resources.BATTERY_HIGH;
                    break;
                case BatteryState.FullyCharged:
                    next = Properties.Resources.BATTERY_FULLYCHARGED;
                    break;
            }

            if (previous == null)
            {
                this._statusElementBattery.Image = next;
                LoggingManager.LogEvent(LogEventType.DEBUG, "Initialized BatteryState icon to: " + batteryState.ToString());
            }
            else if (previous != next)
            {
                this._statusElementBattery.Image = next;
                LoggingManager.LogEvent(LogEventType.DEBUG, "Updated BatteryState icon to: " + batteryState.ToString());
            }
        }