Subversion Repositories group.electronics

Rev

Rev 145 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 145 Rev 147
Line 20... Line 20...
20
		private Color _color;
20
		private Color _color;
21
		private bool _on = true;
21
		private bool _on = true;
22
		private Color _reflectionColor = Color.FromArgb(180, 255, 255, 255);
22
		private Color _reflectionColor = Color.FromArgb(180, 255, 255, 255);
23
		private Color[] _surroundColor = new Color[] { Color.FromArgb(0, 255, 255, 255) };
23
		private Color[] _surroundColor = new Color[] { Color.FromArgb(0, 255, 255, 255) };
24
		private Timer _timer = new Timer();
24
		private Timer _timer = new Timer();
-
 
25
        private Timer _flash = new Timer();
25
 
26
 
26
		/// <summary>
27
		/// <summary>
27
		/// Gets or Sets the color of the LED light
28
		/// Gets or Sets the color of the LED light
28
		/// </summary>
29
		/// </summary>
29
		[DefaultValue(typeof(Color), "153, 255, 54")]
30
		[DefaultValue(typeof(Color), "153, 255, 54")]
Line 45... Line 46...
45
		/// <summary>
46
		/// <summary>
46
		/// Very dark shade of the LED color used for gradient
47
		/// Very dark shade of the LED color used for gradient
47
		/// </summary>
48
		/// </summary>
48
		public Color DarkDarkColor { get; protected set; }
49
		public Color DarkDarkColor { get; protected set; }
49
 
50
 
-
 
51
        public bool Flash {
-
 
52
            get { return _flash.Enabled; }
-
 
53
            set { _flash.Enabled = true; }
-
 
54
        }
-
 
55
 
50
		/// <summary>
56
		/// <summary>
51
		/// Gets or Sets whether the light is turned on
57
		/// Gets or Sets whether the light is turned on
52
		/// </summary>
58
		/// </summary>
53
		public bool On { 
59
		public bool On { 
54
			get { return _on; } 
60
			get { return _on; } 
Line 68... Line 74...
68
			
74
			
69
			this.Color = Color.FromArgb(255, 153, 255, 54);
75
			this.Color = Color.FromArgb(255, 153, 255, 54);
70
			_timer.Tick += new EventHandler(
76
			_timer.Tick += new EventHandler(
71
				(object sender, EventArgs e) => { this.On = !this.On; }
77
				(object sender, EventArgs e) => { this.On = !this.On; }
72
			);
78
			);
-
 
79
 
-
 
80
            _flash.Interval = 500;
-
 
81
            _flash.Tick += new EventHandler(
-
 
82
                (object sender, EventArgs e) => { this._flash.Enabled = false; }
-
 
83
            );
73
		}
84
		}
74
		
85
		
75
		#endregion
86
		#endregion
76
 
87
 
77
		#region Methods
88
		#region Methods