示例#1
0
        public DefaultFlowsheetSettingsForm(MainForm mainForm, FlowsheetSettings newProcessSettings)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.mainForm             = mainForm;
            this.newFlowsheetSettings = newProcessSettings;

            //this.dryingGasesControl.ListViewGases.MultiSelect = false;
            this.dryingMaterialsControl.ListViewMaterials.MultiSelect = false;

            //this.dryingGasesControl.SelectDryingGas(this.newProcessSettings.DryingGasName);
            this.dryingMaterialsControl.SelectDryingMaterial(this.newFlowsheetSettings.DryingMaterialName);

            string materialName           = this.newFlowsheetSettings.DryingMaterialName;
            DryingMaterialCatalog catalog = DryingMaterialCatalog.Instance;

            if (!catalog.IsInCatalog(materialName))
            {
                materialName = "Generic Drying Material";
            }
            string moistureName = catalog.GetDryingMaterial(materialName).Moisture.ToString();

            this.textBoxMoisture.Text = moistureName;
            //string gasName = DryingGasCatalog.Instance.GetDryingGasForMoisture(moistureName).ToString();
            //this.textBoxDryingGas.Text = gasName;
            InitializeDryingGasComboBox(moistureName);

            this.textBoxDryingMaterial.Text = materialName;
            this.ResizeEnd += new EventHandler(NewProcessSettingsForm_ResizeEnd);
        }
示例#2
0
        public DefaultFlowsheetSettingsForm(MainForm mainForm, FlowsheetSettings newProcessSettings)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.mainForm             = mainForm;
            this.newFlowsheetSettings = newProcessSettings;

            this.dryingMaterialsControl              = new ProsimoUI.MaterialsUI.DryingMaterialsControl();
            this.dryingMaterialsControl.Anchor       = System.Windows.Forms.AnchorStyles.Left;
            this.dryingMaterialsControl.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.dryingMaterialsControl.Location     = new System.Drawing.Point(2, 34);
            this.dryingMaterialsControl.Name         = "dryingMaterialsControl";
            this.dryingMaterialsControl.Size         = new System.Drawing.Size(456, 349);
            this.dryingMaterialsControl.TabIndex     = 0;
            this.groupBoxSelectDryingMaterial.Controls.Add(this.dryingMaterialsControl);

            this.dryingMaterialsControl.Initialization();
            this.dryingMaterialsControl.ListViewMaterials.MultiSelect = false;
            this.dryingMaterialsControl.SelectDryingMaterial(this.newFlowsheetSettings.DryingMaterialName);

            this.comboBoxDryingFuel.Items.AddRange(FossilFuelCatalog.Instance.GetFossilFuelArray());
            this.comboBoxDryingFuel.SelectedIndex = 0;

            string materialName           = this.newFlowsheetSettings.DryingMaterialName;
            DryingMaterialCatalog catalog = DryingMaterialCatalog.Instance;

            if (!catalog.IsInCatalog(materialName))
            {
                materialName = DryingMaterial.GENERIC_DRYING_MATERIAL;
            }
            string moistureName = catalog.GetDryingMaterial(materialName).Moisture.ToString();

            this.textBoxMoisture.Text = moistureName;
            //string gasName = DryingGasCatalog.Instance.GetDryingGasForMoisture(moistureName).ToString();
            //this.textBoxDryingGas.Text = gasName;
            InitializeDryingGasComboBox(moistureName);
            InitializeDryingFuelComboBox(this.newFlowsheetSettings.FossilFuelName);

            this.textBoxDryingMaterial.Text = materialName;
            this.ResizeEnd += new EventHandler(NewProcessSettingsForm_ResizeEnd);
        }