예제 #1
0
        public DryerScopingEditor(DryerControl dryerCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;

            this.dryer = dryerCtrl.Dryer;
            this.Text  = "Dryer Scoping: " + dryerCtrl.Dryer.Name;

            this.dryerScopingCommonLabelsControl.InitializeVariableLabels(this.dryer.ScopingModel);
            this.dryerScopingCommonValuesControl.InitializeVariableTextBoxes(dryerCtrl.Flowsheet, this.dryer.ScopingModel);
            this.SetCrossSectionType(this.dryer.ScopingModel.CrossSectionType);

            this.dryerScopingCircularLabelsControl.InitializeVariableLabels(this.dryer.ScopingModel);
            this.dryerScopingCircularValuesControl.InitializeVariableTextBoxes(dryerCtrl.Flowsheet, this.dryer.ScopingModel);
            this.dryerScopingRectangularLabelsControl.InitializeVariableLabels(this.dryer.ScopingModel);
            this.dryerScopingRectangularValuesControl.InitializeVariableTextBoxes(dryerCtrl.Flowsheet, this.dryer.ScopingModel);

            this.dryer.SolveComplete += new SolveCompleteEventHandler(dryer_SolveComplete);

            this.inConstruction = false;
        }
예제 #2
0
        public DryerEditor(DryerControl dryerCtrl) : base(dryerCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            this.inConstruction = true;
            this.DryerCtrl      = dryerCtrl;
            Dryer dryer = dryerCtrl.Dryer;

            this.Text = "Dryer: " + dryer.Name;

            this.UpdateStreamsUI();

            initializeGrid(dryerCtrl, columnIndex, false, "Dryer");


            dryerCtrl.Dryer.StreamAttached += new StreamAttachedEventHandler(Dryer_StreamAttached);
            dryerCtrl.Dryer.StreamDetached += new StreamDetachedEventHandler(Dryer_StreamDetached);

            this.menuItemScoping        = new MenuItem();
            this.menuItemScoping.Index  = this.menuItemReport.Index + 1;
            this.menuItemScoping.Text   = "Scoping";
            this.menuItemScoping.Click += new EventHandler(menuItemScoping_Click);
            this.mainMenu.MenuItems.Add(this.menuItemScoping);

            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",
                "Scoping"
            });
            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;
            this.inConstruction = false;
            this.SetCalculationType(this.DryerCtrl.Dryer.DryerCalculationType);
        }
예제 #3
0
 public void InitializeVariableTextBoxes(DryerControl ctrl)
 {
     this.textBoxMoistureEvaporationRate.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.MoistureEvaporationRate);
     this.textBoxSpecificHeatConsumption.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.SpecificHeatConsumption);
     this.textBoxThermalEfficiency.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.ThermalEfficiency);
     this.textBoxGasPressureDrop.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.GasPressureDrop);
     this.textBoxHeatLoss.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.HeatLoss);
     this.textBoxHeatInput.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.HeatInput);
     this.textBoxWorkInput.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.WorkInput);
     this.textBoxHeatLossByTransportDevice.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.HeatLossByTransportDevice);
     this.textFractionOfMaterialLostToGasOutlet.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.FractionOfMaterialLostToGasOutlet);
     this.textBoxGasOutletMaterialLoading.InitializeVariable(ctrl.Flowsheet.ApplicationPrefs, ctrl.Dryer.GasOutletMaterialLoading);
 }
예제 #4
0
 public DryerValuesControl(DryerControl dryerCtrl) : this()
 {
     this.InitializeVariableTextBoxes(dryerCtrl);
 }
예제 #5
0
        public DryerEditor(DryerControl dryerCtrl) : base(dryerCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            Dryer dryer = this.DryerCtrl.Dryer;

            this.Text = "Dryer: " + dryer.Name;

            this.UpdateStreamsUI();

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

            // for the other UOs we do some resizing here!

            DryerLabelsControl dryerLabelsCtrl = new DryerLabelsControl(this.DryerCtrl.Dryer);

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

            DryerValuesControl dryerValuesCtrl = new DryerValuesControl(this.DryerCtrl);

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

            dryerCtrl.Dryer.StreamAttached += new StreamAttachedEventHandler(Dryer_StreamAttached);
            dryerCtrl.Dryer.StreamDetached += new StreamDetachedEventHandler(Dryer_StreamDetached);

            this.menuItemScoping        = new MenuItem();
            this.menuItemScoping.Index  = this.menuItemReport.Index + 1;
            this.menuItemScoping.Text   = "Scoping";
            this.menuItemScoping.Click += new EventHandler(menuItemScoping_Click);
            this.mainMenu.MenuItems.Add(this.menuItemScoping);

            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",
                "Scoping"
            });
            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;
            this.inConstruction = false;
            this.SetCalculationType(this.DryerCtrl.Dryer.DryerCalculationType);
        }