commit 7b9744670ffaac2d37d6960daf76ca1353dcf16f Author: Admin Date: Wed Nov 4 17:13:38 2020 -0600 Initial commit. Added a helper class for easy access to the app.config settings. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54739db --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +DataOrganizer/obj/Debug/ +DataOrganizer/bin/ \ No newline at end of file diff --git a/.vs/DataOrganizer/v16/.suo b/.vs/DataOrganizer/v16/.suo new file mode 100644 index 0000000..38f9488 Binary files /dev/null and b/.vs/DataOrganizer/v16/.suo differ diff --git a/DataOrganizer.sln b/DataOrganizer.sln new file mode 100644 index 0000000..80b5d1c --- /dev/null +++ b/DataOrganizer.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30621.155 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataOrganizer", "DataOrganizer\DataOrganizer.csproj", "{3E21A373-0FBF-4D1F-B097-B9C0D21F3749}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E21A373-0FBF-4D1F-B097-B9C0D21F3749}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E21A373-0FBF-4D1F-B097-B9C0D21F3749}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E21A373-0FBF-4D1F-B097-B9C0D21F3749}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E21A373-0FBF-4D1F-B097-B9C0D21F3749}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {233FDFD3-A9D9-417C-95C3-398A20395615} + EndGlobalSection +EndGlobal diff --git a/DataOrganizer/App.config b/DataOrganizer/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/DataOrganizer/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DataOrganizer/DataOrganizer.csproj b/DataOrganizer/DataOrganizer.csproj new file mode 100644 index 0000000..ba2f013 --- /dev/null +++ b/DataOrganizer/DataOrganizer.csproj @@ -0,0 +1,85 @@ + + + + + Debug + AnyCPU + {3E21A373-0FBF-4D1F-B097-B9C0D21F3749} + WinExe + DataOrganizer + DataOrganizer + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/DataOrganizer/GlobalSettings.cs b/DataOrganizer/GlobalSettings.cs new file mode 100644 index 0000000..e7f9a46 --- /dev/null +++ b/DataOrganizer/GlobalSettings.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Configuration; + +namespace DataOrganizer +{ + static class GlobalSettings + { + public static bool TryGetStringSetting(string keyName, out string value) + { + value = string.Empty; + + try + { + value = ConfigurationManager.AppSettings[keyName]; + + if (string.IsNullOrEmpty(value)) return false; + + return true; + } + catch + { + //toolStripStatusLabel1.Text = "Failed to get app key: " + keyName + "."; + } + + return false; + } + } +} diff --git a/DataOrganizer/MainForm.Designer.cs b/DataOrganizer/MainForm.Designer.cs new file mode 100644 index 0000000..131fdfd --- /dev/null +++ b/DataOrganizer/MainForm.Designer.cs @@ -0,0 +1,93 @@ +namespace DataOrganizer +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.MainMenu = new System.Windows.Forms.MenuStrip(); + this.FileMainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.MainLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.MainMenu.SuspendLayout(); + this.SuspendLayout(); + // + // MainMenu + // + this.MainMenu.GripMargin = new System.Windows.Forms.Padding(2, 2, 0, 2); + this.MainMenu.ImageScalingSize = new System.Drawing.Size(24, 24); + this.MainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FileMainMenu}); + this.MainMenu.Location = new System.Drawing.Point(0, 0); + this.MainMenu.Name = "MainMenu"; + this.MainMenu.Size = new System.Drawing.Size(800, 36); + this.MainMenu.TabIndex = 0; + this.MainMenu.Text = "menuStrip1"; + // + // FileMainMenu + // + this.FileMainMenu.Name = "FileMainMenu"; + this.FileMainMenu.Size = new System.Drawing.Size(54, 32); + this.FileMainMenu.Text = "&File"; + // + // MainLayoutPanel + // + this.MainLayoutPanel.ColumnCount = 2; + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.MainLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.MainLayoutPanel.Location = new System.Drawing.Point(0, 36); + this.MainLayoutPanel.Name = "MainLayoutPanel"; + this.MainLayoutPanel.RowCount = 2; + this.MainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.MainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.MainLayoutPanel.Size = new System.Drawing.Size(800, 856); + this.MainLayoutPanel.TabIndex = 1; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 892); + this.Controls.Add(this.MainLayoutPanel); + this.Controls.Add(this.MainMenu); + this.MainMenuStrip = this.MainMenu; + this.Name = "Form1"; + this.Text = "Form1"; + this.MainMenu.ResumeLayout(false); + this.MainMenu.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip MainMenu; + private System.Windows.Forms.ToolStripMenuItem FileMainMenu; + private System.Windows.Forms.TableLayoutPanel MainLayoutPanel; + } +} + diff --git a/DataOrganizer/MainForm.cs b/DataOrganizer/MainForm.cs new file mode 100644 index 0000000..9934f95 --- /dev/null +++ b/DataOrganizer/MainForm.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace DataOrganizer +{ + public partial class MainForm : Form + { + public MainForm() + { + InitializeComponent(); + } + } +} diff --git a/DataOrganizer/MainForm.resx b/DataOrganizer/MainForm.resx new file mode 100644 index 0000000..6deb572 --- /dev/null +++ b/DataOrganizer/MainForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/DataOrganizer/Program.cs b/DataOrganizer/Program.cs new file mode 100644 index 0000000..b454ef1 --- /dev/null +++ b/DataOrganizer/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace DataOrganizer +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/DataOrganizer/Properties/AssemblyInfo.cs b/DataOrganizer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e2ed788 --- /dev/null +++ b/DataOrganizer/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DataOrganizer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DataOrganizer")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3e21a373-0fbf-4d1f-b097-b9c0d21f3749")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DataOrganizer/Properties/Resources.Designer.cs b/DataOrganizer/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1870623 --- /dev/null +++ b/DataOrganizer/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DataOrganizer.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + 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() + { + } + + /// + /// 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)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DataOrganizer.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 + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/DataOrganizer/Properties/Resources.resx b/DataOrganizer/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/DataOrganizer/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/DataOrganizer/Properties/Settings.Designer.cs b/DataOrganizer/Properties/Settings.Designer.cs new file mode 100644 index 0000000..746ff55 --- /dev/null +++ b/DataOrganizer/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DataOrganizer.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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 + { + return defaultInstance; + } + } + } +} diff --git a/DataOrganizer/Properties/Settings.settings b/DataOrganizer/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/DataOrganizer/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + +