示例#1
0
        public HXRatingPlateAndFrameEditor(HeatExchangerControl heatExchangerCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            this.Text           = "Plate And Frame Rating: " + heatExchangerCtrl.HeatExchanger.Name;
            this.heatExchanger  = heatExchangerCtrl.HeatExchanger;

            HXRatingModelPlateAndFrame ratingModel = this.heatExchanger.CurrentRatingModel as HXRatingModelPlateAndFrame;

            this.checkBoxIncludeWallEffect.Checked = ratingModel.IncludeWallEffect;
            this.hxRating2LabelsControl.Visible    = this.checkBoxIncludeWallEffect.Checked;
            this.hxRating2ValuesControl.Visible    = this.checkBoxIncludeWallEffect.Checked;

            this.hxRatingSimpleGenericPlateAndFrameLabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRatingSimpleGenericPlateAndFrameValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, heatExchangerCtrl.HeatExchanger);

            this.hxRating2LabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRating2ValuesControl.InitializeVariableTextBoxes(heatExchangerCtrl.Flowsheet, ratingModel);

            this.hxRatingPlateAndFrameLabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRatingPlateAndFrameValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, this.heatExchanger);

            this.heatExchanger.SolveComplete += new SolveCompleteEventHandler(heatExchanger_SolveComplete);

            this.inConstruction = false;
        }
示例#2
0
 public HeatExchangerRatingEditor(HeatExchangerControl heatExchangerCtrl)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
 }
示例#3
0
        public HXRatingShellAndTubeEditor(HeatExchangerControl heatExchangerCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            this.Text           = "Shell And Tube Rating: " + heatExchangerCtrl.HeatExchanger.Name;
            this.heatExchanger  = heatExchangerCtrl.HeatExchanger;

            HXRatingModelShellAndTube ratingModel = this.heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube;

            this.checkBoxIncludeWallEffect.Checked = ratingModel.IncludeWallEffect;
            this.hxRating2LabelsControl.Visible    = this.checkBoxIncludeWallEffect.Checked;
            this.hxRating2ValuesControl.Visible    = this.checkBoxIncludeWallEffect.Checked;

            this.checkBoxIncludeNozzleEffect.Checked = ratingModel.IncludeNozzleEffect;
            this.hxRating3LabelsControl.Visible      = this.checkBoxIncludeNozzleEffect.Checked;
            this.hxRating3ValuesControl.Visible      = this.checkBoxIncludeNozzleEffect.Checked;

            this.hxRatingSimpleGenericShellAndTubeLabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRatingSimpleGenericShellAndTubeValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, heatExchangerCtrl.HeatExchanger);

            this.hxRating2LabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRating2ValuesControl.InitializeVariableTextBoxes(heatExchangerCtrl.Flowsheet, ratingModel);

            this.hxRatingShellAndTubeBellDelawareLabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRatingShellAndTubeBellDelawareValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, this.heatExchanger);

            this.hxRatingShellAndTubeDonohueLabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRatingShellAndTubeDonohueValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, this.heatExchanger);

            this.hxRatingShellAndTubeKernLabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRatingShellAndTubeKernValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, this.heatExchanger);

            this.hxRating3LabelsControl.InitializeVariableLabels(ratingModel);
            this.hxRating3ValuesControl.InitializeVariableTextBoxes(heatExchangerCtrl.Flowsheet, ratingModel);


            this.heatExchanger.SolveComplete += new SolveCompleteEventHandler(heatExchanger_SolveComplete);

            this.comboBoxRatingType.SelectedIndex = -1;
            this.inConstruction = false;
            this.SetRatingType(ratingModel.ShellRatingType);
        }
示例#4
0
 public HeatExchangerValuesControl(HeatExchangerControl heatExchangerCtrl) : this()
 {
     this.InitializeVariableTextBoxes(heatExchangerCtrl);
 }
