From d092383e4e04c505c94f31be84aaf935f700fc6b Mon Sep 17 00:00:00 2001 From: TheEdgeNK Date: Mon, 27 Aug 2018 16:58:32 -0400 Subject: Allows user to change username and have it show up on the new app launcher --- PortEngine/GeneralAPI.cs | 19 +++++++++++++++++++ PortEngine/PortEngine.csproj | 1 + PortEngine/QuantumAPI/QuantumAPI.cs | 1 + Project Ports/Desktop.Designer.cs | 8 ++++---- Project Ports/Desktop.cs | 4 +--- Project Ports/Desktop.resx | 3 --- 6 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 PortEngine/GeneralAPI.cs diff --git a/PortEngine/GeneralAPI.cs b/PortEngine/GeneralAPI.cs new file mode 100644 index 0000000..11af9e5 --- /dev/null +++ b/PortEngine/GeneralAPI.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PortEngine +{ + public class GeneralAPI + { + + public static void setNameOnAppLauncher(Label txtUserDestination) + { + txtUserDestination.Text = Properties.Settings.Default.userDisplayName; + } + + } +} diff --git a/PortEngine/PortEngine.csproj b/PortEngine/PortEngine.csproj index da69b4b..b4c8ef8 100644 --- a/PortEngine/PortEngine.csproj +++ b/PortEngine/PortEngine.csproj @@ -49,6 +49,7 @@ EarnSite.cs + UserControl diff --git a/PortEngine/QuantumAPI/QuantumAPI.cs b/PortEngine/QuantumAPI/QuantumAPI.cs index d10f87d..f103255 100644 --- a/PortEngine/QuantumAPI/QuantumAPI.cs +++ b/PortEngine/QuantumAPI/QuantumAPI.cs @@ -10,6 +10,7 @@ namespace PortEngine { public class QuantumnetAPI { + private static void loadSite(UserControl site, Panel pnlSiteArea) { pnlSiteArea.Controls.Clear(); diff --git a/Project Ports/Desktop.Designer.cs b/Project Ports/Desktop.Designer.cs index 8e0beeb..a1f154e 100644 --- a/Project Ports/Desktop.Designer.cs +++ b/Project Ports/Desktop.Designer.cs @@ -89,7 +89,7 @@ this.programStrip.Location = new System.Drawing.Point(9, 349); this.programStrip.Name = "programStrip"; this.programStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - this.programStrip.Size = new System.Drawing.Size(77, 25); + this.programStrip.Size = new System.Drawing.Size(79, 25); this.programStrip.TabIndex = 2; this.programStrip.Text = "toolStrip1"; // @@ -204,11 +204,11 @@ // appButton // this.appButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.appButton.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.appButton.Font = new System.Drawing.Font("Consolas", 9.25F); this.appButton.ForeColor = System.Drawing.Color.Black; - this.appButton.Location = new System.Drawing.Point(12, 6); + this.appButton.Location = new System.Drawing.Point(9, 3); this.appButton.Name = "appButton"; - this.appButton.Size = new System.Drawing.Size(107, 23); + this.appButton.Size = new System.Drawing.Size(107, 26); this.appButton.TabIndex = 2; this.appButton.Text = "Applications"; this.appButton.UseVisualStyleBackColor = true; diff --git a/Project Ports/Desktop.cs b/Project Ports/Desktop.cs index 1d531c8..389b812 100644 --- a/Project Ports/Desktop.cs +++ b/Project Ports/Desktop.cs @@ -43,7 +43,7 @@ namespace Project_Ports private void dclock_Tick(object sender, EventArgs e) { - + GeneralAPI.setNameOnAppLauncher(playerName); this.ltime.Text = DateTime.Now.ToString("hh:mm tt"); } @@ -53,8 +53,6 @@ namespace Project_Ports dclock.Start(); desktopWatermark.Text = "Project: Ports " + Properties.Settings.Default.version + Environment.NewLine + "Working Progress"; appMenu.Hide(); - //TODO: Display player name in app menu - //playerName.Text = PortEngine.Properties.Settings. } diff --git a/Project Ports/Desktop.resx b/Project Ports/Desktop.resx index d77d5fb..c218578 100644 --- a/Project Ports/Desktop.resx +++ b/Project Ports/Desktop.resx @@ -123,9 +123,6 @@ 21, 15 - - 21, 15 - True -- cgit v1.2.3