private void psychrometricChartModel_SolveComplete(object sender, SolveState solveState) { if (solveState.Equals(SolveState.Solved) || solveState.Equals(SolveState.SolvedWithWarning)) { if (this.psychrometricChartModel.HCType == HCType.GasState) { this.UpdateCurrentState(); } else if (this.psychrometricChartModel.HCType == HCType.IsenthalpicProcess) { this.UpdateProcess(); } } else { this.ResetActivity(); if (this.psychrometricChartModel.HCType == HCType.GasState) { this.currentState = new HumidityChartState(HCStateType.CurrentState, flowsheet); this.UpdateCurrentState(); } else if (this.psychrometricChartModel.HCType == HCType.IsenthalpicProcess) { this.process = new HumidityChartProcess(this.flowsheet); this.UpdateProcess(); } } }
private void HumidityChartTypeChanged() { this.ResetActivity(); if (this.psychrometricChartModel.HCType == HCType.ChartOnly) { this.hcCurrentStateEditor.Visible = false; this.hcProcessEditor.Visible = false; this.currentStateCtrl.Visible = false; this.inStateCtrl.Visible = false; this.outStateCtrl.Visible = false; } else if (this.psychrometricChartModel.HCType == HCType.State) { this.hcCurrentStateEditor.Visible = true; this.hcProcessEditor.Visible = false; this.currentStateCtrl.Visible = true; this.inStateCtrl.Visible = false; this.outStateCtrl.Visible = false; this.currentState = new HumidityChartState(HCStateType.CurrentState, this.flowsheet); this.UpdateCurrentState(); } else if (this.psychrometricChartModel.HCType == HCType.Process) { this.hcCurrentStateEditor.Visible = false; this.hcProcessEditor.Visible = true; this.currentStateCtrl.Visible = false; this.inStateCtrl.Visible = true; this.outStateCtrl.Visible = true; this.process = new HumidityChartProcess(this.flowsheet); this.UpdateProcess(); } }
private void ResetActivity() { this.plotCtrl.Graph.ShowCurrentCoordinate(""); this.currentState = null; this.process = null; this.plotCtrl.Graph.ShowOtherData = false; this.plotCtrl.Graph.OtherData = null; this.plotCtrl.Graph.ShowPoints = false; this.plotCtrl.Graph.Points = null; this.plotCtrl.RefreshPlot(); }