示例#5
0
 public void InitializeVariableTextBoxes(HeatExchangerControl ctrl)
 {
     this.textBoxTotalHeatTransfer.InitializeVariable(ctrl.Flowsheet, ctrl.HeatExchanger.TotalHeatTransfer);
     this.textBoxColdSidePressureDrop.InitializeVariable(ctrl.Flowsheet, ctrl.HeatExchanger.ColdSidePressureDrop);
     this.textBoxHotSidePressureDrop.InitializeVariable(ctrl.Flowsheet, ctrl.HeatExchanger.HotSidePressureDrop);
 }
示例#6
0
        public HeatExchangerEditor(HeatExchangerControl heatExchangerCtrl) : base(heatExchangerCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            HeatExchanger heatExchanger = this.HeatExchangerCtrl.HeatExchanger;

            this.Text = "Heat Exchanger: " + heatExchanger.Name;
            this.UpdateStreamsUI();

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

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

//         if (heatExchanger.ColdSideInlet is DryingGasStream)
//         {
//            this.groupBoxColdStream.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 (heatExchanger.ColdSideInlet is DryingMaterialStream)
//         {
            this.groupBoxColdStream.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.groupBoxHotStream.Size = new System.Drawing.Size(360, 300);

            HeatExchangerLabelsControl heatExchangerLabelsCtrl = new HeatExchangerLabelsControl(this.HeatExchangerCtrl.HeatExchanger);

            //ProcessVarLabelsControl heatExchangerLabelsCtrl = new ProcessVarLabelsControl(this.HeatExchangerCtrl.HeatExchanger.VarList);
            this.groupBoxHeatExchanger.Controls.Add(heatExchangerLabelsCtrl);
            heatExchangerLabelsCtrl.Location = new Point(4, 12 + 20 + 2);

            HeatExchangerValuesControl heatExchangerValuesCtrl = new HeatExchangerValuesControl(this.HeatExchangerCtrl);

            //ProcessVarValuesControl heatExchangerValuesCtrl = new ProcessVarValuesControl(this.HeatExchangerCtrl);
            this.groupBoxHeatExchanger.Controls.Add(heatExchangerValuesCtrl);
            heatExchangerValuesCtrl.Location = new Point(196, 12 + 20 + 2);

            // shell and tube hot side
            this.groupBoxHotSide         = new System.Windows.Forms.GroupBox();
            this.radioButtonHotSideTube  = new System.Windows.Forms.RadioButton();
            this.radioButtonHotSideShell = new System.Windows.Forms.RadioButton();
            //
            // groupBoxHotSide
            //
            this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideTube);
            this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideShell);
            this.groupBoxHotSide.Location = new System.Drawing.Point(0, 0);
            this.groupBoxHotSide.Name     = "groupBoxHotSide";
            this.groupBoxHotSide.Size     = new System.Drawing.Size(104, 68);
            this.groupBoxHotSide.TabIndex = 0;
            this.groupBoxHotSide.TabStop  = false;
            this.groupBoxHotSide.Text     = "Hot Side";
            //
            // radioButtonHotSideTube
            //
            this.radioButtonHotSideTube.Location        = new System.Drawing.Point(8, 44);
            this.radioButtonHotSideTube.Name            = "radioButtonHotSideTube";
            this.radioButtonHotSideTube.Size            = new System.Drawing.Size(72, 20);
            this.radioButtonHotSideTube.TabIndex        = 1;
            this.radioButtonHotSideTube.Text            = "Tube";
            this.radioButtonHotSideTube.CheckedChanged += new System.EventHandler(this.HotSideHandler);
            //
            // radioButtonHotSideShell
            //
            this.radioButtonHotSideShell.Location        = new System.Drawing.Point(8, 20);
            this.radioButtonHotSideShell.Name            = "radioButtonHotSideShell";
            this.radioButtonHotSideShell.Size            = new System.Drawing.Size(72, 20);
            this.radioButtonHotSideShell.TabIndex        = 0;
            this.radioButtonHotSideShell.Text            = "Shell";
            this.radioButtonHotSideShell.CheckedChanged += new System.EventHandler(this.HotSideHandler);

            this.groupBoxHeatExchanger.Controls.Add(this.groupBoxHotSide);
            this.groupBoxHotSide.Location = new Point(20, 112);

            heatExchangerCtrl.HeatExchanger.StreamAttached += new StreamAttachedEventHandler(HeatExchanger_StreamAttached);
            heatExchangerCtrl.HeatExchanger.StreamDetached += new StreamDetachedEventHandler(HeatExchanger_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.comboBoxExchangerType          = new System.Windows.Forms.ComboBox();
            this.labelCalculationType           = new System.Windows.Forms.Label();
            this.labelCalculationType.BackColor = Color.DarkGray;
            this.labelExchangerType             = new System.Windows.Forms.Label();
            this.labelExchangerType.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);

            // comboBoxExchangerType
            this.comboBoxExchangerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxExchangerType.Items.AddRange(new object[] {
                "Simple Generic",
                "Shell And Tube",
                "Plate And Frame"
            });
            this.comboBoxExchangerType.Location              = new System.Drawing.Point(792, 0);
            this.comboBoxExchangerType.Name                  = "comboBoxExchangerType";
            this.comboBoxExchangerType.Size                  = new System.Drawing.Size(108, 21);
            this.comboBoxExchangerType.TabIndex              = 6;
            this.comboBoxExchangerType.SelectedIndexChanged += new EventHandler(comboBoxExchangerType_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;

            // labelExchangerType
            this.labelExchangerType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.labelExchangerType.Location    = new System.Drawing.Point(600, 0);
            this.labelExchangerType.Name        = "labelExchangerType";
            this.labelExchangerType.Size        = new System.Drawing.Size(192, 20);
            this.labelExchangerType.TabIndex    = 4;
            this.labelExchangerType.Text        = "Exchanger Type:";
            this.labelExchangerType.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;

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

            this.HeatExchangerCtrl.HeatExchanger.HXHotSideChanged += new HXHotSideChangedEventHandler(HeatExchanger_HXHotSideChanged);

            this.comboBoxCalculationType.SelectedIndex = -1;
            this.comboBoxExchangerType.SelectedIndex   = -1;
            this.inConstruction = false;

            this.SetExchangerType(this.HeatExchangerCtrl.HeatExchanger.ExchangerType);
            this.SetCalculationType(this.HeatExchangerCtrl.HeatExchanger.CalculationType);
            this.comboBoxCalculationType.Enabled = false;
            if (this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel != null)
            {
                if (this.HeatExchangerCtrl.HeatExchanger.ExchangerType == ExchangerType.ShellAndTube)
                {
                    HXRatingModelShellAndTube ratingModel = this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube;
                    this.SetHotSideShell(ratingModel.IsShellSideHot);
                }
            }
        }
