From ef26e9f3b20a3581a68388390c30f86a6fcb5740 Mon Sep 17 00:00:00 2001 From: Alee Date: Mon, 11 Feb 2019 17:12:24 -0500 Subject: Added the launcher menu, kernel project and added packages --- Microbit.Kernel/Class1.cs | 31 ++++++++ Microbit.Kernel/Microbit.Kernel.csproj | 54 +++++++++++++ Microbit.Kernel/Properties/AssemblyInfo.cs | 36 +++++++++ Microbit.sln | 8 +- Microbit/App.config | 10 ++- Microbit/MainMenu.Designer.cs | 97 ++++++++++++++++++++++- Microbit/MainMenu.cs | 41 +++++++++- Microbit/MainMenu.resx | 120 +++++++++++++++++++++++++++++ Microbit/Microbit.Main.csproj | 102 ++++++++++++++++++++++++ Microbit/Microbit.csproj | 79 ------------------- Microbit/Program.cs | 21 ++++- Microbit/Properties/Resources.Designer.cs | 46 +++++------ Microbit/Properties/Settings.Designer.cs | 22 +++--- Microbit/packages.config | 9 +++ 14 files changed, 551 insertions(+), 125 deletions(-) create mode 100644 Microbit.Kernel/Class1.cs create mode 100644 Microbit.Kernel/Microbit.Kernel.csproj create mode 100644 Microbit.Kernel/Properties/AssemblyInfo.cs create mode 100644 Microbit/MainMenu.resx create mode 100644 Microbit/Microbit.Main.csproj delete mode 100644 Microbit/Microbit.csproj create mode 100644 Microbit/packages.config diff --git a/Microbit.Kernel/Class1.cs b/Microbit.Kernel/Class1.cs new file mode 100644 index 0000000..f9716d9 --- /dev/null +++ b/Microbit.Kernel/Class1.cs @@ -0,0 +1,31 @@ +/*********************************************************************** + * + * Microbits + * Copyright (C) 2019 Alee14 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + ****************************************************************************/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Microbit.Kernel +{ + public class Class1 + { + } +} diff --git a/Microbit.Kernel/Microbit.Kernel.csproj b/Microbit.Kernel/Microbit.Kernel.csproj new file mode 100644 index 0000000..0f5522a --- /dev/null +++ b/Microbit.Kernel/Microbit.Kernel.csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + 1a1e1ee8-d7fc-4138-93dc-59aae17bf4fd + Library + Properties + Microbit.Kernel + Microbit.Kernel + v4.5 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Microbit.Kernel/Properties/AssemblyInfo.cs b/Microbit.Kernel/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..aba2606 --- /dev/null +++ b/Microbit.Kernel/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("Microbit.Kernel")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Microbit.Kernel")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[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("1a1e1ee8-d7fc-4138-93dc-59aae17bf4fd")] + +// 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/Microbit.sln b/Microbit.sln index 58bd9ae..b78adcc 100644 --- a/Microbit.sln +++ b/Microbit.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28307.168 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microbit", "Microbit\Microbit.csproj", "{B026C69C-F934-4C71-A666-5A30CD8E1BE2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microbit.Main", "Microbit\Microbit.Main.csproj", "{B026C69C-F934-4C71-A666-5A30CD8E1BE2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microbit.Kernel", "Microbit.Kernel\Microbit.Kernel.csproj", "{1A1E1EE8-D7FC-4138-93DC-59AAE17BF4FD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {B026C69C-F934-4C71-A666-5A30CD8E1BE2}.Debug|Any CPU.Build.0 = Debug|Any CPU {B026C69C-F934-4C71-A666-5A30CD8E1BE2}.Release|Any CPU.ActiveCfg = Release|Any CPU {B026C69C-F934-4C71-A666-5A30CD8E1BE2}.Release|Any CPU.Build.0 = Release|Any CPU + {1A1E1EE8-D7FC-4138-93DC-59AAE17BF4FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A1E1EE8-D7FC-4138-93DC-59AAE17BF4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A1E1EE8-D7FC-4138-93DC-59AAE17BF4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A1E1EE8-D7FC-4138-93DC-59AAE17BF4FD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Microbit/App.config b/Microbit/App.config index 8e15646..00c3e33 100644 --- a/Microbit/App.config +++ b/Microbit/App.config @@ -1,6 +1,14 @@ - + + + + + + + + + \ No newline at end of file diff --git a/Microbit/MainMenu.Designer.cs b/Microbit/MainMenu.Designer.cs index 210b8de..d2b4011 100644 --- a/Microbit/MainMenu.Designer.cs +++ b/Microbit/MainMenu.Designer.cs @@ -28,13 +28,106 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); + this.lbTitle = new System.Windows.Forms.Label(); + this.btnStart = new System.Windows.Forms.Button(); + this.wbLauncher = new System.Windows.Forms.WebBrowser(); + this.btnReset = new System.Windows.Forms.Button(); + this.btnExit = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lbTitle + // + this.lbTitle.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.lbTitle.AutoSize = true; + this.lbTitle.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbTitle.ForeColor = System.Drawing.Color.White; + this.lbTitle.Location = new System.Drawing.Point(39, 32); + this.lbTitle.Name = "lbTitle"; + this.lbTitle.Size = new System.Drawing.Size(270, 32); + this.lbTitle.TabIndex = 0; + this.lbTitle.Text = "Microbit Launcher"; + // + // btnStart + // + this.btnStart.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnStart.Font = new System.Drawing.Font("Consolas", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnStart.ForeColor = System.Drawing.Color.White; + this.btnStart.Location = new System.Drawing.Point(339, 15); + this.btnStart.Name = "btnStart"; + this.btnStart.Size = new System.Drawing.Size(296, 70); + this.btnStart.TabIndex = 1; + this.btnStart.Text = "Start Operating System"; + this.btnStart.UseVisualStyleBackColor = true; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // + // wbLauncher + // + this.wbLauncher.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.wbLauncher.Location = new System.Drawing.Point(31, 101); + this.wbLauncher.MinimumSize = new System.Drawing.Size(20, 20); + this.wbLauncher.Name = "wbLauncher"; + this.wbLauncher.Size = new System.Drawing.Size(728, 318); + this.wbLauncher.TabIndex = 2; + this.wbLauncher.Url = new System.Uri(" http://alee14.ml/Microbit-News/", System.UriKind.Absolute); + // + // btnReset + // + this.btnReset.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.btnReset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnReset.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnReset.ForeColor = System.Drawing.Color.White; + this.btnReset.Location = new System.Drawing.Point(641, 15); + this.btnReset.Name = "btnReset"; + this.btnReset.Size = new System.Drawing.Size(118, 32); + this.btnReset.TabIndex = 3; + this.btnReset.Text = "Reset"; + this.btnReset.UseVisualStyleBackColor = true; + this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + // + // btnExit + // + this.btnExit.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExit.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnExit.ForeColor = System.Drawing.Color.White; + this.btnExit.Location = new System.Drawing.Point(641, 53); + this.btnExit.Name = "btnExit"; + this.btnExit.Size = new System.Drawing.Size(118, 32); + this.btnExit.TabIndex = 4; + this.btnExit.Text = "Exit"; + this.btnExit.UseVisualStyleBackColor = true; + this.btnExit.Click += new System.EventHandler(this.btnExit_Click); + // + // MainMenu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; + this.ControlBox = false; + this.Controls.Add(this.btnExit); + this.Controls.Add(this.btnReset); + this.Controls.Add(this.wbLauncher); + this.Controls.Add(this.btnStart); + this.Controls.Add(this.lbTitle); + this.Name = "MainMenu"; + this.Text = "Microbit Launcher"; + this.Load += new System.EventHandler(this.MainMenu_Load); + this.ResumeLayout(false); + this.PerformLayout(); + } #endregion + + private System.Windows.Forms.Label lbTitle; + private System.Windows.Forms.Button btnStart; + private System.Windows.Forms.WebBrowser wbLauncher; + private System.Windows.Forms.Button btnReset; + private System.Windows.Forms.Button btnExit; } } diff --git a/Microbit/MainMenu.cs b/Microbit/MainMenu.cs index 4e585e3..be78120 100644 --- a/Microbit/MainMenu.cs +++ b/Microbit/MainMenu.cs @@ -1,4 +1,23 @@ -using System; +/*********************************************************************** + * + * Microbits + * Copyright (C) 2019 Alee14 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + ****************************************************************************/ +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -16,5 +35,25 @@ namespace Microbit { InitializeComponent(); } + + private void MainMenu_Load(object sender, EventArgs e) + { + + } + + private void btnExit_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btnStart_Click(object sender, EventArgs e) + { + + } + + private void btnReset_Click(object sender, EventArgs e) + { + + } } } diff --git a/Microbit/MainMenu.resx b/Microbit/MainMenu.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Microbit/MainMenu.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Microbit/Microbit.Main.csproj b/Microbit/Microbit.Main.csproj new file mode 100644 index 0000000..5014e47 --- /dev/null +++ b/Microbit/Microbit.Main.csproj @@ -0,0 +1,102 @@ + + + + + Debug + AnyCPU + {B026C69C-F934-4C71-A666-5A30CD8E1BE2} + WinExe + Microbit.Main + Microbit.Main + v4.5 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Discord.Net.Core.1.0.2\lib\net45\Discord.Net.Core.dll + + + ..\packages\Discord.Net.Rest.1.0.2\lib\net45\Discord.Net.Rest.dll + + + ..\packages\Discord.Net.Rpc.1.0.2\lib\net45\Discord.Net.Rpc.dll + + + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + + + + ..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + + + ..\packages\System.Interactive.Async.3.1.1\lib\net45\System.Interactive.Async.dll + + + + + + + + + + + + + + Form + + + MainMenu.cs + + + + + MainMenu.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/Microbit/Microbit.csproj b/Microbit/Microbit.csproj deleted file mode 100644 index e0b35a4..0000000 --- a/Microbit/Microbit.csproj +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Debug - AnyCPU - {B026C69C-F934-4C71-A666-5A30CD8E1BE2} - WinExe - Microbit - Microbit - v4.5 - 512 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - Form - - - MainMenu.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/Microbit/Program.cs b/Microbit/Program.cs index 72ac533..e2c475b 100644 --- a/Microbit/Program.cs +++ b/Microbit/Program.cs @@ -1,4 +1,23 @@ -using System; +/*********************************************************************** + * + * Microbits + * Copyright (C) 2019 Alee14 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + ****************************************************************************/ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/Microbit/Properties/Resources.Designer.cs b/Microbit/Properties/Resources.Designer.cs index d6a2732..d0f55e2 100644 --- a/Microbit/Properties/Resources.Designer.cs +++ b/Microbit/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Microbit.Properties -{ - - +namespace Microbit.Main.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace Microbit.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", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microbit.Properties.Resources", typeof(Resources).Assembly); + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microbit.Main.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/Microbit/Properties/Settings.Designer.cs b/Microbit/Properties/Settings.Designer.cs index 052febf..566564d 100644 --- a/Microbit/Properties/Settings.Designer.cs +++ b/Microbit/Properties/Settings.Designer.cs @@ -8,21 +8,17 @@ // //------------------------------------------------------------------------------ -namespace Microbit.Properties -{ - - +namespace Microbit.Main.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 - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.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; } } diff --git a/Microbit/packages.config b/Microbit/packages.config new file mode 100644 index 0000000..e732a0b --- /dev/null +++ b/Microbit/packages.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file -- cgit v1.2.3