Exemplo n.º 1
0
        public void SetDuhringLinesCache(DryingMaterialCache dryingMaterialCache, INumericFormat iNumericFormat)
        {
            this.SetUnits(UnitSystemService.GetInstance().CurrentUnitSystem);

            DuhringLinesCache duhringLinesCache = new DuhringLinesCache(dryingMaterialCache);

            this.UpdateTheUI(iNumericFormat, duhringLinesCache);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        private void UpdateTheUI(INumericFormat iNumericFormat, DuhringLinesCache duhringLinesCache)
        {
            this.panel.Controls.Clear();
            IEnumerator e = duhringLinesCache.DuhringLines.GetEnumerator();
            int         i = 0;

            while (e.MoveNext())
            {
                DuhringLine        duhringLine = (DuhringLine)e.Current;
                DuhringLineControl ctrl        = new DuhringLineControl(iNumericFormat, duhringLine, true);
                ctrl.Location = new Point(0, ctrl.Height * i++);
                this.panel.Controls.Add(ctrl);
            }
        }
Exemplo n.º 4
0
        public void SetDuhringLinesCache(DryingMaterialCache dryingMaterialCache, INumericFormat iNumericFormat)
        {
            this.iNumericFormat = iNumericFormat;

            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);
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
 private void duhringLinesCache_DuhringLinesChanged(DuhringLinesCache duhringLinesCache)
 {
     this.UpdateTheUI(this.iNumericFormat, duhringLinesCache);
 }