/NerdSharp.Net_Studio/NerdSharp_UberNet/Science/Comp_Sci/StudioComponents/Widgets/OtherControls/LED.xaml.cs
C# | 48 lines | 41 code | 4 blank | 3 comment | 2 complexity | 68210f0d0049c1e33da2966189de073f MD5 | raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
-
- namespace NerdSharp.Net_Studio.NerdSharp_UberNet.Science.Comp_Sci.StudioComponents.Widgets.OtherControls
- {
- /// <summary>
- /// Interaction logic for LED.xaml
- /// </summary>
- public partial class LED : UserControl
- {
- public LED()
- {
- InitializeComponent();
- }
-
- public enum State { ON, OFF }
-
- private State zeroOne = new State();
-
- public State ZeroOne
- {
- get { return zeroOne; }
- set
- {
- zeroOne = value;
- if (value == State.ON)
- {
- mainColor.Color = Colors.Green;
- }
- else
- {
- mainColor.Color = Colors.Red;
- }
- }
- }
- }
- }