Пример #1
0
        public void OnStageCompleted(object set, StageInfoEventArgs sea)
        {
            BatterySet   bat   = (BatterySet)set;
            ResultsPoint point = Results[bat.CurrentCycle - 1];

            ExperimentStageBase stage = sea.Stage;

            switch (bat.TypeOfBattery)
            {
            case BatteryType.SingleBattery:
            {
                if (stage is ChargeStage)
                {
                    point.ChargeDurationSingle = stage.Duration;
                    point.ChargeVolumeSingle   = stage.TotalCharge;
                }

                if (stage is DischargeStage)
                {
                    point.DischargeDurationSingle = stage.Duration;
                    point.DischargeVolumeSingle   = stage.TotalCharge;
                }
            }
            break;

            case BatteryType.BatteryUsingCNM:
            {
                if (stage is ChargeStage)
                {
                    point.ChargeDurationCNM = stage.Duration;
                    point.ChargeVolumeCNM   = stage.TotalCharge;
                }

                if (stage is DischargeStage)
                {
                    point.DischargeDurationCNM = stage.Duration;
                    point.DischargeVolumeCNM   = stage.TotalCharge;
                }
            }
            break;

            default:
                break;
            }

            Save("ToLoad2.csv");
        }
Пример #2
0
 public StageInfoEventArgs(ExperimentStageBase s)
 {
     Stage = s;
 }