Exemplo n.º 1
0
 public EjectorValuesControl(EjectorControl ejectorCtrl) : this()
 {
     this.ejectorCtrl = ejectorCtrl;
     this.InitializeVariableTextBoxes(ejectorCtrl);
 }
Exemplo n.º 2
0
        public EjectorEditor(EjectorControl ejectorCtrl) : base(ejectorCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            //InitializeComponent();

            this.inConstruction = true;
            Ejector ejector = this.EjectorCtrl.Ejector;

            this.Text = "Ejector: " + ejector.Name;

            this.UpdateStreamsUI();

            //this.groupBoxEjector = new System.Windows.Forms.GroupBox();
            //this.groupBoxEjector.Location = new System.Drawing.Point(452, 24);
            //this.groupBoxEjector.Name = "groupBoxEjector";
            //this.groupBoxEjector.Text = "Ejector";
            //this.groupBoxEjector.Size = new System.Drawing.Size(280, 100);
            //this.groupBoxEjector.TabIndex = 127;
            //this.groupBoxEjector.TabStop = false;
            //this.panel.Controls.Add(this.groupBoxEjector);

            //EjectorLabelsControl ejectorLabelsCtrl = new EjectorLabelsControl(this.EjectorCtrl.Ejector);
            //this.groupBoxEjector.Controls.Add(ejectorLabelsCtrl);
            //ejectorLabelsCtrl.Location = new Point(4, 12 + 20 + 2);

            //EjectorValuesControl ejectorValuesCtrl = new EjectorValuesControl(this.EjectorCtrl);
            //this.groupBoxEjector.Controls.Add(ejectorValuesCtrl);
            //ejectorValuesCtrl.Location = new Point(196, 12 + 20 + 2);

            ejectorCtrl.Ejector.StreamAttached += new StreamAttachedEventHandler(Ejector_StreamAttached);
            ejectorCtrl.Ejector.StreamDetached += new StreamDetachedEventHandler(Ejector_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.labelCalculationType    = new System.Windows.Forms.Label();
            this.comboBoxCalculationType = new System.Windows.Forms.ComboBox();

            // labelCalculationType
            this.labelCalculationType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.labelCalculationType.Location    = new System.Drawing.Point(310, 8);
            this.labelCalculationType.Name        = "labelCalculationType";
            this.labelCalculationType.BackColor   = Color.DarkGray;
            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;

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

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

            this.comboBoxCalculationType.SelectedIndex = -1;
            comboBoxCalculationType.Enabled            = false; // TODO: remove later
            initializeGrid(ejectorCtrl, columnIndex, false, "Ejector");
            this.inConstruction = false;
            this.SetCalculationType(this.EjectorCtrl.Ejector.CalculationType);
        }
Exemplo n.º 3
0
 public void InitializeVariableTextBoxes(EjectorControl ctrl)
 {
     this.textBoxEntrainmentRatio.InitializeVariable(ctrl.Flowsheet, ctrl.Ejector.EntrainmentRatio);
     this.textBoxCompressionRatio.InitializeVariable(ctrl.Flowsheet, ctrl.Ejector.CompressionRatio);
     this.textBoxSuctionMotivePressureRatio.InitializeVariable(ctrl.Flowsheet, ctrl.Ejector.SuctionMotivePressureRatio);
 }