From 6a2b3daf96af02c77dafe0271a0748a48f24862d Mon Sep 17 00:00:00 2001 From: Alee14 Date: Sun, 20 May 2018 13:45:57 -0400 Subject: window manager problems --- Project Ports/Desktop.Designer.cs | 33 +++---- Project Ports/Desktop.cs | 6 +- Project Ports/Project Ports.csproj | 23 +++-- Project Ports/Properties/Resources.Designer.cs | 44 ++++----- Project Ports/Properties/Resources.resx | 13 +-- Project Ports/Settings.Designer.cs | 84 +++++++++++++++++ Project Ports/Settings.cs | 20 +++++ Project Ports/Settings.resx | 120 +++++++++++++++++++++++++ Project Ports/TestWindow.Designer.cs | 2 +- Project Ports/TestWindow.cs | 2 +- 10 files changed, 286 insertions(+), 61 deletions(-) create mode 100644 Project Ports/Settings.Designer.cs create mode 100644 Project Ports/Settings.cs create mode 100644 Project Ports/Settings.resx (limited to 'Project Ports') diff --git a/Project Ports/Desktop.Designer.cs b/Project Ports/Desktop.Designer.cs index 697f1d5..4cbf50a 100644 --- a/Project Ports/Desktop.Designer.cs +++ b/Project Ports/Desktop.Designer.cs @@ -32,14 +32,13 @@ this.appMenu = new System.Windows.Forms.MenuStrip(); this.menuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.programsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.noProgramsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.testWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.shutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ltime = new System.Windows.Forms.Label(); this.dclock = new System.Windows.Forms.Timer(this.components); - this.testWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.appMenu.SuspendLayout(); this.SuspendLayout(); // @@ -70,41 +69,41 @@ // programsToolStripMenuItem // this.programsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.noProgramsToolStripMenuItem, this.terminalToolStripMenuItem, this.testWindowToolStripMenuItem}); this.programsToolStripMenuItem.Name = "programsToolStripMenuItem"; this.programsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.programsToolStripMenuItem.Text = "Programs"; // - // noProgramsToolStripMenuItem - // - this.noProgramsToolStripMenuItem.Name = "noProgramsToolStripMenuItem"; - this.noProgramsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); - this.noProgramsToolStripMenuItem.Text = "No programs :("; - // // terminalToolStripMenuItem // this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem"; - this.terminalToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.terminalToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.terminalToolStripMenuItem.Text = "Terminal"; this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click); // + // testWindowToolStripMenuItem + // + this.testWindowToolStripMenuItem.Name = "testWindowToolStripMenuItem"; + this.testWindowToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.testWindowToolStripMenuItem.Text = "TestWindow"; + this.testWindowToolStripMenuItem.Click += new System.EventHandler(this.testWindowToolStripMenuItem_Click); + // // settingsToolStripMenuItem // this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.settingsToolStripMenuItem.Text = "Settings"; // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(128, 6); // // shutdownToolStripMenuItem // this.shutdownToolStripMenuItem.Name = "shutdownToolStripMenuItem"; - this.shutdownToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.shutdownToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.shutdownToolStripMenuItem.Text = "Shutdown"; this.shutdownToolStripMenuItem.Click += new System.EventHandler(this.shutdownToolStripMenuItem_Click); // @@ -125,13 +124,6 @@ // this.dclock.Tick += new System.EventHandler(this.dclock_Tick); // - // testWindowToolStripMenuItem - // - this.testWindowToolStripMenuItem.Name = "testWindowToolStripMenuItem"; - this.testWindowToolStripMenuItem.Size = new System.Drawing.Size(180, 22); - this.testWindowToolStripMenuItem.Text = "TestWindow"; - this.testWindowToolStripMenuItem.Click += new System.EventHandler(this.testWindowToolStripMenuItem_Click); - // // Desktop // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -160,7 +152,6 @@ private System.Windows.Forms.ToolStripMenuItem menuToolStripMenuItem; private System.Windows.Forms.Label ltime; private System.Windows.Forms.ToolStripMenuItem programsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem noProgramsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem shutdownToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; diff --git a/Project Ports/Desktop.cs b/Project Ports/Desktop.cs index 06e121f..7de59f8 100644 --- a/Project Ports/Desktop.cs +++ b/Project Ports/Desktop.cs @@ -26,6 +26,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using PortEngine; namespace Project_Ports { @@ -36,6 +37,8 @@ namespace Project_Ports InitializeComponent(); } + WindowManager wm = new WindowManager(); + private void dclock_Tick(object sender, EventArgs e) { @@ -62,8 +65,7 @@ namespace Project_Ports private void terminalToolStripMenuItem_Click(object sender, EventArgs e) { - Terminal terminalForm = new Terminal(); - terminalForm.Show(); + wm.createWindow(new Terminal(), "Terminal"); } private void testWindowToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/Project Ports/Project Ports.csproj b/Project Ports/Project Ports.csproj index 0ceef20..e5966b1 100644 --- a/Project Ports/Project Ports.csproj +++ b/Project Ports/Project Ports.csproj @@ -74,6 +74,17 @@ + + True + True + Resources.resx + + + UserControl + + + Settings.cs + UserControl @@ -100,13 +111,12 @@ ResXFileCodeGenerator - Resources.Designer.cs Designer + Resources.Designer.cs + + + Settings.cs - - True - Resources.resx - Terminal.cs @@ -126,5 +136,8 @@ + + + \ No newline at end of file diff --git a/Project Ports/Properties/Resources.Designer.cs b/Project Ports/Properties/Resources.Designer.cs index 180997a..da238fc 100644 --- a/Project Ports/Properties/Resources.Designer.cs +++ b/Project Ports/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Project_Ports.Properties -{ - - +namespace Project_Ports.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace Project_Ports.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)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Project_Ports.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/Project Ports/Properties/Resources.resx b/Project Ports/Properties/Resources.resx index af7dbeb..1af7de1 100644 --- a/Project Ports/Properties/Resources.resx +++ b/Project Ports/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.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/Project Ports/Settings.Designer.cs b/Project Ports/Settings.Designer.cs new file mode 100644 index 0000000..6ebbbf9 --- /dev/null +++ b/Project Ports/Settings.Designer.cs @@ -0,0 +1,84 @@ +namespace Project_Ports +{ + partial class Settings + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // button1 + // + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(16, 70); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 64); + this.button1.TabIndex = 0; + this.button1.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(251, 19); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(107, 32); + this.label1.TabIndex = 1; + this.label1.Text = "Settings"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(30, 149); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(46, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Setting1"; + // + // Settings + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.button1); + this.Name = "Settings"; + this.Size = new System.Drawing.Size(664, 523); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + } +} diff --git a/Project Ports/Settings.cs b/Project Ports/Settings.cs new file mode 100644 index 0000000..a25d66f --- /dev/null +++ b/Project Ports/Settings.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project_Ports +{ + public partial class Settings : UserControl + { + public Settings() + { + InitializeComponent(); + } + } +} diff --git a/Project Ports/Settings.resx b/Project Ports/Settings.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Project Ports/Settings.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/Project Ports/TestWindow.Designer.cs b/Project Ports/TestWindow.Designer.cs index e95c631..ff91e5a 100644 --- a/Project Ports/TestWindow.Designer.cs +++ b/Project Ports/TestWindow.Designer.cs @@ -52,10 +52,10 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(443, 341); this.Controls.Add(this.progressBar1); this.Controls.Add(this.button1); this.Name = "TestWindow"; - this.Size = new System.Drawing.Size(459, 380); this.Load += new System.EventHandler(this.TestWindow_Load); this.ResumeLayout(false); diff --git a/Project Ports/TestWindow.cs b/Project Ports/TestWindow.cs index acbaacc..8de01ec 100644 --- a/Project Ports/TestWindow.cs +++ b/Project Ports/TestWindow.cs @@ -20,7 +20,7 @@ namespace Project_Ports private void TestWindow_Load(object sender, EventArgs e) { - WindowManager wm = new WindowManager(); + WindowManager wm = new WindowManager(); } } } -- cgit v1.2.3