Exemple #1
0
        public WetScrubberValuesControl(WetScrubberControl wetScrubberCtrl)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            this.wetScrubberCtrl = wetScrubberCtrl;
            this.InitializeTheUI(wetScrubberCtrl);
        }
Exemple #2
0
 public void InitializeTheUI(WetScrubberControl wetScrubberCtrl)
 {
     this.inConstruction = true;
     this.InitializeVariableTextBoxes(wetScrubberCtrl);
     this.wetScrubberCtrl.WetScrubber.SolveComplete += new SolveCompleteEventHandler(WetScrubber_SolveComplete);
     this.comboBoxScrubberType.SelectedIndex         = -1;
     this.inConstruction = false;
     this.SetScrubberType(wetScrubberCtrl.WetScrubber.ScrubberType);
 }
Exemple #3
0
 public void InitializeVariableTextBoxes(WetScrubberControl ctrl)
 {
     this.textBoxGasPressureDrop.InitializeVariable(ctrl.Flowsheet, ctrl.WetScrubber.GasPressureDrop);
     this.textBoxCollectionEfficiency.InitializeVariable(ctrl.Flowsheet, ctrl.WetScrubber.CollectionEfficiency);
     this.textBoxInletParticleLoading.InitializeVariable(ctrl.Flowsheet, ctrl.WetScrubber.InletParticleLoading);
     this.textBoxOutletParticleLoading.InitializeVariable(ctrl.Flowsheet, ctrl.WetScrubber.OutletParticleLoading);
     this.textBoxParticleCollectionRate.InitializeVariable(ctrl.Flowsheet, ctrl.WetScrubber.ParticleCollectionRate);
     this.textBoxMassFlowRateOfParticleLostToGasOutlet.InitializeVariable(ctrl.Flowsheet, ctrl.WetScrubber.MassFlowRateOfParticleLostToGasOutlet);
     this.textBoxLiquidToGasRatio.InitializeVariable(ctrl.Flowsheet, ctrl.WetScrubber.LiquidToGasRatio);
 }
Exemple #4
0
        public WetScrubberEditor(WetScrubberControl wetScrubberCtrl) : base(wetScrubberCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            WetScrubber wetScrubber = this.WetScrubberCtrl.WetScrubber;

            this.Text = "Wet Scrubber: " + wetScrubber.Name;
            this.UpdateStreamsUI();

            this.groupBoxWetScrubber          = new System.Windows.Forms.GroupBox();
            this.groupBoxWetScrubber.Location = new System.Drawing.Point(724, 24);
            this.groupBoxWetScrubber.Name     = "groupBoxWetScrubber";
            this.groupBoxWetScrubber.Text     = "Wet Scrubber";
            this.groupBoxWetScrubber.Size     = new System.Drawing.Size(280, 200);
            this.groupBoxWetScrubber.TabIndex = 128;
            this.groupBoxWetScrubber.TabStop  = false;
            this.panel.Controls.Add(this.groupBoxWetScrubber);

            // TO DO: to customizs the height? or not

            //         if (wetScrubber.GasInlet is DryingGasStream)
            //         {
            //            this.groupBoxGasStream.Size = new System.Drawing.Size(360, 280);
            //            this.panel.Size = new System.Drawing.Size(1010, 309);
            //            this.ClientSize = new System.Drawing.Size(1010, 331);
            //         }
            //         else if (wetScrubber.GasInlet is DryingMaterialStream)
            //         {
            this.groupBoxGasStream.Size = new System.Drawing.Size(360, 300);
            this.panel.Size             = new System.Drawing.Size(1010, 329);
            this.ClientSize             = new System.Drawing.Size(1010, 351);
            //         }
            this.groupBoxLiquidStream.Size = new System.Drawing.Size(360, 300);

            WetScrubberLabelsControl wetScrubberLabelsCtrl = new WetScrubberLabelsControl(this.WetScrubberCtrl.WetScrubber);

            this.groupBoxWetScrubber.Controls.Add(wetScrubberLabelsCtrl);
            wetScrubberLabelsCtrl.Location = new Point(4, 12 + 20 + 2);

            WetScrubberValuesControl wetScrubberValuesCtrl = new WetScrubberValuesControl(this.WetScrubberCtrl);

            this.groupBoxWetScrubber.Controls.Add(wetScrubberValuesCtrl);
            wetScrubberValuesCtrl.Location = new Point(196, 12 + 20 + 2);

            wetScrubberCtrl.WetScrubber.StreamAttached += new StreamAttachedEventHandler(WetScrubber_StreamAttached);
            wetScrubberCtrl.WetScrubber.StreamDetached += new StreamDetachedEventHandler(WetScrubber_StreamDetached);

            this.menuItemRating        = new MenuItem();
            this.menuItemRating.Index  = this.menuItemReport.Index + 1;
            this.menuItemRating.Text   = "Rating";
            this.menuItemRating.Click += new EventHandler(menuItemRating_Click);
            this.mainMenu.MenuItems.Add(this.menuItemRating);

            this.comboBoxCalculationType        = new System.Windows.Forms.ComboBox();
            this.labelCalculationType           = new System.Windows.Forms.Label();
            this.labelCalculationType.BackColor = Color.DarkGray;

            // comboBoxCalculationType
            this.comboBoxCalculationType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxCalculationType.Items.AddRange(new object[] {
                "Balance",
                "Rating"
            });
            this.comboBoxCalculationType.Location              = new System.Drawing.Point(492, 0);
            this.comboBoxCalculationType.Name                  = "comboBoxCalculationType";
            this.comboBoxCalculationType.Size                  = new System.Drawing.Size(80, 21);
            this.comboBoxCalculationType.TabIndex              = 7;
            this.comboBoxCalculationType.SelectedIndexChanged += new EventHandler(comboBoxCalculationType_SelectedIndexChanged);

            // labelCalculationType
            this.labelCalculationType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.labelCalculationType.Location    = new System.Drawing.Point(300, 0);
            this.labelCalculationType.Name        = "labelCalculationType";
            this.labelCalculationType.Size        = new System.Drawing.Size(192, 20);
            this.labelCalculationType.TabIndex    = 5;
            this.labelCalculationType.Text        = "Calculation Type:";
            this.labelCalculationType.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;

            this.panel.Controls.Add(this.labelCalculationType);
            this.panel.Controls.Add(this.comboBoxCalculationType);

            this.comboBoxCalculationType.SelectedIndex = -1;
            this.inConstruction = false;
            this.SetCalculationType(this.WetScrubberCtrl.WetScrubber.CalculationType);
        }