Example #1
0
        private void InitializeTheUI(MaterialComponent materialComponent)
        {
            this.labelName.Text = materialComponent.Name;
            // TODO: from where to get the numeric format?
            MainNumericFormat iNumericFormat = new MainNumericFormat();

            this.textBoxFraction.InitializeVariable(iNumericFormat, materialComponent.MassFraction);
        }
Example #2
0
        public void SetDuhringLinesCache(DryingMaterialCache dryingMaterialCache)
        {
            // TODO: from where to get the numeric format?
            MainNumericFormat iNumericFormat = new MainNumericFormat();

            this.SetUnits(UnitSystemService.GetInstance().CurrentUnitSystem);

            DuhringLinesCache duhringLinesCache = new DuhringLinesCache(dryingMaterialCache);

            this.UpdateTheUI(iNumericFormat, duhringLinesCache);
        }
Example #3
0
        public void SetDuhringLinesCache(DryingMaterialCache dryingMaterialCache)
        {
            // TODO: from where to get the numeric format?
            this.iNumericFormat = new MainNumericFormat();

            this.baseIndex    = 0;
            this.panel.Click += new EventHandler(panel_Click);

            this.SetUnits(UnitSystemService.GetInstance().CurrentUnitSystem);
            UnitSystemService.GetInstance().CurrentUnitSystemChanged += new CurrentUnitSystemChangedEventHandler(DuhringLinesControl_CurrentUnitSystemChanged);

            this.duhringLinesCache = new DuhringLinesCache(dryingMaterialCache);
            this.UpdateTheUI(iNumericFormat, this.duhringLinesCache);
            this.duhringLinesCache.DuhringLinesChanged += new DuhringLinesChangedEventHandler(duhringLinesCache_DuhringLinesChanged);
        }
Example #4
0
        private void SetMaterialComponents(DryingMaterialCache cache)
        {
            MainNumericFormat iNumericFormat = new MainNumericFormat();

            IEnumerator en = cache.MaterialComponentList.GetEnumerator();

            while (en.MoveNext())
            {
                MaterialComponent mc  = (MaterialComponent)en.Current;
                ListViewItem      lvi = new ListViewItem();

                ListViewItem.ListViewSubItem lvsi = new ListViewItem.ListViewSubItem(lvi, mc.Name);
                lvi.SubItems.Insert(0, lvsi);

                lvsi = new ListViewItem.ListViewSubItem(lvi, mc.MassFraction.Value.ToString(iNumericFormat.NumericFormatString));
                lvi.SubItems.Insert(1, lvsi);

                this.listViewMaterialComponents.Items.Add(lvi);
            }
        }