示例#1
0
        public CustomizeFlowsheetForm(Flowsheet flowsheet)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            if (flowsheet != null)
            {
                this.flowsheet = flowsheet;
                EvaporationAndDryingSystem system = this.flowsheet.EvaporationAndDryingSystem;

                //
                SelectSolvablesControl selectSolvablesControl = new SelectSolvablesControl(flowsheet);
                selectSolvablesControl.Location = new Point(4, 4);
                this.panel.Controls.Add(selectSolvablesControl);

                this.ResizeEnd += new EventHandler(CustomizeFlowsheetForm_ResizeEnd);
            }
        }
示例#2
0
        public FlowsheetOptionsForm(Flowsheet flowsheet)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            if (flowsheet != null)
            {
                this.flowsheet = flowsheet;
                EvaporationAndDryingSystem system = this.flowsheet.EvaporationAndDryingSystem;
                this.textBoxDryingGas.Text      = system.DryingGas.ToString();
                this.textBoxDryingMaterial.Text = system.DryingMaterial.ToString();
                this.SetPreferences();

                //
                SelectSolvablesControl selectSolvablesControl = new SelectSolvablesControl(flowsheet);
                selectSolvablesControl.Location = new Point(4, 4);
                this.tabPageEditor.Controls.Add(selectSolvablesControl);

                this.ResizeEnd += new EventHandler(FlowsheetOptionsForm_ResizeEnd);
            }
        }
示例#3
0
        public FlowsheetPreferencesForm(Flowsheet flowsheet)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            if (flowsheet != null)
            {
                this.flowsheet = flowsheet;
                EvaporationAndDryingSystem system = this.flowsheet.EvaporationAndDryingSystem;
                this.textBoxDryingGas.Text      = system.DryingGas.ToString();
                this.textBoxDryingMaterial.Text = system.DryingMaterial.ToString();
                this.SetPreferences();

                //
                unitSystemsCtrl = new UnitSystemsControl();
                this.tabPageUnits.Controls.Add(unitSystemsCtrl);
                unitSystemsCtrl.Location = new Point(0, 0);

                UnitSystem unitSystem = unitSystemsCtrl.GetSelectedUnitSystem();
                int        selIdx     = unitSystemsCtrl.GetSelectedIndex();
                this.buttonCurrentUnitSys.Enabled = false;
                if (selIdx >= 0)
                {
                    if (unitSystem != null)
                    {
                        this.buttonCurrentUnitSys.Enabled = true;
                    }
                }

                UnitSystem currentUnitSystem = UnitSystemService.GetInstance().CurrentUnitSystem;
                this.labelCurrent.Text = this.CURRENT_UNIT_SYS + currentUnitSystem.Name;
                unitSystemsCtrl.SelectedUnitSystemChanged += new SelectedUnitSystemChangedEventHandler(unitSystemsCtrl_SelectedUnitSystemChanged);

                //
                SelectSolvablesControl selectSolvablesControl = new SelectSolvablesControl(flowsheet);
                selectSolvablesControl.Location = new Point(4, 4);
                this.tabPageEditor.Controls.Add(selectSolvablesControl);

                this.domainUpDownDecPlaces.SelectedItem = this.flowsheet.DecimalPlaces;
                if (this.flowsheet.NumericFormat.Equals(NumericFormat.FixedPoint))
                {
                    this.radioButtonFixedPoint.Checked = true;
                }
                else if (this.flowsheet.NumericFormat.Equals(NumericFormat.Scientific))
                {
                    this.radioButtonScientific.Checked = true;
                }
            }

/*
 *       else
 *       {
 *          // 0 = types
 *          // 1 = unit systems
 *          // 2 = show in editor
 *          // 3 = numeric format
 *          this.tabControlPrefs.Controls.RemoveAt(3);
 *          this.tabControlPrefs.Controls.RemoveAt(2);
 *          this.tabControlPrefs.Controls.RemoveAt(1);
 *
 *          this.groupBoxHeatExchangerInletType.Visible = false;
 *          this.groupBoxUnitOpCreation.Visible = false;
 *          this.groupBoxTeeMixerValveStreamsType.Visible = false;
 *       }
 */
        }