aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-05-08 03:12:14 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-05-08 03:12:14 +0000
commit071e02c6b6b4837fa9cf0b6d4c749994e02638d7 (patch)
tree960446788703b69f0bb285450be80c5b3d8cc22c /Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs
parente331b531c6e6d93eb0eee42b9002074e8090ad18 (diff)
downloadlufa-071e02c6b6b4837fa9cf0b6d4c749994e02638d7.tar.gz
lufa-071e02c6b6b4837fa9cf0b6d4c749994e02638d7.tar.bz2
lufa-071e02c6b6b4837fa9cf0b6d4c749994e02638d7.zip
Add svn:eol-style property to source files, so that the line endings are correctly converted to the target system's native end of line style.
Diffstat (limited to 'Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs')
-rw-r--r--Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs146
1 files changed, 73 insertions, 73 deletions
diff --git a/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs b/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs
index ccc89a7a2..6e19af8ed 100644
--- a/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs
+++ b/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs
@@ -1,73 +1,73 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-
-namespace LEDMixer
-{
- public partial class LEDMixer : Form
- {
- private const int LIGHT_MAX = 0x1F;
-
- public LEDMixer()
- {
- InitializeComponent();
- }
-
- private void LEDMixer_Load(object sender, EventArgs e)
- {
- for (int i = 1; i <= 99; i++)
- cbPort.Items.Add("COM" + i.ToString());
-
- cbPort.SelectedIndex = 0;
-
- tbRed.Maximum = LIGHT_MAX;
- tbGreen.Maximum = LIGHT_MAX;
- tbBlue.Maximum = LIGHT_MAX;
- }
-
- private void tbRed_Scroll(object sender, EventArgs e)
- {
- NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
- }
-
- private void tbGreen_Scroll(object sender, EventArgs e)
- {
- NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
- }
-
- private void tbBlue_Scroll(object sender, EventArgs e)
- {
- NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
- }
-
- private void NotifyLight(int Red, int Green, int Blue)
- {
- byte[] buffer = new byte[3];
- buffer[0] = (byte)(0x80 | (Red & LIGHT_MAX));
- buffer[1] = (byte)(0x40 | (Green & LIGHT_MAX));
- buffer[2] = (byte)(0x20 | (Blue & LIGHT_MAX));
-
- try
- {
- serSerialPort.PortName = cbPort.Text;
- serSerialPort.Open();
- serSerialPort.Write(buffer, 0, buffer.Length);
- serSerialPort.Close();
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void cbPort_SelectedIndexChanged(object sender, EventArgs e)
- {
- NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace LEDMixer
+{
+ public partial class LEDMixer : Form
+ {
+ private const int LIGHT_MAX = 0x1F;
+
+ public LEDMixer()
+ {
+ InitializeComponent();
+ }
+
+ private void LEDMixer_Load(object sender, EventArgs e)
+ {
+ for (int i = 1; i <= 99; i++)
+ cbPort.Items.Add("COM" + i.ToString());
+
+ cbPort.SelectedIndex = 0;
+
+ tbRed.Maximum = LIGHT_MAX;
+ tbGreen.Maximum = LIGHT_MAX;
+ tbBlue.Maximum = LIGHT_MAX;
+ }
+
+ private void tbRed_Scroll(object sender, EventArgs e)
+ {
+ NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
+ }
+
+ private void tbGreen_Scroll(object sender, EventArgs e)
+ {
+ NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
+ }
+
+ private void tbBlue_Scroll(object sender, EventArgs e)
+ {
+ NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
+ }
+
+ private void NotifyLight(int Red, int Green, int Blue)
+ {
+ byte[] buffer = new byte[3];
+ buffer[0] = (byte)(0x80 | (Red & LIGHT_MAX));
+ buffer[1] = (byte)(0x40 | (Green & LIGHT_MAX));
+ buffer[2] = (byte)(0x20 | (Blue & LIGHT_MAX));
+
+ try
+ {
+ serSerialPort.PortName = cbPort.Text;
+ serSerialPort.Open();
+ serSerialPort.Write(buffer, 0, buffer.Length);
+ serSerialPort.Close();
+ }
+ catch (Exception e)
+ {
+
+ }
+ }
+
+ private void cbPort_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ NotifyLight(tbRed.Value, tbGreen.Value, tbBlue.Value);
+ }
+ }
+}