Esempio n. 1
0
 public void InitializeVariableTextBoxes(CycloneControl ctrl)
 {
     this.textBoxPressureDrop.InitializeVariable(ctrl.Flowsheet, ctrl.Cyclone.GasPressureDrop);
     this.textBoxMassFlowRateOfParticleLostToGasOutlet.InitializeVariable(ctrl.Flowsheet, ctrl.Cyclone.MassFlowRateOfParticleLostToGasOutlet);
     this.textBoxInletParticleLoading.InitializeVariable(ctrl.Flowsheet, ctrl.Cyclone.InletParticleLoading);
     this.textBoxOutletParticleLoading.InitializeVariable(ctrl.Flowsheet, ctrl.Cyclone.OutletParticleLoading);
     this.textBoxCollectionEfficiency.InitializeVariable(ctrl.Flowsheet, ctrl.Cyclone.CollectionEfficiency);
 }
Esempio n. 2
0
 public void SetParticleDistribution(CycloneControl cycloneCtrl)
 {
     this.flowsheet = cycloneCtrl.Flowsheet;
     this.particleDistributionCache     = cycloneCtrl.Cyclone.CurrentRatingModel.GetParticleDistributionCache();
     this.cycloneTotalEfficiencyControl = new CycloneTotalEfficiencyControl(this.flowsheet, this.particleDistributionCache);
     this.UpdateTheUI(cycloneCtrl.Flowsheet, particleDistributionCache);
     this.particleDistributionCache.ParticleDistributionChanged += new ParticleDistributionChangedEventHandler(particleDistributionCache_ParticleDistributionChanged);
 }
Esempio n. 3
0
        public CycloneParticleDistributionEditor(CycloneControl cycloneCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.particleDistributionControl.SetParticleDistribution(cycloneCtrl);
        }
Esempio n. 4
0
        public CycloneRatingEditor(CycloneControl cycloneCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.ShowInTaskbar = false;
            this.cycloneCtrl   = cycloneCtrl;
            CycloneRatingModel rating = cycloneCtrl.Cyclone.CurrentRatingModel;

            this.cycloneRatingLabelsControl.InitializeVariableLabels(rating);
            this.cycloneRatingValuesControl.InitializeTheUI(this.cycloneCtrl.Flowsheet, cycloneCtrl.Cyclone);

            this.Text = "Cyclone Rating: " + this.cycloneCtrl.Cyclone.Name;

            this.menuItemParticleDistribution        = new MenuItem();
            this.menuItemParticleDistribution.Index  = 1;
            this.menuItemParticleDistribution.Text   = "Particle Distributions";
            this.menuItemParticleDistribution.Click += new EventHandler(menuItemParticleDistribution_Click);
            this.mainMenu.MenuItems.Add(this.menuItemParticleDistribution);
        }
Esempio n. 5
0
 public CycloneValuesControl(CycloneControl cycloneCtrl) : this()
 {
     this.cycloneCtrl = cycloneCtrl;
     this.InitializeVariableTextBoxes(cycloneCtrl);
 }
Esempio n. 6
0
        public CycloneEditor(CycloneControl cycloneCtrl)
            : base(cycloneCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            Cyclone cyclone = this.CycloneCtrl.Cyclone;

            this.Text = "Cyclone: " + cyclone.Name;

            this.UpdateStreamsUI();

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

            if (cyclone.ParticleOutlet is DryingGasStream)
            {
                this.groupBoxParticle.Size = new System.Drawing.Size(280, 300);
                this.panel.Size            = new System.Drawing.Size(930, 329);
                this.ClientSize            = new System.Drawing.Size(930, 351);
            }
            else if (cyclone.ParticleOutlet is DryingMaterialStream)
            {
                this.groupBoxParticle.Size = new System.Drawing.Size(280, 300);
                this.panel.Size            = new System.Drawing.Size(930, 329);
                this.ClientSize            = new System.Drawing.Size(930, 351);
            }

            //ProcessVarLabelsControl cycloneLabelsCtrl = new ProcessVarLabelsControl(this.CycloneCtrl.Cyclone.VarList);
            CycloneLabelsControl cycloneLabelsCtrl = new CycloneLabelsControl(this.CycloneCtrl.Cyclone);

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

            //ProcessVarValuesControl cycloneValuesCtrl = new ProcessVarValuesControl(this.CycloneCtrl);
            CycloneValuesControl cycloneValuesCtrl = new CycloneValuesControl(this.CycloneCtrl);

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

            cycloneCtrl.Cyclone.StreamAttached += new StreamAttachedEventHandler(Cyclone_StreamAttached);
            cycloneCtrl.Cyclone.StreamDetached += new StreamDetachedEventHandler(Cyclone_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;
            this.inConstruction = false;
            this.SetCalculationType(this.CycloneCtrl.Cyclone.CalculationType);
            this.comboBoxCalculationType.Enabled = true;
        }