private void comboBoxDryingFuelSelection_SelectedIndexChanged(object sender, EventArgs e) { string fossilFuelName = comboBoxDryingFuelSelection.SelectedItem.ToString(); FossilFuel fossilFuel = fuelCatalog.GetFossilFuel(fossilFuelName); DetailedFuelStream myFuleStream = streamCtrl.DetailedFuelStream; myFuleStream.DryingFuel = fossilFuel; }
public DetailedFuelStreamControl(Flowsheet flowsheet, Point location, DetailedFuelStream detailedFuelStream) : this(flowsheet, location, detailedFuelStream, StreamOrientation.Right) { //InitializeComponent(); //this.Size = new System.Drawing.Size(UI.STREAM_CTRL_W, UI.STREAM_CTRL_H); //UI.SetStatusColor(this, this.WaterStream.SolveState); //this.Orientation = StreamOrientation.Right; //this.UpdateBackImage(); //this.flowsheet.ConnectionManager.UpdateConnections(this); }
public DetailedFuelStreamControl(Flowsheet flowsheet, Point location, DetailedFuelStream detailedFuelStream, StreamOrientation orientation) : base(flowsheet, location, detailedFuelStream, orientation) { InitializeComponent(); this.Size = new System.Drawing.Size(UI.STREAM_CTRL_W, UI.STREAM_CTRL_H); UI.SetStatusColor(this, this.DetailedFuelStream.SolveState); //this.Orientation = StreamOrientation.Right; this.UpdateBackImage(); this.flowsheet.ConnectionManager.UpdateConnections(this); this.Name = "Fuel Stream: " + detailedFuelStream.Name; }
private void EvaporationAndDryingSystem_StreamAdded(ProcessStreamBase processStreamBase) { Point location = new System.Drawing.Point(this.flowsheet.X, this.flowsheet.Y); ProcessStreamBaseControl control = null; if (processStreamBase is DryingGasStream) { DryingGasStream stream = (DryingGasStream)processStreamBase; control = new GasStreamControl(this.flowsheet, location, stream); } else if (processStreamBase is DryingMaterialStream) { DryingMaterialStream stream = (DryingMaterialStream)processStreamBase; control = new MaterialStreamControl(this.flowsheet, location, stream); } else if (processStreamBase is WaterStream) { WaterStream stream = (WaterStream)processStreamBase; control = new WaterStreamControl(this.flowsheet, location, stream); } else if (processStreamBase is DetailedFuelStream) { DetailedFuelStream stream = (DetailedFuelStream)processStreamBase; control = new DetailedFuelStreamControl(this.flowsheet, location, stream); } // adjust the location if at the limit of the flowsheet if (this.flowsheet.X > this.flowsheet.Width - control.Width / 2) { int newX = this.flowsheet.Width - control.Width; Point newLocation = new Point(newX, control.Location.Y); control.Location = newLocation; } if (this.flowsheet.Y > this.flowsheet.Height - control.Height / 2) { int newY = this.flowsheet.Height - control.Height; Point newLocation = new Point(control.Location.X, newY); control.Location = newLocation; } this.flowsheet.Controls.Add(control); this.flowsheet.IsDirty = true; }