From a77c83736c8afa10c8c8fc93e4531c9f6d42f1dd Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Fri, 10 Oct 2025 12:07:16 +0900 Subject: [PATCH] Add editor and community buttons with icons to MainForm Replaced the community link label with a button featuring an icon, and added a new button to start the editor with its own icon. Updated resource files and designer code to support these changes, and adjusted related event handlers and UI text for clarity. --- .../WelsonJS.Launcher/EnvForm.Designer.cs | 8 +- .../WelsonJS.Launcher/MainForm.Designer.cs | 70 +++++++++++------- .../WelsonJS.Launcher/MainForm.cs | 23 ++++-- .../WelsonJS.Launcher/MainForm.resx | 3 + .../Properties/Resources.Designer.cs | 20 +++++ .../Properties/Resources.resx | 6 ++ .../Resources/icon_community_32.png | Bin 0 -> 1362 bytes .../Resources/icon_editor_32.png | Bin 0 -> 1019 bytes .../WelsonJS.Launcher.csproj | 6 ++ 9 files changed, 101 insertions(+), 35 deletions(-) create mode 100644 WelsonJS.Toolkit/WelsonJS.Launcher/Resources/icon_community_32.png create mode 100644 WelsonJS.Toolkit/WelsonJS.Launcher/Resources/icon_editor_32.png diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/EnvForm.Designer.cs b/WelsonJS.Toolkit/WelsonJS.Launcher/EnvForm.Designer.cs index c8d4aaa..eeb8b1b 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/EnvForm.Designer.cs +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/EnvForm.Designer.cs @@ -125,7 +125,7 @@ this.btnOpenFile.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnOpenFile.Location = new System.Drawing.Point(31, 169); this.btnOpenFile.Name = "btnOpenFile"; - this.btnOpenFile.Padding = new System.Windows.Forms.Padding(11, 0, 0, 0); + this.btnOpenFile.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.btnOpenFile.Size = new System.Drawing.Size(201, 40); this.btnOpenFile.TabIndex = 5; this.btnOpenFile.Text = "Open the file..."; @@ -140,7 +140,7 @@ this.btnOpenDirectory.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnOpenDirectory.Location = new System.Drawing.Point(31, 123); this.btnOpenDirectory.Name = "btnOpenDirectory"; - this.btnOpenDirectory.Padding = new System.Windows.Forms.Padding(11, 0, 0, 0); + this.btnOpenDirectory.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.btnOpenDirectory.Size = new System.Drawing.Size(201, 40); this.btnOpenDirectory.TabIndex = 4; this.btnOpenDirectory.Text = "Open the directory..."; @@ -198,7 +198,7 @@ this.btnExport.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnExport.Location = new System.Drawing.Point(213, 29); this.btnExport.Name = "btnExport"; - this.btnExport.Padding = new System.Windows.Forms.Padding(11, 0, 0, 0); + this.btnExport.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.btnExport.Size = new System.Drawing.Size(176, 40); this.btnExport.TabIndex = 6; this.btnExport.Text = "Export"; @@ -211,7 +211,7 @@ this.btnImport.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnImport.Location = new System.Drawing.Point(31, 29); this.btnImport.Name = "btnImport"; - this.btnImport.Padding = new System.Windows.Forms.Padding(11, 0, 0, 0); + this.btnImport.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.btnImport.Size = new System.Drawing.Size(176, 40); this.btnImport.TabIndex = 5; this.btnImport.Text = "Import"; diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.Designer.cs b/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.Designer.cs index b298512..76ba271 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.Designer.cs +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.Designer.cs @@ -32,7 +32,6 @@ this.btnRunFromZipFile = new System.Windows.Forms.Button(); this.btnRunFromExternalLink = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.cbUseSpecificScript = new System.Windows.Forms.CheckBox(); this.txtUseSpecificScript = new System.Windows.Forms.TextBox(); this.cbInteractiveServiceApp = new System.Windows.Forms.CheckBox(); @@ -42,13 +41,16 @@ this.instancesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.runAsAdministratorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.globalSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.startCodeEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.startTheEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openCopilotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.openLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openCodeEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.btnStartTheEditor = new System.Windows.Forms.Button(); + this.btnJoinTheCommunity = new System.Windows.Forms.Button(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); @@ -60,7 +62,7 @@ this.btnRunFromZipFile.Name = "btnRunFromZipFile"; this.btnRunFromZipFile.Size = new System.Drawing.Size(200, 200); this.btnRunFromZipFile.TabIndex = 0; - this.btnRunFromZipFile.Text = "From ZIP file..."; + this.btnRunFromZipFile.Text = "From a package file..."; this.btnRunFromZipFile.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.btnRunFromZipFile.UseVisualStyleBackColor = true; this.btnRunFromZipFile.Click += new System.EventHandler(this.btnRunFromZipFile_Click); @@ -72,7 +74,7 @@ this.btnRunFromExternalLink.Name = "btnRunFromExternalLink"; this.btnRunFromExternalLink.Size = new System.Drawing.Size(200, 200); this.btnRunFromExternalLink.TabIndex = 1; - this.btnRunFromExternalLink.Text = "From external link..."; + this.btnRunFromExternalLink.Text = "From an external source..."; this.btnRunFromExternalLink.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.btnRunFromExternalLink.UseVisualStyleBackColor = true; this.btnRunFromExternalLink.Click += new System.EventHandler(this.btnRunFromExternalLink_Click); @@ -86,17 +88,6 @@ this.label1.TabIndex = 2; this.label1.Text = "Choose the location of WelsonJS application package."; // - // linkLabel1 - // - this.linkLabel1.AutoSize = true; - this.linkLabel1.Location = new System.Drawing.Point(24, 345); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(327, 12); - this.linkLabel1.TabIndex = 3; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "WelsonJS is open-source software. Join our community!"; - this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); - // // cbUseSpecificScript // this.cbUseSpecificScript.AutoSize = true; @@ -143,7 +134,7 @@ this.instancesToolStripMenuItem, this.runAsAdministratorToolStripMenuItem, this.globalSettingsToolStripMenuItem, - this.startCodeEditorToolStripMenuItem, + this.startTheEditorToolStripMenuItem, this.openCopilotToolStripMenuItem}); this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; this.settingsToolStripMenuItem.Size = new System.Drawing.Size(62, 20); @@ -177,12 +168,12 @@ this.globalSettingsToolStripMenuItem.Text = "Global settings..."; this.globalSettingsToolStripMenuItem.Click += new System.EventHandler(this.globalSettingsToolStripMenuItem_Click); // - // startCodeEditorToolStripMenuItem + // startTheEditorToolStripMenuItem // - this.startCodeEditorToolStripMenuItem.Name = "startCodeEditorToolStripMenuItem"; - this.startCodeEditorToolStripMenuItem.Size = new System.Drawing.Size(196, 22); - this.startCodeEditorToolStripMenuItem.Text = "Start the code editor..."; - this.startCodeEditorToolStripMenuItem.Click += new System.EventHandler(this.startCodeEditorToolStripMenuItem_Click); + this.startTheEditorToolStripMenuItem.Name = "startTheEditorToolStripMenuItem"; + this.startTheEditorToolStripMenuItem.Size = new System.Drawing.Size(196, 22); + this.startTheEditorToolStripMenuItem.Text = "Start the editor..."; + this.startTheEditorToolStripMenuItem.Click += new System.EventHandler(this.startCodeEditorToolStripMenuItem_Click); // // openCopilotToolStripMenuItem // @@ -225,15 +216,42 @@ this.exitToolStripMenuItem.Size = new System.Drawing.Size(198, 22); this.exitToolStripMenuItem.Text = "Exit"; // + // btnStartTheEditor + // + this.btnStartTheEditor.Image = global::WelsonJS.Launcher.Properties.Resources.icon_editor_32; + this.btnStartTheEditor.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnStartTheEditor.Location = new System.Drawing.Point(25, 344); + this.btnStartTheEditor.Name = "btnStartTheEditor"; + this.btnStartTheEditor.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnStartTheEditor.Size = new System.Drawing.Size(200, 40); + this.btnStartTheEditor.TabIndex = 8; + this.btnStartTheEditor.Text = "Start the editor..."; + this.btnStartTheEditor.UseVisualStyleBackColor = true; + this.btnStartTheEditor.Click += new System.EventHandler(this.btnStartTheEditor_Click); + // + // btnJoinTheCommunity + // + this.btnJoinTheCommunity.Image = global::WelsonJS.Launcher.Properties.Resources.icon_community_32; + this.btnJoinTheCommunity.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnJoinTheCommunity.Location = new System.Drawing.Point(230, 344); + this.btnJoinTheCommunity.Name = "btnJoinTheCommunity"; + this.btnJoinTheCommunity.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnJoinTheCommunity.Size = new System.Drawing.Size(200, 40); + this.btnJoinTheCommunity.TabIndex = 9; + this.btnJoinTheCommunity.Text = "Join the community"; + this.btnJoinTheCommunity.UseVisualStyleBackColor = true; + this.btnJoinTheCommunity.Click += new System.EventHandler(this.btnJoinTheCommunity_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(461, 382); + this.ClientSize = new System.Drawing.Size(461, 404); + this.Controls.Add(this.btnJoinTheCommunity); + this.Controls.Add(this.btnStartTheEditor); this.Controls.Add(this.cbInteractiveServiceApp); this.Controls.Add(this.txtUseSpecificScript); this.Controls.Add(this.cbUseSpecificScript); - this.Controls.Add(this.linkLabel1); this.Controls.Add(this.label1); this.Controls.Add(this.btnRunFromExternalLink); this.Controls.Add(this.btnRunFromZipFile); @@ -257,7 +275,6 @@ private System.Windows.Forms.Button btnRunFromZipFile; private System.Windows.Forms.Button btnRunFromExternalLink; private System.Windows.Forms.Label label1; - private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.CheckBox cbUseSpecificScript; private System.Windows.Forms.TextBox txtUseSpecificScript; private System.Windows.Forms.CheckBox cbInteractiveServiceApp; @@ -267,13 +284,16 @@ private System.Windows.Forms.ToolStripMenuItem instancesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem runAsAdministratorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem globalSettingsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem startCodeEditorToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem startTheEditorToolStripMenuItem; private System.Windows.Forms.NotifyIcon notifyIcon1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openCodeEditorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openLauncherToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openCopilotToolStripMenuItem; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.Button btnStartTheEditor; + private System.Windows.Forms.Button btnJoinTheCommunity; } } diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.cs b/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.cs index 6787c99..05b4786 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.cs +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.cs @@ -186,7 +186,10 @@ namespace WelsonJS.Launcher if (!Program._resourceServer.IsRunning()) { Program._resourceServer.Start(false); - startCodeEditorToolStripMenuItem.Text = "Open the code editor..."; + + string text = "Open the editor..."; + startTheEditorToolStripMenuItem.Text = text; + btnStartTheEditor.Text = text; } return Program._resourceServer.IsRunning(); @@ -245,11 +248,6 @@ namespace WelsonJS.Launcher txtUseSpecificScript.Enabled = cbUseSpecificScript.Checked; } - private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - Program.OpenWebBrowser(Program.GetAppConfig("RepositoryUrl")); - } - private void userdefinedVariablesToolStripMenuItem_Click(object sender, EventArgs e) { (new EnvForm()).Show(); @@ -316,5 +314,18 @@ namespace WelsonJS.Launcher { Program.OpenWebBrowser(Program.GetAppConfig("CopilotUrl")); } + + private void btnStartTheEditor_Click(object sender, EventArgs e) + { + if (RunResourceServer()) + { + Program.OpenWebBrowser(Program._resourceServer.GetPrefix()); + } + } + + private void btnJoinTheCommunity_Click(object sender, EventArgs e) + { + Program.OpenWebBrowser(Program.GetAppConfig("RepositoryUrl")); + } } } diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.resx b/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.resx index 87d44fc..0b3aa9f 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.resx +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/MainForm.resx @@ -126,4 +126,7 @@ 249, 17 + + 407, 17 + \ No newline at end of file diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.Designer.cs b/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.Designer.cs index 9a9e2a2..d329414 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.Designer.cs +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.Designer.cs @@ -197,6 +197,16 @@ namespace WelsonJS.Launcher.Properties { } } + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icon_community_32 { + get { + object obj = ResourceManager.GetObject("icon_community_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. /// @@ -217,6 +227,16 @@ namespace WelsonJS.Launcher.Properties { } } + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icon_editor_32 { + get { + object obj = ResourceManager.GetObject("icon_editor_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. /// diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.resx b/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.resx index c682ff9..7397892 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.resx +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/Resources.resx @@ -223,4 +223,10 @@ + + ..\Resources\icon_community_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icon_editor_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/Resources/icon_community_32.png b/WelsonJS.Toolkit/WelsonJS.Launcher/Resources/icon_community_32.png new file mode 100644 index 0000000000000000000000000000000000000000..5f09dda335e8525c0e14135d29e42c6bf0974546 GIT binary patch literal 1362 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?3oVGw3ym^DWND7Ymx z!ZXd&Q;UHE$YEm;Vq|7u1hPO_ijfsehXL8rP<9-UtpQc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ee`K~akK5qG9%h!VlDqqlA3GLzX1Q#q;skg2cqiKj)y40S7)doB&KSCO?@@FRcbEeY3) z_8%*@soyr-om0l#^LOf{xzn~k`1xgX@q%0Sy`DPZD;8>W%{%@#MX69A;rFNV{O`6i zW>x+5yl!l3Wc~2xaRp1WM89n*35G`d_In=+bZVXc_U*@dA!&~_pZ^{#>^7ca)b_(N zUdK;&&TEs6tjDvtmMAjRbKXc?qh>tMUU_A3lVZW?iFd7|r0QdGS2gQ9*mZ3?W4`m= z_w5md{0++241(8edi6i~L+ZuF27B0F=`H+}baH=NZ?XN!gnzKl=jV+Ot)=e5!v5m>8ko-C_We+0$2I-B@!6wdk1ONWPuwPXse3n5 zO-H6sCd2AysiKVjkGm%ysb_eUykqWzf_)-#>%`~(;Cb}v^{%}68_Rf)*ahBY*(JDN oIz_JR+nQZw@y^pC9^HP*9J)kH?dbB?<)94U>FVdQ&MBb@0B5L&)c^nh literal 0 HcmV?d00001 diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/WelsonJS.Launcher.csproj b/WelsonJS.Toolkit/WelsonJS.Launcher/WelsonJS.Launcher.csproj index e609a60..5bc8b61 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/WelsonJS.Launcher.csproj +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/WelsonJS.Launcher.csproj @@ -197,5 +197,11 @@ WelsonJS.Esent + + + + + + \ No newline at end of file