private void ButtonInternalExternal(object sender, RoutedEventArgs e) { stackpanel2.Visibility = Visibility.Collapsed; stackpanel4.Visibility = Visibility.Visible; if (lightSensor != null) { lightSensor.ReadingChanged += LightSensorReadingChanged; } PeriodicTimer.Create(); }
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); }
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); }