From 5cf25f1409d40f7de6b13baf8b76751ae7b664ed Mon Sep 17 00:00:00 2001 From: EverythingWindows Date: Mon, 7 Nov 2022 07:34:10 +0700 Subject: [PATCH] tracing C# code to adapt to VB.NET --- ShiftOS-TheRevival-CS/Form1.Designer.cs | 35 ++++- ShiftOS-TheRevival-CS/Form1.cs | 9 +- ShiftOS-TheRevival-CS/Form1.resx | 120 ++++++++++++++++++ ShiftOS-TheRevival-CS/Program.cs | 2 +- .../ShiftOS-TheRevival-CS.csproj | 3 + 5 files changed, 162 insertions(+), 7 deletions(-) create mode 100644 ShiftOS-TheRevival-CS/Form1.resx diff --git a/ShiftOS-TheRevival-CS/Form1.Designer.cs b/ShiftOS-TheRevival-CS/Form1.Designer.cs index f227752..8110a04 100644 --- a/ShiftOS-TheRevival-CS/Form1.Designer.cs +++ b/ShiftOS-TheRevival-CS/Form1.Designer.cs @@ -1,7 +1,7 @@  namespace ShiftOS_TheRevival_CS { - partial class Form1 + partial class ShiftOSMenu { /// /// Required designer variable. @@ -29,13 +29,40 @@ namespace ShiftOS_TheRevival_CS /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(13, 13); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Exit"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // ShiftOSMenu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; + this.BackColor = System.Drawing.Color.Silver; + this.ClientSize = new System.Drawing.Size(624, 441); + this.Controls.Add(this.button1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "ShiftOSMenu"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "ShiftOS Menu"; + this.ResumeLayout(false); + } #endregion + + private System.Windows.Forms.Button button1; } } diff --git a/ShiftOS-TheRevival-CS/Form1.cs b/ShiftOS-TheRevival-CS/Form1.cs index a9f323d..0a1d2f3 100644 --- a/ShiftOS-TheRevival-CS/Form1.cs +++ b/ShiftOS-TheRevival-CS/Form1.cs @@ -10,11 +10,16 @@ using System.Windows.Forms; namespace ShiftOS_TheRevival_CS { - public partial class Form1 : Form + public partial class ShiftOSMenu : Form { - public Form1() + public ShiftOSMenu() { InitializeComponent(); } + + private void button1_Click(object sender, EventArgs e) + { + Close(); + } } } diff --git a/ShiftOS-TheRevival-CS/Form1.resx b/ShiftOS-TheRevival-CS/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS-TheRevival-CS/Form1.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/ShiftOS-TheRevival-CS/Program.cs b/ShiftOS-TheRevival-CS/Program.cs index 54e9112..1b51a33 100644 --- a/ShiftOS-TheRevival-CS/Program.cs +++ b/ShiftOS-TheRevival-CS/Program.cs @@ -16,7 +16,7 @@ namespace ShiftOS_TheRevival_CS { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); + Application.Run(new ShiftOSMenu()); } } } diff --git a/ShiftOS-TheRevival-CS/ShiftOS-TheRevival-CS.csproj b/ShiftOS-TheRevival-CS/ShiftOS-TheRevival-CS.csproj index d550d04..6bea8ee 100644 --- a/ShiftOS-TheRevival-CS/ShiftOS-TheRevival-CS.csproj +++ b/ShiftOS-TheRevival-CS/ShiftOS-TheRevival-CS.csproj @@ -53,6 +53,9 @@ + + Form1.cs + ResXFileCodeGenerator Resources.Designer.cs