public TeeEditor(TeeControl teeCtrl) : base(teeCtrl) { // // Required for Windows Form Designer support // InitializeComponent(); this.Size = new Size(296, this.formHeight); this.FormBorderStyle = FormBorderStyle.Sizable; this.Text = "Tee"; this.panel.AutoScroll = true; Tee tee = this.TeeCtrl.Tee; this.Text = "Tee: " + tee.Name; this.userCtrlFractions = new UserControl(); this.userCtrlFractions.AutoScroll = true; this.userCtrlFractions.Size = new Size(242, this.groupBoxHeight - 40); this.userCtrlFractions.Location = new Point(4, 12 + 20 + 2); this.groupBoxStreams = new GroupBox(); this.groupBoxStreams.Text = "Inlet/Outlets"; this.groupBoxStreams.Location = new System.Drawing.Point(4, 24); this.groupBoxStreams.Size = new System.Drawing.Size(280, this.groupBoxHeight); this.panel.Controls.Add(this.groupBoxStreams); this.groupBoxFractions = new GroupBox(); this.groupBoxFractions.Text = "Outlet Fractions"; this.groupBoxFractions.Location = new System.Drawing.Point(this.groupBoxStreams.Width + 4, 24); this.groupBoxFractions.Size = new System.Drawing.Size(250, this.groupBoxHeight); this.groupBoxFractions.Controls.Add(this.userCtrlFractions); this.panel.Controls.Add(this.groupBoxFractions); textBoxStreamInName = new ProsimoUI.SolvableNameTextBox(); this.outletControls = new Hashtable(); if (tee.Inlet is DryingGasStream) { this.formHeight = 368; this.groupBoxHeight = 280; this.ClientSize = new System.Drawing.Size(292, 253); } else if (tee.Inlet is DryingMaterialStream) { this.formHeight = 388; this.groupBoxHeight = 300; this.ClientSize = new System.Drawing.Size(292, 273); } this.groupBoxStreams.Size = new System.Drawing.Size(360, this.groupBoxHeight); this.groupBoxFractions.Location = new System.Drawing.Point(this.groupBoxStreams.Width + 4, 24); this.groupBoxFractions.Size = new System.Drawing.Size(250, this.groupBoxHeight); this.UpdateTheUI(); teeCtrl.Tee.StreamAttached += new StreamAttachedEventHandler(Tee_StreamAttached); teeCtrl.Tee.StreamDetached += new StreamDetachedEventHandler(Tee_StreamDetached); }
public MixerEditor(MixerControl mixerCtrl) : base(mixerCtrl) { // // Required for Windows Form Designer support // InitializeComponent(); this.Size = new Size(296, this.formHeight); this.FormBorderStyle = FormBorderStyle.Sizable; this.Text = "Mixer"; this.panel.AutoScroll = true; Mixer mixer = this.MixerCtrl.Mixer; this.Text = "Mixer: " + mixer.Name; this.groupBox = new GroupBox(); this.groupBox.Text = "Inlets/Outlet"; this.groupBox.Location = new System.Drawing.Point(4, 24); this.groupBox.Size = new System.Drawing.Size(280, this.groupBoxHeight); this.panel.Controls.Add(this.groupBox); this.textBoxStreamOutName = new ProsimoUI.SolvableNameTextBox(); this.inletControls = new Hashtable(); if (mixer.Outlet is DryingGasStream) { this.formHeight = 368; this.groupBoxHeight = 280; this.ClientSize = new System.Drawing.Size(292, 253); } else if (mixer.Outlet is DryingMaterialStream) { this.formHeight = 388; this.groupBoxHeight = 300; this.ClientSize = new System.Drawing.Size(292, 273); } this.groupBox.Size = new System.Drawing.Size(360, this.groupBoxHeight); this.UpdateUI(); mixerCtrl.Mixer.StreamAttached += new StreamAttachedEventHandler(Mixer_StreamAttached); mixerCtrl.Mixer.StreamDetached += new StreamDetachedEventHandler(Mixer_StreamDetached); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.groupBoxStreams = new System.Windows.Forms.GroupBox(); this.textBoxLiquidOutName = new ProsimoUI.SolvableNameTextBox(); this.textBoxVaporOutName = new ProsimoUI.SolvableNameTextBox(); this.textBoxInName = new ProsimoUI.SolvableNameTextBox(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).BeginInit(); this.panel.SuspendLayout(); this.groupBoxStreams.SuspendLayout(); this.SuspendLayout(); // // groupBoxStreams // this.groupBoxStreams.Controls.Add(this.textBoxLiquidOutName); this.groupBoxStreams.Controls.Add(this.textBoxVaporOutName); this.groupBoxStreams.Controls.Add(this.textBoxInName); this.groupBoxStreams.Location = new System.Drawing.Point(4, 24); this.groupBoxStreams.Name = "groupBoxStreams"; this.groupBoxStreams.Size = new System.Drawing.Size(440, 300); this.groupBoxStreams.TabIndex = 118; this.groupBoxStreams.TabStop = false; this.groupBoxStreams.Text = "Inlet/Vapor Outlet/Liquid Outlet"; // // textBoxLiquidOutName // this.textBoxLiquidOutName.Location = new System.Drawing.Point(356, 12); this.textBoxLiquidOutName.Name = "textBoxLiquidOutName"; this.textBoxLiquidOutName.Size = new System.Drawing.Size(80, 20); this.textBoxLiquidOutName.TabIndex = 6; this.textBoxLiquidOutName.Text = ""; // // textBoxVaporOutName // this.textBoxVaporOutName.Location = new System.Drawing.Point(276, 12); this.textBoxVaporOutName.Name = "textBoxVaporOutName"; this.textBoxVaporOutName.Size = new System.Drawing.Size(80, 20); this.textBoxVaporOutName.TabIndex = 7; this.textBoxVaporOutName.Text = ""; // // textBoxInName // this.textBoxInName.Location = new System.Drawing.Point(196, 12); this.textBoxInName.Name = "textBoxInName"; this.textBoxInName.Size = new System.Drawing.Size(80, 20); this.textBoxInName.TabIndex = 6; this.textBoxInName.Text = ""; // // panel // this.panel.Controls.Add(this.groupBoxStreams); this.panel.Size = new System.Drawing.Size(448, 289); // // FlashTankEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(5F, 13F); this.ClientSize = new System.Drawing.Size(448, 351); this.Name = "FlashTankEditor"; this.Text = "FlashTank"; this.groupBoxStreams.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).EndInit(); this.panel.ResumeLayout(false); this.ResumeLayout(false); }
private void UpdateTheUI() { this.panel.Visible = false; this.userCtrlFractions.Visible = false; this.userCtrlFractions.Controls.Clear(); this.groupBoxStreams.Visible = false; this.groupBoxStreams.Controls.Clear(); this.outletControls.Clear(); int x = INITIAL_LOCATION; int w = VALUE_WIDTH; int s = INITIAL_GROUPBOX_WIDTH; int p = INITIAL_FORM_WIDTH; Tee tee = this.TeeCtrl.Tee; bool hasStreamIn = false; bool hasStreamOut = false; ProcessStreamBase streamOut = null; if (tee.OutletStreams.Count > 0) { hasStreamOut = true; streamOut = (ProcessStreamBase)tee.OutletStreams[0]; this.userCtrlFractions.Visible = true; } ProcessStreamBase streamIn = tee.Inlet; if (streamIn != null) { hasStreamIn = true; } if (hasStreamIn || hasStreamOut) { this.groupBoxStreams.Visible = true; ProcessStreamBase labelsStream = null; if (hasStreamIn) { labelsStream = streamIn; } else if (hasStreamOut) { labelsStream = streamOut; } UserControl ctrl = null; if (labelsStream is ProcessStream) { ctrl = new ProcessStreamLabelsControl((ProcessStream)labelsStream); } else if (labelsStream is DryingGasStream) { ctrl = new GasStreamLabelsControl((DryingGasStream)labelsStream); } else if (labelsStream is DryingMaterialStream) { ctrl = new MaterialStreamLabelsControl((DryingMaterialStream)labelsStream); } ctrl.Location = new Point(4, 12 + 20 + 2); this.groupBoxStreams.Size = new Size(s, this.groupBoxHeight); this.groupBoxFractions.Location = new System.Drawing.Point(this.groupBoxStreams.Width + 4, 24); this.groupBoxStreams.Controls.Add(ctrl); s = s + w; p = p + w; } if (hasStreamIn) { UserControl ctrl = null; if (streamIn is ProcessStream) { ProcessStreamControl processInCtrl = (ProcessStreamControl)this.TeeCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(streamIn.Name); ctrl = new ProcessStreamValuesControl(processInCtrl); } else if (streamOut is DryingGasStream) { GasStreamControl gasInCtrl = (GasStreamControl)this.TeeCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(streamIn.Name); ctrl = new GasStreamValuesControl(gasInCtrl); } else if (streamOut is DryingMaterialStream) { MaterialStreamControl materialInCtrl = (MaterialStreamControl)this.TeeCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(streamIn.Name); ctrl = new MaterialStreamValuesControl(materialInCtrl); } ctrl.Location = new Point(x, 12 + 20 + 2); this.groupBoxStreams.Size = new Size(s, this.groupBoxHeight); this.groupBoxFractions.Location = new System.Drawing.Point(this.groupBoxStreams.Width + 4, 24); this.groupBoxStreams.Controls.Add(ctrl); this.Size = new Size(p, this.formHeight); this.textBoxStreamInName.Text = streamIn.Name; this.textBoxStreamInName.Location = new Point(x, 12); this.textBoxStreamInName.SetSolvable(streamIn); this.groupBoxStreams.Controls.Add(this.textBoxStreamInName); UI.SetStatusColor(this.textBoxStreamInName, streamIn.SolveState); } if (hasStreamOut) { IEnumerator e = tee.OutletStreams.GetEnumerator(); while (e.MoveNext()) { s = s + w; x = x + w; p = p + w; ProcessStreamBase processStreamBase = (ProcessStreamBase)e.Current; UserControl ctrl = null; if (processStreamBase is ProcessStream) { ProcessStreamControl processOutCtrl = (ProcessStreamControl)this.TeeCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(processStreamBase.Name); ctrl = new ProcessStreamValuesControl(processOutCtrl); } else if (processStreamBase is DryingGasStream) { GasStreamControl gasOutCtrl = (GasStreamControl)this.TeeCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(processStreamBase.Name); ctrl = new GasStreamValuesControl(gasOutCtrl); } else if (processStreamBase is DryingMaterialStream) { MaterialStreamControl materialOutCtrl = (MaterialStreamControl)this.TeeCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(processStreamBase.Name); ctrl = new MaterialStreamValuesControl(materialOutCtrl); } ctrl.Location = new Point(x, 12 + 20 + 2); this.groupBoxStreams.Size = new Size(s, this.groupBoxHeight); this.groupBoxFractions.Location = new System.Drawing.Point(this.groupBoxStreams.Width + 4, 24); this.groupBoxStreams.Controls.Add(ctrl); this.Size = new Size(p, this.formHeight); ProsimoUI.SolvableNameTextBox textBoxStreamOutName = new ProsimoUI.SolvableNameTextBox(processStreamBase); textBoxStreamOutName.Width = 80; textBoxStreamOutName.Height = 20; textBoxStreamOutName.Text = processStreamBase.Name; textBoxStreamOutName.Location = new Point(x, 12); this.outletControls.Add(textBoxStreamOutName, textBoxStreamOutName.Text); this.groupBoxStreams.Controls.Add(textBoxStreamOutName); UI.SetStatusColor(textBoxStreamOutName, processStreamBase.SolveState); } // build the fractions for (int i = 0; i < this.TeeCtrl.Tee.OutletStreamAndFractions.Count; i++) { StreamAndFraction sf = (StreamAndFraction)this.TeeCtrl.Tee.OutletStreamAndFractions[i]; TeeStreamAndFractionControl sfCtrl = new TeeStreamAndFractionControl(this.TeeCtrl.Flowsheet, sf); sfCtrl.Location = new Point(0, i * sfCtrl.Height); this.userCtrlFractions.Controls.Add(sfCtrl); sfCtrl.textBoxFraction.KeyUp += new KeyEventHandler(KeyUpNavigator); } } this.Size = new Size(p + this.groupBoxFractions.Width, this.formHeight); this.panel.Visible = true; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.groupBoxGasStream = new System.Windows.Forms.GroupBox(); this.textBoxGasOutName = new ProsimoUI.SolvableNameTextBox(); this.textBoxGasInName = new ProsimoUI.SolvableNameTextBox(); this.groupBoxLiquidStream = new System.Windows.Forms.GroupBox(); this.textBoxLiquidOutName = new ProsimoUI.SolvableNameTextBox(); this.textBoxLiquidInName = new ProsimoUI.SolvableNameTextBox(); this.groupBoxGasStream.SuspendLayout(); this.groupBoxLiquidStream.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).BeginInit(); this.panel.SuspendLayout(); this.SuspendLayout(); // // groupBoxGasStream // this.groupBoxGasStream.Controls.Add(this.textBoxGasOutName); this.groupBoxGasStream.Controls.Add(this.textBoxGasInName); this.groupBoxGasStream.Location = new System.Drawing.Point(4, 24); this.groupBoxGasStream.Name = "groupBoxGasStream"; this.groupBoxGasStream.Size = new System.Drawing.Size(360, 300); this.groupBoxGasStream.TabIndex = 118; this.groupBoxGasStream.TabStop = false; this.groupBoxGasStream.Text = "Gas Inlet/Outlet"; // // textBoxGasOutName // this.textBoxGasOutName.Location = new System.Drawing.Point(276, 12); this.textBoxGasOutName.Name = "textBoxGasOutName"; this.textBoxGasOutName.Size = new System.Drawing.Size(80, 20); this.textBoxGasOutName.TabIndex = 13; this.textBoxGasOutName.Text = ""; // // textBoxGasInName // this.textBoxGasInName.Location = new System.Drawing.Point(196, 12); this.textBoxGasInName.Name = "textBoxGasInName"; this.textBoxGasInName.Size = new System.Drawing.Size(80, 20); this.textBoxGasInName.TabIndex = 12; this.textBoxGasInName.Text = ""; // // groupBoxLiquidStream // this.groupBoxLiquidStream.Controls.Add(this.textBoxLiquidOutName); this.groupBoxLiquidStream.Controls.Add(this.textBoxLiquidInName); this.groupBoxLiquidStream.Location = new System.Drawing.Point(364, 24); this.groupBoxLiquidStream.Name = "groupBoxLiquidStream"; this.groupBoxLiquidStream.Size = new System.Drawing.Size(360, 280); this.groupBoxLiquidStream.TabIndex = 119; this.groupBoxLiquidStream.TabStop = false; this.groupBoxLiquidStream.Text = "Liquid Inlet/Outlet"; // // textBoxLiquidOutName // this.textBoxLiquidOutName.Location = new System.Drawing.Point(276, 12); this.textBoxLiquidOutName.Name = "textBoxLiquidOutName"; this.textBoxLiquidOutName.Size = new System.Drawing.Size(80, 20); this.textBoxLiquidOutName.TabIndex = 11; this.textBoxLiquidOutName.Text = ""; // // textBoxLiquidInName // this.textBoxLiquidInName.Location = new System.Drawing.Point(196, 12); this.textBoxLiquidInName.Name = "textBoxLiquidInName"; this.textBoxLiquidInName.Size = new System.Drawing.Size(80, 20); this.textBoxLiquidInName.TabIndex = 10; this.textBoxLiquidInName.Text = ""; // // panel // this.panel.Controls.Add(this.groupBoxLiquidStream); this.panel.Controls.Add(this.groupBoxGasStream); this.panel.Size = new System.Drawing.Size(1010, 329); // // WetScrubberEditor // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(1010, 351); this.Name = "WetScrubberEditor"; this.Text = "Heat Exchanger"; this.groupBoxGasStream.ResumeLayout(false); this.groupBoxLiquidStream.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).EndInit(); this.panel.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.groupBoxDryingMedium = new System.Windows.Forms.GroupBox(); this.textBoxGasOutName = new ProsimoUI.SolvableNameTextBox(); this.textBoxGasInName = new ProsimoUI.SolvableNameTextBox(); this.groupBoxMaterial = new System.Windows.Forms.GroupBox(); this.textBoxMaterialOutName = new ProsimoUI.SolvableNameTextBox(); this.textBoxMaterialInName = new ProsimoUI.SolvableNameTextBox(); this.groupBoxDryingMedium.SuspendLayout(); this.groupBoxMaterial.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).BeginInit(); this.panel.SuspendLayout(); this.SuspendLayout(); // // groupBoxDryingMedium // this.groupBoxDryingMedium.Controls.Add(this.textBoxGasOutName); this.groupBoxDryingMedium.Controls.Add(this.textBoxGasInName); this.groupBoxDryingMedium.Location = new System.Drawing.Point(364, 24); this.groupBoxDryingMedium.Name = "groupBoxDryingMedium"; this.groupBoxDryingMedium.Size = new System.Drawing.Size(360, 280); this.groupBoxDryingMedium.TabIndex = 118; this.groupBoxDryingMedium.TabStop = false; this.groupBoxDryingMedium.Text = "Drying Medium Inlet/Outlet"; // // textBoxGasOutName // this.textBoxGasOutName.Location = new System.Drawing.Point(276, 12); this.textBoxGasOutName.Name = "textBoxGasOutName"; this.textBoxGasOutName.Size = new System.Drawing.Size(80, 20); this.textBoxGasOutName.TabIndex = 13; this.textBoxGasOutName.Text = ""; // // textBoxGasInName // this.textBoxGasInName.Location = new System.Drawing.Point(196, 12); this.textBoxGasInName.Name = "textBoxGasInName"; this.textBoxGasInName.Size = new System.Drawing.Size(80, 20); this.textBoxGasInName.TabIndex = 12; this.textBoxGasInName.Text = ""; // // groupBoxMaterial // this.groupBoxMaterial.Controls.Add(this.textBoxMaterialOutName); this.groupBoxMaterial.Controls.Add(this.textBoxMaterialInName); this.groupBoxMaterial.Location = new System.Drawing.Point(4, 24); this.groupBoxMaterial.Name = "groupBoxMaterial"; this.groupBoxMaterial.Size = new System.Drawing.Size(360, 300); this.groupBoxMaterial.TabIndex = 119; this.groupBoxMaterial.TabStop = false; this.groupBoxMaterial.Text = "Material Inlet/Outlet"; // // textBoxMaterialOutName // this.textBoxMaterialOutName.Location = new System.Drawing.Point(276, 12); this.textBoxMaterialOutName.Name = "textBoxMaterialOutName"; this.textBoxMaterialOutName.Size = new System.Drawing.Size(80, 20); this.textBoxMaterialOutName.TabIndex = 11; this.textBoxMaterialOutName.Text = ""; // // textBoxMaterialInName // this.textBoxMaterialInName.Location = new System.Drawing.Point(196, 12); this.textBoxMaterialInName.Name = "textBoxMaterialInName"; this.textBoxMaterialInName.Size = new System.Drawing.Size(80, 20); this.textBoxMaterialInName.TabIndex = 10; this.textBoxMaterialInName.Text = ""; // // panel // this.panel.Controls.Add(this.groupBoxMaterial); this.panel.Controls.Add(this.groupBoxDryingMedium); this.panel.Size = new System.Drawing.Size(1010, 329); // // DryerEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(5F, 13F); this.ClientSize = new System.Drawing.Size(1010, 351); this.Name = "DryerEditor"; this.Text = "Dryer"; this.groupBoxDryingMedium.ResumeLayout(false); this.groupBoxMaterial.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).EndInit(); this.panel.ResumeLayout(false); this.ResumeLayout(false); }
private void UpdateUI() { this.panel.Visible = false; this.groupBox.Visible = false; this.groupBox.Controls.Clear(); this.inletControls.Clear(); int x = INITIAL_LOCATION; int w = VALUE_WIDTH; int s = INITIAL_GROUPBOX_WIDTH; int p = INITIAL_FORM_WIDTH; Mixer mixer = this.MixerCtrl.Mixer; bool hasStreamIn = false; bool hasStreamOut = false; ProcessStreamBase streamIn = null; if (mixer.InletStreams.Count > 0) { hasStreamIn = true; streamIn = (ProcessStreamBase)mixer.InletStreams[0]; } ProcessStreamBase streamOut = mixer.Outlet; if (streamOut != null) { hasStreamOut = true; } if (hasStreamIn || hasStreamOut) { this.groupBox.Visible = true; ProcessStreamBase labelsStream = null; if (hasStreamIn) { labelsStream = streamIn; } else if (hasStreamOut) { labelsStream = streamOut; } UserControl ctrl = null; if (labelsStream is ProcessStream) { ctrl = new ProcessStreamLabelsControl((ProcessStream)labelsStream); } else if (labelsStream is DryingGasStream) { ctrl = new GasStreamLabelsControl((DryingGasStream)labelsStream); } else if (labelsStream is DryingMaterialStream) { ctrl = new MaterialStreamLabelsControl((DryingMaterialStream)labelsStream); } ctrl.Location = new Point(4, 12 + 20 + 2); this.groupBox.Size = new Size(s, this.groupBoxHeight); this.groupBox.Controls.Add(ctrl); this.Size = new Size(p, this.formHeight); s = s + w; p = p + w; } if (hasStreamIn) { IEnumerator e = mixer.InletStreams.GetEnumerator(); while (e.MoveNext()) { ProcessStreamBase processStreamBase = (ProcessStreamBase)e.Current; UserControl ctrl = null; if (processStreamBase is ProcessStream) { ProcessStreamControl processInCtrl = (ProcessStreamControl)this.MixerCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(processStreamBase.Name); ctrl = new ProcessStreamValuesControl(processInCtrl); } else if (processStreamBase is DryingGasStream) { GasStreamControl gasInCtrl = (GasStreamControl)this.MixerCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(processStreamBase.Name); ctrl = new GasStreamValuesControl(gasInCtrl); } else if (processStreamBase is DryingMaterialStream) { MaterialStreamControl materialInCtrl = (MaterialStreamControl)this.MixerCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(processStreamBase.Name); ctrl = new MaterialStreamValuesControl(materialInCtrl); } ctrl.Location = new Point(x, 12 + 20 + 2); this.groupBox.Size = new Size(s, this.groupBoxHeight); this.groupBox.Controls.Add(ctrl); this.Size = new Size(p, this.formHeight); ProsimoUI.SolvableNameTextBox textBoxStreamInName = new ProsimoUI.SolvableNameTextBox(processStreamBase); textBoxStreamInName.Width = 80; textBoxStreamInName.Height = 20; textBoxStreamInName.Text = processStreamBase.Name; textBoxStreamInName.Location = new Point(x, 12); this.inletControls.Add(textBoxStreamInName, textBoxStreamInName.Text); this.groupBox.Controls.Add(textBoxStreamInName); UI.SetStatusColor(textBoxStreamInName, processStreamBase.SolveState); s = s + w; x = x + w; p = p + w; } } if (hasStreamOut) { UserControl ctrl = null; if (streamOut is ProcessStream) { ProcessStreamControl processOutCtrl = (ProcessStreamControl)this.MixerCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(streamOut.Name); ctrl = new ProcessStreamValuesControl(processOutCtrl); } else if (streamOut is DryingGasStream) { GasStreamControl gasOutCtrl = (GasStreamControl)this.MixerCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(streamOut.Name); ctrl = new GasStreamValuesControl(gasOutCtrl); } else if (streamOut is DryingMaterialStream) { MaterialStreamControl materialOutCtrl = (MaterialStreamControl)this.MixerCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(streamOut.Name); ctrl = new MaterialStreamValuesControl(materialOutCtrl); } ctrl.Location = new Point(x, 12 + 20 + 2); this.groupBox.Size = new Size(s, this.groupBoxHeight); this.groupBox.Controls.Add(ctrl); this.Size = new Size(p, this.formHeight); textBoxStreamOutName.Text = streamOut.Name; textBoxStreamOutName.Location = new Point(x, 12); this.textBoxStreamOutName.SetSolvable(streamOut); this.groupBox.Controls.Add(this.textBoxStreamOutName); UI.SetStatusColor(this.textBoxStreamOutName, streamOut.SolveState); } this.panel.Visible = true; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.groupBoxStreams = new System.Windows.Forms.GroupBox(); this.textBoxStreamOutName = new ProsimoUI.SolvableNameTextBox(); this.textBoxStreamInName = new ProsimoUI.SolvableNameTextBox(); this.groupBoxTwoStreamUnitOp = new System.Windows.Forms.GroupBox(); this.groupBoxStreams.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).BeginInit(); this.panel.SuspendLayout(); this.SuspendLayout(); // // groupBoxStreams // this.groupBoxStreams.Controls.Add(this.textBoxStreamOutName); this.groupBoxStreams.Controls.Add(this.textBoxStreamInName); this.groupBoxStreams.Location = new System.Drawing.Point(4, 24); this.groupBoxStreams.Name = "groupBoxStreams"; this.groupBoxStreams.Size = new System.Drawing.Size(360, 280); this.groupBoxStreams.TabIndex = 118; this.groupBoxStreams.TabStop = false; this.groupBoxStreams.Text = "Inlet/Outlet"; // // textBoxStreamOutName // this.textBoxStreamOutName.Location = new System.Drawing.Point(276, 12); this.textBoxStreamOutName.Name = "textBoxStreamOutName"; this.textBoxStreamOutName.Size = new System.Drawing.Size(80, 20); this.textBoxStreamOutName.TabIndex = 7; this.textBoxStreamOutName.Text = ""; // // textBoxStreamInName // this.textBoxStreamInName.Location = new System.Drawing.Point(196, 12); this.textBoxStreamInName.Name = "textBoxStreamInName"; this.textBoxStreamInName.Size = new System.Drawing.Size(80, 20); this.textBoxStreamInName.TabIndex = 6; this.textBoxStreamInName.Text = ""; // // groupBoxTwoStreamUnitOp // this.groupBoxTwoStreamUnitOp.Location = new System.Drawing.Point(364, 24); this.groupBoxTwoStreamUnitOp.Name = "groupBoxTwoStreamUnitOp"; this.groupBoxTwoStreamUnitOp.Size = new System.Drawing.Size(280, 280); this.groupBoxTwoStreamUnitOp.TabIndex = 127; this.groupBoxTwoStreamUnitOp.TabStop = false; // // panel // this.panel.Controls.Add(this.groupBoxTwoStreamUnitOp); this.panel.Controls.Add(this.groupBoxStreams); this.panel.Size = new System.Drawing.Size(650, 309); // // TwoStreamUnitOpEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(5F, 13F); this.ClientSize = new System.Drawing.Size(650, 331); this.Name = "TwoStreamUnitOpEditor"; this.Text = "TwoStreamUnitOp"; this.groupBoxStreams.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).EndInit(); this.panel.ResumeLayout(false); this.ResumeLayout(false); }