示例#7
0
        public HeatExchangerEditor(HeatExchangerControl heatExchangerCtrl) : base(heatExchangerCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            //InitializeComponent();

            this.inConstruction = true;
            HeatExchanger heatExchanger = this.HeatExchangerCtrl.HeatExchanger;

            this.Text = "Heat Exchanger: " + heatExchanger.Name;
            this.UpdateStreamsUI();
            this.initializeGrid(heatExchangerCtrl, columnIndex, false, "Heat Exchanger");

            // shell and tube hot side
            this.groupBoxHotSide         = new System.Windows.Forms.GroupBox();
            this.radioButtonHotSideTube  = new System.Windows.Forms.RadioButton();
            this.radioButtonHotSideShell = new System.Windows.Forms.RadioButton();
            //
            // groupBoxHotSide
            //
            this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideTube);
            this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideShell);
            this.groupBoxHotSide.Location = new System.Drawing.Point(0, 0);
            this.groupBoxHotSide.Name     = "groupBoxHotSide";
            this.groupBoxHotSide.Size     = new System.Drawing.Size(104, 68);
            this.groupBoxHotSide.TabIndex = 0;
            this.groupBoxHotSide.TabStop  = false;
            this.groupBoxHotSide.Text     = "Hot Side";
            //
            // radioButtonHotSideTube
            //
            this.radioButtonHotSideTube.Location        = new System.Drawing.Point(8, 44);
            this.radioButtonHotSideTube.Name            = "radioButtonHotSideTube";
            this.radioButtonHotSideTube.Size            = new System.Drawing.Size(72, 20);
            this.radioButtonHotSideTube.TabIndex        = 1;
            this.radioButtonHotSideTube.Text            = "Tube";
            this.radioButtonHotSideTube.CheckedChanged += new System.EventHandler(this.HotSideHandler);
            //
            // radioButtonHotSideShell
            //
            this.radioButtonHotSideShell.Location        = new System.Drawing.Point(8, 20);
            this.radioButtonHotSideShell.Name            = "radioButtonHotSideShell";
            this.radioButtonHotSideShell.Size            = new System.Drawing.Size(72, 20);
            this.radioButtonHotSideShell.TabIndex        = 0;
            this.radioButtonHotSideShell.Text            = "Shell";
            this.radioButtonHotSideShell.CheckedChanged += new System.EventHandler(this.HotSideHandler);

            this.groupBoxHeatExchanger.Controls.Add(this.groupBoxHotSide);
            this.groupBoxHotSide.Location = new Point(20, 112);

            heatExchangerCtrl.HeatExchanger.StreamAttached += new StreamAttachedEventHandler(HeatExchanger_StreamAttached);
            heatExchangerCtrl.HeatExchanger.StreamDetached += new StreamDetachedEventHandler(HeatExchanger_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.comboBoxExchangerType          = new System.Windows.Forms.ComboBox();
            this.labelCalculationType           = new System.Windows.Forms.Label();
            this.labelCalculationType.BackColor = Color.DarkGray;
            this.labelExchangerType             = new System.Windows.Forms.Label();
            this.labelExchangerType.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(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);

            // comboBoxExchangerType
            this.comboBoxExchangerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxExchangerType.Items.AddRange(new object[] {
                "Simple Generic",
                "Shell And Tube",
                "Plate And Frame"
            });
            this.comboBoxExchangerType.Location              = new System.Drawing.Point(802, 8);
            this.comboBoxExchangerType.Name                  = "comboBoxExchangerType";
            this.comboBoxExchangerType.Size                  = new System.Drawing.Size(108, 21);
            this.comboBoxExchangerType.TabIndex              = 6;
            this.comboBoxExchangerType.SelectedIndexChanged += new EventHandler(comboBoxExchangerType_SelectedIndexChanged);

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

            // labelExchangerType
            this.labelExchangerType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.labelExchangerType.Location    = new System.Drawing.Point(610, 8);
            this.labelExchangerType.Name        = "labelExchangerType";
            this.labelExchangerType.Size        = new System.Drawing.Size(192, 20);
            this.labelExchangerType.TabIndex    = 4;
            this.labelExchangerType.Text        = "Exchanger Type:";
            this.labelExchangerType.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;

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

            this.HeatExchangerCtrl.HeatExchanger.HXHotSideChanged += new HXHotSideChangedEventHandler(HeatExchanger_HXHotSideChanged);

            this.comboBoxCalculationType.SelectedIndex = -1;
            this.comboBoxExchangerType.SelectedIndex   = -1;
            this.inConstruction = false;

            this.SetExchangerType(this.HeatExchangerCtrl.HeatExchanger.ExchangerType);
            this.SetCalculationType(this.HeatExchangerCtrl.HeatExchanger.CalculationType);
            if (this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel != null)
            {
                if (this.HeatExchangerCtrl.HeatExchanger.ExchangerType == ExchangerType.ShellAndTube)
                {
                    HXRatingModelShellAndTube ratingModel = this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube;
                    this.SetHotSideShell(ratingModel.IsShellSideHot);
                }
            }
        }