diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-11-09 12:45:10 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-11-09 12:45:10 +0000 |
commit | 65644164792c3eaa9214c5abcb62052ca6ea2344 (patch) | |
tree | 5d516b431e0a06e86fae2eb121afb07d4cdbc210 /Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs | |
parent | 8df0cf3241ff7de055850b630e8d878d1023bb5d (diff) | |
download | lufa-65644164792c3eaa9214c5abcb62052ca6ea2344.tar.gz lufa-65644164792c3eaa9214c5abcb62052ca6ea2344.tar.bz2 lufa-65644164792c3eaa9214c5abcb62052ca6ea2344.zip |
Update host C# applications for VS2010. Make LEDNotifier project host applications only display valid COM port names for the PC it is run on, rather than all possible port names. Add missing property files to the TempDataLogger project host application.
Diffstat (limited to 'Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs')
-rw-r--r-- | Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs b/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs index 6e19af8ed..dfaffed30 100644 --- a/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs +++ b/Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs @@ -20,8 +20,10 @@ namespace LEDMixer private void LEDMixer_Load(object sender, EventArgs e) { - for (int i = 1; i <= 99; i++) - cbPort.Items.Add("COM" + i.ToString()); + String[] PortNames = System.IO.Ports.SerialPort.GetPortNames(); + Array.Sort<String>(PortNames, delegate(string strA, string strB) { return int.Parse(strA.Substring(3)).CompareTo(int.Parse(strB.Substring(3))); }); + cbPort.Items.Clear(); + cbPort.Items.AddRange(PortNames); cbPort.SelectedIndex = 0; |