From 65644164792c3eaa9214c5abcb62052ca6ea2344 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 9 Nov 2011 12:45:10 +0000 Subject: 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. --- Projects/LEDNotifier/LEDMixerApp/LEDMixer.cs | 6 ++- Projects/LEDNotifier/LEDMixerApp/LEDMixer.csproj | 7 +++- .../LEDMixerApp/Properties/Resources.Designer.cs | 46 +++++++++------------- .../LEDMixerApp/Properties/Settings.Designer.cs | 24 +++++------ 4 files changed, 39 insertions(+), 44 deletions(-) (limited to 'Projects/LEDNotifier/LEDMixerApp') 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(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; diff --git a/Projects/LEDNotifier/LEDMixerApp/LEDMixer.csproj b/Projects/LEDNotifier/LEDMixerApp/LEDMixer.csproj index 9b4660026..4e9318c6e 100644 --- a/Projects/LEDNotifier/LEDMixerApp/LEDMixer.csproj +++ b/Projects/LEDNotifier/LEDMixerApp/LEDMixer.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -12,6 +12,10 @@ LEDMixer v3.5 512 + + + 3.5 + true @@ -68,6 +72,7 @@ True Resources.resx + True SettingsSingleFileGenerator diff --git a/Projects/LEDNotifier/LEDMixerApp/Properties/Resources.Designer.cs b/Projects/LEDNotifier/LEDMixerApp/Properties/Resources.Designer.cs index 74c0e3e7e..53e3f2e0b 100644 --- a/Projects/LEDNotifier/LEDMixerApp/Properties/Resources.Designer.cs +++ b/Projects/LEDNotifier/LEDMixerApp/Properties/Resources.Designer.cs @@ -1,17 +1,17 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.239 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace LEDMixer.Properties -{ - - +namespace LEDMixer.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace LEDMixer.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LEDMixer.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Projects/LEDNotifier/LEDMixerApp/Properties/Settings.Designer.cs b/Projects/LEDNotifier/LEDMixerApp/Properties/Settings.Designer.cs index 1e613aa26..d79f28b80 100644 --- a/Projects/LEDNotifier/LEDMixerApp/Properties/Settings.Designer.cs +++ b/Projects/LEDNotifier/LEDMixerApp/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.239 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace LEDMixer.Properties -{ - - +namespace LEDMixer.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } -- cgit v1.2.3