public ReportCalorieSheet(TestContext context, string head1, string head2, float idDB, float idWB, EIndoorUse idUse, EIndoorMode idMode, float odDB, float odWB, EOutdoorUse odUse, EEtcUse odDp, string nozzleName, string nozzleState) : base(context, head1, head2, idDB, idWB, idUse, idMode, odDB, odWB, odUse, odDp, nozzleName, nozzleState) { }
public ReportThermoSheet(TestContext context, string head1, string head2, float idDB, float idWB, EIndoorUse idUse, EIndoorMode idMode, float odDB, float odWB, EOutdoorUse odUse, EEtcUse odDp, string nozzleName, string nozzleState) : base(context, head1, head2, idDB, idWB, idUse, idMode, odDB, odWB, odUse, odDp, nozzleName, nozzleState) { this.context = context; this.head1 = head1; this.head2 = head2; }
public void RefreshCondition() { ConditionSchedule sch = context.Condition.Schedules[context.Index]; ConditionNote note = context.Condition.Note; Note.Company = note.Company; Note.Name = note.Name; Note.No = note.No; Note.Observer = note.Observer; Note.Maker = note.Maker; Note.Model1 = note.Model1; Note.Serial1 = note.Serial1; Note.Model2 = note.Model2; Note.Serial2 = note.Serial2; Note.Model3 = note.Model3; Note.Serial3 = note.Serial3; Note.ExpDevice = note.ExpDevice; Note.Refrigerant = note.Refrigerant; Note.RefCharge = note.RefCharge; Note.Memo = note.Memo; EIndoorMode mode = sch.IndoorMode; if (mode == EIndoorMode.NotUsed) { mode = EIndoorMode.Cooling; } ConditionRated rated = context.Condition.Rateds[EConditionRated.Total][(int)mode]; Rated.Capacity = rated.Capacity; Rated.PowerInput = rated.PowerInput; Rated.EER_COP = rated.EER_COP; Rated.Voltage = rated.Voltage; Rated.Current = rated.Current; Rated.Frequency = rated.Frequency; Rated.PM_IDU = rated.PM_IDU; Rated.PM_ODU = rated.PM_ODU; Rated.Wiring = rated.Wiring; (ValueSheets["ID A #1"] as ReportCalorieSheet).Set(sch.Indoor1DB, sch.Indoor1WB, sch.OutdoorDB, sch.OutdoorWB); (ValueSheets["ID A #2"] as ReportCalorieSheet).Set(sch.Indoor1DB, sch.Indoor1WB, sch.OutdoorDB, sch.OutdoorWB); (ValueSheets["ID B #1"] as ReportCalorieSheet).Set(sch.Indoor2DB, sch.Indoor2WB, sch.OutdoorDB, sch.OutdoorWB); (ValueSheets["ID B #2"] as ReportCalorieSheet).Set(sch.Indoor2DB, sch.Indoor2WB, sch.OutdoorDB, sch.OutdoorWB); (ValueSheets["ID A TC"] as ReportThermoSheet).Set(sch.Indoor1DB, sch.Indoor1WB, sch.OutdoorDB, sch.OutdoorWB); (ValueSheets["ID A TC"] as ReportThermoSheet).Reinitialize(); (ValueSheets["ID B TC"] as ReportThermoSheet).Set(sch.Indoor2DB, sch.Indoor2WB, sch.OutdoorDB, sch.OutdoorWB); (ValueSheets["ID B TC"] as ReportThermoSheet).Reinitialize(); (ValueSheets["OD TC"] as ReportThermoSheet).Set(sch.Indoor1DB, sch.Indoor1WB, sch.OutdoorDB, sch.OutdoorWB); (ValueSheets["OD TC"] as ReportThermoSheet).Reinitialize(); }
public ReportSheet(TestContext context, string head1, string head2, float idDB, float idWB, EIndoorUse idUse, EIndoorMode idMode, float odDB, float odWB, EOutdoorUse odUse, EEtcUse odDp, string nozzleName, string nozzleState) { RecNo = -1; IndoorDB = idDB; IndoorWB = idWB; IndoorUse = idUse; IndoorMode = idMode; OutdoorDB = odDB; OutdoorWB = odWB; OutdoorUse = odUse; OutdoorDP = odDp; NozzleName = nozzleName; NozzleState = nozzleState; Rows = new Dictionary <string, ReportRow>(); TcTags = null; if (string.IsNullOrWhiteSpace(head2) == true) { switch (head1) { case "ID1": TcTags = context.Condition.TC1; break; case "ID2": TcTags = context.Condition.TC2; break; case "OD": TcTags = context.Condition.TC3; break; } } Initialize(context.Value, head1, head2); }
public void Initialize() { RecNo = -1; RegTime = DateTime.Now; ConditionSchedule sch = context.Condition.Schedules[context.Index]; ReportSheet sheet; ConditionMethod method = context.Condition.Method; Method.IntegralCount = method.IntegralCount; Method.IntegralTime = method.IntegralTime; Method.ScanTime = method.ScanTime; Method.CoolingCapacity = method.CoolingCapacity; Method.HeatingCapacity = method.HeatingCapacity; Method.AirFlow = method.AirFlow; Method.Enthalpy = method.Enthalpy; Method.Pressure = method.Pressure; Method.DiffPressure = method.DiffPressure; Method.AtmPressure = method.AtmPressure; Method.AutoControllerSetting = method.AutoControllerSetting; Method.UsePowerMeterIntegral = method.UsePowerMeterIntegral; ConditionNote note = context.Condition.Note; Note.Company = note.Company; Note.Name = note.Name; Note.No = note.No; Note.Observer = note.Observer; Note.Maker = note.Maker; Note.Model1 = note.Model1; Note.Serial1 = note.Serial1; Note.Model2 = note.Model2; Note.Serial2 = note.Serial2; Note.Model3 = note.Model3; Note.Serial3 = note.Serial3; Note.ExpDevice = note.ExpDevice; Note.Refrigerant = note.Refrigerant; Note.RefCharge = note.RefCharge; Note.Memo = note.Memo; EIndoorMode mode = sch.IndoorMode; if (mode == EIndoorMode.NotUsed) { mode = EIndoorMode.Cooling; } EUnitCapacity unitCapa = (mode == EIndoorMode.Cooling) ? method.CoolingCapacity : method.HeatingCapacity; context.Value.SetUnitTo(EUnitType.Capacity, (int)unitCapa); context.Value.SetUnitTo(EUnitType.EER_COP, (int)unitCapa); ConditionRated rated = context.Condition.Rateds[EConditionRated.Total][(int)mode]; Rated.Capacity = rated.Capacity; Rated.PowerInput = rated.PowerInput; Rated.EER_COP = rated.EER_COP; Rated.Voltage = rated.Voltage; Rated.Current = rated.Current; Rated.Frequency = rated.Frequency; Rated.PM_IDU = rated.PM_IDU; Rated.PM_ODU = rated.PM_ODU; Rated.Wiring = rated.Wiring; lock (ValueSheets) { string nozzleName; string nozzleState = "O,O,O,O"; List <CoefficientDataRow> coeff = Resource.Settings.Coefficients; ValueSheets.Clear(); nozzleName = $"Nozzle ({coeff[0].Nozzle1:f0}/{coeff[0].Nozzle2:f0}/{coeff[0].Nozzle3:f0}/{coeff[0].Nozzle4:f0})"; sheet = new ReportCalorieSheet(context, "ID1", "ID11", sch.Indoor1DB, sch.Indoor1WB, sch.Indoor1Use, sch.Indoor1Mode1, sch.OutdoorDB, sch.OutdoorWB, sch.OutdoorUse, sch.OutdoorDpSensor, nozzleName, nozzleState); sheet.Use = (sch.Indoor1Use == EIndoorUse.Indoor) ? true : false; ValueSheets.Add("ID A #1", sheet); nozzleName = $"Nozzle ({coeff[1].Nozzle1:f0}/{coeff[1].Nozzle2:f0}/{coeff[1].Nozzle3:f0}/{coeff[1].Nozzle4:f0})"; sheet = new ReportCalorieSheet(context, "ID1", "ID12", sch.Indoor1DB, sch.Indoor1WB, sch.Indoor1Use, sch.Indoor1Mode2, sch.OutdoorDB, sch.OutdoorWB, sch.OutdoorUse, sch.OutdoorDpSensor, nozzleName, nozzleState); sheet.Use = (sch.Indoor1Use == EIndoorUse.Indoor) ? true : false; ValueSheets.Add("ID A #2", sheet); nozzleName = $"Nozzle ({coeff[2].Nozzle1:f0}/{coeff[2].Nozzle2:f0}/{coeff[2].Nozzle3:f0}/{coeff[2].Nozzle4:f0})"; sheet = new ReportCalorieSheet(context, "ID2", "ID21", sch.Indoor2DB, sch.Indoor2WB, sch.Indoor2Use, sch.Indoor2Mode1, sch.OutdoorDB, sch.OutdoorWB, sch.OutdoorUse, sch.OutdoorDpSensor, nozzleName, nozzleState); sheet.Use = (sch.Indoor2Use == EIndoorUse.Indoor) ? true : false; ValueSheets.Add("ID B #1", sheet); nozzleName = $"Nozzle ({coeff[3].Nozzle1:f0}/{coeff[3].Nozzle2:f0}/{coeff[3].Nozzle3:f0}/{coeff[3].Nozzle4:f0})"; sheet = new ReportCalorieSheet(context, "ID2", "ID22", sch.Indoor2DB, sch.Indoor2WB, sch.Indoor2Use, sch.Indoor2Mode2, sch.OutdoorDB, sch.OutdoorWB, sch.OutdoorUse, sch.OutdoorDpSensor, nozzleName, nozzleState); sheet.Use = (sch.Indoor2Use == EIndoorUse.Indoor) ? true : false; ValueSheets.Add("ID B #2", sheet); sheet = new ReportThermoSheet(context, "ID1", "", sch.Indoor1DB, sch.Indoor1WB, sch.Indoor1Use, sch.Indoor1Mode1, sch.OutdoorDB, sch.OutdoorWB, sch.OutdoorUse, sch.OutdoorDpSensor, "", ""); if (sheet.Use == true) { sheet.Use = (sch.Indoor1Use == EIndoorUse.Indoor) ? true : false; } ValueSheets.Add("ID A TC", sheet); sheet = new ReportThermoSheet(context, "ID2", "", sch.Indoor2DB, sch.Indoor2WB, sch.Indoor2Use, sch.Indoor2Mode1, sch.OutdoorDB, sch.OutdoorWB, sch.OutdoorUse, sch.OutdoorDpSensor, "", ""); if (sheet.Use == true) { sheet.Use = (sch.Indoor2Use == EIndoorUse.Indoor) ? true : false; } ValueSheets.Add("ID B TC", sheet); sheet = new ReportThermoSheet(context, "OD", "", sch.Indoor1DB, sch.Indoor1WB, sch.Indoor1Use, sch.Indoor1Mode1, sch.OutdoorDB, sch.OutdoorWB, sch.OutdoorUse, sch.OutdoorDpSensor, "", ""); if (sheet.Use == true) { sheet.Use = (sch.OutdoorUse == EOutdoorUse.Outdoor) ? true : false; } ValueSheets.Add("OD TC", sheet); } DataRaw.Clear(); foreach (KeyValuePair <string, ValueRow> row in context.Value.Calcurated) { if (row.Value.Save == true) { DataRaw.Rows.Add(row.Key, new DataRaw(-1, row.Value)); } } foreach (KeyValuePair <string, ValueRow> row in context.Value.Measured) { if (row.Value.Save == true) { DataRaw.Rows.Add(row.Key, new DataRaw(-1, row.Value)); } } DataRaw.Count = DataRaw.Rows.Count / 600; if ((DataRaw.Rows.Count % 600) != 0) { DataRaw.Count++; } }