コード例 #1
0
        public BrightnessWindow(Menu menu)
        {
            InitializeComponent();

            BrightnessSlider.Maximum       = BrightnessAdjuster.BRIGHTNESS_MAX;
            BrightnessSlider.Minimum       = BrightnessAdjuster.BRIGHTNESS_MIN;
            BrightnessSlider.Value         = BrightnessAdjuster.getInstance().Brightness;
            BrightnessSlider.ValueChanged += BrightnessSlider_ValueChanged;
            this.Width  = menu.Width;
            this.Height = 60;
            this.Top    = menu.Top + menu.Height;
            this.Left   = menu.Left;
        }
コード例 #2
0
        private void Background_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyStates == Keyboard.GetKeyStates(Key.Q))
            {
                WindowsHandler.AcquirePriortyofScreenTouch();
            }

            if (e.KeyStates == Keyboard.GetKeyStates(Key.W))
            {
                WindowsHandler.BlockingScreenTouch();
            }

            if (e.KeyStates == Keyboard.GetKeyStates(Key.E))
            {
                YTDataDecoder.run();
            }

            if (e.KeyStates == Keyboard.GetKeyStates(Key.R))
            {
                Console.WriteLine(BrightnessAdjuster.getInstance().Brightness);
            }
        }
コード例 #3
0
 private void BrightnessSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     BrightnessAdjuster.getInstance().SetBrightness(e.NewValue);
 }