Esempio n. 1
0
        private static void OnObjectChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Spectrum xyz = d as Spectrum;
            //xyz.SpectrumVisualizer.Height = xyz.BarHeight;
            //xyz.MainGrid.Height = xyz.BarHeight;
            //xyz.SpectrumVisualizer.Width = xyz.TotalWidth;
            //xyz.MainGrid.Width = xyz.TotalWidth;
            bool runnin = false; if (xyz.wucd != null && xyz.wucd.Ready())

            {
                runnin = true;
            }

            xyz.Width = xyz.TotalWidth;

            xyz.Height = xyz.BarHeight;
            xyz.disable();
            xyz.wucd                       = new WpfUserControlDevice(xyz.Lines, xyz, xyz.SpecName);
            xyz.wucd.Smoothing             = xyz.Smoothing;
            xyz.bars                       = xyz.GenerateProgressBars();
            xyz.icProgressBars.ItemsSource = xyz.bars;
            xyz.disable();
            if (runnin)
            {
                xyz.enable();
            }
        }
Esempio n. 2
0
        private static void OnSmoothingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Spectrum xyz    = d as Spectrum;
            bool     runnin = false; if (xyz.wucd != null && xyz.wucd.Ready())

            {
                runnin = true;
            }

            xyz.disable();
            xyz.wucd                       = new WpfUserControlDevice(xyz.Lines, xyz, xyz.SpecName);
            xyz.wucd.Smoothing             = xyz.Smoothing;
            xyz.bars                       = xyz.GenerateProgressBars();
            xyz.icProgressBars.ItemsSource = xyz.bars;
            xyz.disable();
            if (runnin)
            {
                xyz.enable();
            }
        }