Esempio n. 1
0
 private void listViewUnitOps_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (this.listViewUnitOps.SelectedItems.Count > 0)
     {
         this.Cursor  = Cursors.WaitCursor;
         this.Enabled = false;
         this.panelVariables.Visible = false;
         this.panelVariables.Controls.Clear();
         this.panelVariables.Controls.Add(this.formulaEditorHeaderControl);
         ListViewSolvableItem item = (ListViewSolvableItem)this.listViewUnitOps.SelectedItems[0];
         UnitOperation        uo   = item.Solvable as UnitOperation;
         IEnumerator          en   = uo.GetAllVariables().GetEnumerator();
         while (en.MoveNext())
         {
             ProcessVar pv = (ProcessVar)en.Current;
             FormulaEditorElementControl ctrl = new FormulaEditorElementControl(pv, this.evapAndDryingSystem.FormulaTable);
             ctrl.Dock = DockStyle.Top;
             this.panelVariables.Controls.Add(ctrl);
             ctrl.BringToFront();
         }
         this.panelVariables.Visible = true;
         this.Enabled = true;
         this.Cursor  = Cursors.Default;
     }
 }
Esempio n. 2
0
        private void PopulateUnitOpList(EvaporationAndDryingSystem evapAndDryingSystem)
        {
            IEnumerator e = evapAndDryingSystem.GetUnitOpList().GetEnumerator();

            while (e.MoveNext())
            {
                Solvable solvable = (Solvable)e.Current;
                if (!(solvable is Recycle))
                {
                    ListViewSolvableItem item = new ListViewSolvableItem(solvable);
                    this.listViewUnitOps.Items.Add(item);
                }
            }
        }