示例#1
0
 private void sliders_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     if (timer != null && this.IsLoaded)
     {
         Effects.CalcRainbow(App.settings.Saturation / 10, App.settings.Lightness / 10);
     }
 }
示例#2
0
        private void sliderSpeed_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            if (timer != null && this.IsLoaded)
            {
                timer.Stop();
                timer.Interval = TimeSpan.FromMilliseconds(e.NewValue);
                timer.Start();

                Effects.CalcRainbow(App.settings.Saturation / 10, App.settings.Lightness / 10);
            }
        }
示例#3
0
        public RainbowMode()
        {
            InitializeComponent();

            timer = new DispatcherTimer()
            {
                Interval = TimeSpan.FromMilliseconds(App.settings.Speed)
            };

            timer.Tick += Timer_Tick;
            timer.Start();

            GridRainbow.DataContext = App.settings;

            Effects.CalcRainbow(App.settings.Saturation / 10, App.settings.Lightness / 10);
        }