예제 #1
0
        public BurnerEditor(BurnerControl bCtrl)
            : base(bCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //this.inConstruction = true;
            //Burner b = this.BurnerCtrl.Burner;
            //this.Text = "Combustor: " + b.Name;
            this.Text = this.solvableCtrl.SolvableDispalyTitle;

            this.UpdateStreamsUI();

            this.groupBoxBurner          = new System.Windows.Forms.GroupBox();
            this.groupBoxBurner.Location = new System.Drawing.Point(644, 24);
            this.groupBoxBurner.Name     = "groupBoxBurner";
            this.groupBoxBurner.Text     = this.solvableCtrl.SolvableTypeName;
            this.groupBoxBurner.Size     = new System.Drawing.Size(280, 240);
            this.groupBoxBurner.TabIndex = 127;
            this.groupBoxBurner.TabStop  = false;
            this.panel.Controls.Add(this.groupBoxBurner);

            ProcessVarLabelsControl bLabelsCtrl = new ProcessVarLabelsControl(this.BurnerCtrl.Burner.VarList);

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

            ProcessVarValuesControl bValuesCtrl = new ProcessVarValuesControl(this.BurnerCtrl);

            this.groupBoxBurner.Controls.Add(bValuesCtrl);
            bValuesCtrl.Location = new Point(196, 12 + 20 + 2);
            this.ClientSize      = new System.Drawing.Size(930, 330);
        }
예제 #2
0
        public BurnerEditor(BurnerControl bCtrl)
            : base(bCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            Burner b = this.BurnerCtrl.Burner;

            this.Text = "Fired Heater: " + b.Name;

            this.UpdateStreamsUI();

            this.groupBoxBurner          = new System.Windows.Forms.GroupBox();
            this.groupBoxBurner.Location = new System.Drawing.Point(644, 24);
            //this.groupBoxBurner.Location = new System.Drawing.Point(1010, 24);
            this.groupBoxBurner.Name     = "groupBoxBurner";
            this.groupBoxBurner.Text     = "Scrubber Condenser";
            this.groupBoxBurner.Size     = new System.Drawing.Size(280, 240);
            this.groupBoxBurner.TabIndex = 127;
            this.groupBoxBurner.TabStop  = false;
            this.panel.Controls.Add(this.groupBoxBurner);

            ProcessVarLabelsControl bLabelsCtrl = new ProcessVarLabelsControl(this.BurnerCtrl.Burner.VarList);

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

            ProcessVarValuesControl bValuesCtrl = new ProcessVarValuesControl(this.BurnerCtrl);

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

            bCtrl.Burner.StreamAttached += new StreamAttachedEventHandler(Burner_StreamAttached);
            bCtrl.Burner.StreamDetached += new StreamDetachedEventHandler(Burner_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(300, 0);
            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(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);

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

            this.comboBoxCalculationType.SelectedIndex = -1;
            comboBoxCalculationType.Enabled            = false; // TODO: remove later
            this.inConstruction = false;
            this.SetCalculationType(this.BurnerCtrl.Burner.CalculationType);
        }