private void ButtonInternalExternal(object sender, RoutedEventArgs e)
        {
            stackpanel2.Visibility = Visibility.Collapsed;
            stackpanel4.Visibility = Visibility.Visible;

            if (lightSensor != null)
            {
                lightSensor.ReadingChanged += LightSensorReadingChanged;
            }

            PeriodicTimer.Create();
        }
Exemplo n.º 2
0
        public void EnableSensor()
        {
            ButtonSensor.IsEnabled = true;
            ButtonSensor.Opacity   = 1;
            ButtonSensor.SetValue(AutomationProperties.NameProperty, "x");

            _isOn = !_isOn;
            ButtonSensor.SetValue(AutomationProperties.NameProperty, "");
            StackPanelSensor.Visibility = Visibility.Visible;
            StackPanelSensor.Opacity    = 1;
            PeriodicTimer.Create(_totalIndex);
            Sensor.EnableSensor(_sensorType, _index, _totalIndex);
        }
Exemplo n.º 3
0
        public void EnableSensor()
        {
            buttonSensor.IsEnabled = true;
            buttonSensor.Opacity = 1;
            buttonSensor.SetValue(AutomationProperties.NameProperty, "x");

            IsOn = !IsOn;
            buttonSensor.SetValue(AutomationProperties.NameProperty, "");
            StackPanelSensor.Visibility = Visibility.Visible;
            StackPanelSensor.Opacity = 1;
            PeriodicTimer.Create(totalIndex);
            Sensor.EnableSensor(SensorType, Index, totalIndex);
        }