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/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 +++ 10 files changed, 423 insertions(+), 124 deletions(-) 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 (limited to 'Microbit') 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