public PumpDimensionsControl(PumpControl pumpCtrl) { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); this.pump = pumpCtrl.Pump; this.InitializeVariableLabels(pumpCtrl.Pump); this.InitializeVariableTextBoxes(pumpCtrl); }
public void InitializeVariableTextBoxes(PumpControl ctrl) { this.textBoxCapacity.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.Capacity); this.textBoxDischargeFrictionHead.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.DischargeFrictionHead); this.textBoxEfficiency.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.Efficiency); this.textBoxPowerInput.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.PowerInput); this.textBoxStaticDischargeHead.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.StaticDischargeHead); this.textBoxStaticSuctionHead.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.StaticSuctionHead); this.textBoxSuctionFrictionHead.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.SuctionFrictionHead); this.textBoxTotalDynamicHead.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.TotalDynamicHead); }
public PumpEditor(PumpControl pumpCtrl) : base(pumpCtrl) { // // Required for Windows Form Designer support // //InitializeComponent(); int rowCount; this.inConstruction = true; Pump pump = this.PumpCtrl.Pump; this.Text = "Pump: " + pump.Name; rowCount = initializeGrid(pumpCtrl, columnIndex, false, "Pump"); //this.groupBoxTwoStreamUnitOp.Size = new System.Drawing.Size(280, 300); //this.groupBoxTwoStreamUnitOp.Text = "Pump"; //PumpLabelsControl pumpLabelsCtrl = new PumpLabelsControl(pumpCtrl.Pump); //this.groupBoxTwoStreamUnitOp.Controls.Add(pumpLabelsCtrl); //pumpLabelsCtrl.Location = new Point(4, 12 + 20 + 2); //PumpValuesControl pumpValuesCtrl = new PumpValuesControl(this.PumpCtrl); //this.groupBoxTwoStreamUnitOp.Controls.Add(pumpValuesCtrl); //pumpValuesCtrl.Location = new Point(196, 12 + 20 + 2); // this.checkBoxIncludeDimensions = new CheckBox(); this.checkBoxIncludeDimensions.Location = new System.Drawing.Point(4, 198); this.checkBoxIncludeDimensions.Name = "checkBoxIncludeDimensions"; this.checkBoxIncludeDimensions.Text = "Include Outlet Velocity Effect"; //this.groupBoxTwoStreamUnitOp.Controls.Add(this.checkBoxIncludeDimensions); this.checkBoxIncludeDimensions.Checked = this.PumpCtrl.Pump.IncludeOutletVelocityEffect; this.checkBoxIncludeDimensions.CheckedChanged += new EventHandler(checkBoxIncludeDimensions_CheckedChanged); this.checkBoxIncludeDimensions.Size = new Size(192, 20); this.tableLayoutPanel.Controls.Add(this.checkBoxIncludeDimensions, columnIndex, rowCount); //this.labelDimensions = new System.Windows.Forms.Label(); //this.labelDimensions.BorderStyle = System.Windows.Forms.BorderStyle.None; //this.labelDimensions.Location = new System.Drawing.Point(4, 234); //this.labelDimensions.Name = "labelDimensions"; //this.labelDimensions.Size = new System.Drawing.Size(192, 20); //this.labelDimensions.Text = "Dimensions:"; //this.labelDimensions.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; //this.groupBoxTwoStreamUnitOp.Controls.Add(this.labelDimensions); //this.pumpDimensionsCtrl = new PumpDimensionsControl(this.PumpCtrl); //this.pumpDimensionsCtrl.Location = new Point(4, 254); //this.groupBoxTwoStreamUnitOp.Controls.Add(this.pumpDimensionsCtrl); //this.UpdateTheUI(); this.inConstruction = false; }
public PumpValuesControl(PumpControl pumpCtrl) : this() { this.InitializeVariableTextBoxes(pumpCtrl); }
public void InitializeVariableTextBoxes(PumpControl ctrl) { this.textBoxOutletDiameter.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.OutletDiameter); this.textBoxOutletVelocity.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Pump.OutletVelocity); }