예제 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            FrameworkElement fe      = sender as FrameworkElement;
            MonitorData      monitor = ((MonitorData)fe.DataContext);

            monitor.SwitchPower();
            manager.ChangePower(monitor.Ref.hPhysicalMonitor, monitor.IsPoweredOn);
        }
예제 #2
0
        private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            FrameworkElement fe      = sender as FrameworkElement;
            MonitorData      monitor = ((MonitorData)fe.DataContext);

            monitor.Ref.BrightnessLevel = (uint)e.NewValue;

            manager.ChangeBrightness(monitor.Ref.hPhysicalMonitor, monitor.BrightnessLevel);
        }