Update the namespaces

This commit is contained in:
Namhyeon Go 2025-03-20 09:42:38 +09:00
parent e68c1e5e2f
commit 81d6e67f94
7 changed files with 20 additions and 18 deletions

View File

@ -43,12 +43,12 @@
this.runAsAdministratorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.runAsAdministratorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.globalSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.globalSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startCodeEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.startCodeEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openMicrosoftCopilotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.openLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openCodeEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openCodeEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openMicrosoftCopilotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -184,11 +184,18 @@
this.startCodeEditorToolStripMenuItem.Text = "Start the code editor..."; this.startCodeEditorToolStripMenuItem.Text = "Start the code editor...";
this.startCodeEditorToolStripMenuItem.Click += new System.EventHandler(this.startCodeEditorToolStripMenuItem_Click); this.startCodeEditorToolStripMenuItem.Click += new System.EventHandler(this.startCodeEditorToolStripMenuItem_Click);
// //
// openMicrosoftCopilotToolStripMenuItem
//
this.openMicrosoftCopilotToolStripMenuItem.Name = "openMicrosoftCopilotToolStripMenuItem";
this.openMicrosoftCopilotToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.openMicrosoftCopilotToolStripMenuItem.Text = "Open Microsoft Copilot...";
this.openMicrosoftCopilotToolStripMenuItem.Click += new System.EventHandler(this.openMicrosoftCopilotToolStripMenuItem_Click);
//
// notifyIcon1 // notifyIcon1
// //
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1; this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
this.notifyIcon1.Icon = global::WelsonJS.Launcher.Properties.Resources.favicon; this.notifyIcon1.Icon = global::WelsonJS.Launcher.Properties.Resources.favicon;
this.notifyIcon1.Text = "notifyIcon1"; this.notifyIcon1.Text = "WelsonJS Launcher";
// //
// contextMenuStrip1 // contextMenuStrip1
// //
@ -218,13 +225,6 @@
this.exitToolStripMenuItem.Size = new System.Drawing.Size(198, 22); this.exitToolStripMenuItem.Size = new System.Drawing.Size(198, 22);
this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Text = "Exit";
// //
// openMicrosoftCopilotToolStripMenuItem
//
this.openMicrosoftCopilotToolStripMenuItem.Name = "openMicrosoftCopilotToolStripMenuItem";
this.openMicrosoftCopilotToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.openMicrosoftCopilotToolStripMenuItem.Text = "Open Microsoft Copilot...";
this.openMicrosoftCopilotToolStripMenuItem.Click += new System.EventHandler(this.openMicrosoftCopilotToolStripMenuItem_Click);
//
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);

View File

@ -5,6 +5,7 @@ using System.IO.Compression;
using System.Security.Principal; using System.Security.Principal;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using WelsonJS.Launcher.Tools;
namespace WelsonJS.Launcher namespace WelsonJS.Launcher
{ {

View File

@ -3,6 +3,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using WelsonJS.Launcher.Tools;
namespace WelsonJS.Launcher namespace WelsonJS.Launcher
{ {

View File

@ -4,10 +4,11 @@ using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text; using System.Text;
namespace WelsonJS.Launcher namespace WelsonJS.Launcher.Tools
{ {
public class DnsQuery public class DnsQuery
{ {
private static readonly Random _random = new Random();
private readonly string _dnsServer; private readonly string _dnsServer;
private const int DnsPort = 53; private const int DnsPort = 53;
private const int Timeout = 5000; private const int Timeout = 5000;
@ -76,11 +77,10 @@ namespace WelsonJS.Launcher
private byte[] CreateDnsQuery(string domain, ushort type) private byte[] CreateDnsQuery(string domain, ushort type)
{ {
Random rand = new Random();
byte[] query = new byte[512]; byte[] query = new byte[512];
query[0] = (byte)rand.Next(0, 256); query[0] = (byte)_random.Next(0, 256);
query[1] = (byte)rand.Next(0, 256); query[1] = (byte)_random.Next(0, 256);
query[2] = 0x01; query[2] = 0x01;
query[3] = 0x00; query[3] = 0x00;
query[4] = 0x00; query[4] = 0x00;

View File

@ -7,7 +7,7 @@ using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace WelsonJS.Launcher namespace WelsonJS.Launcher.Tools
{ {
public class ExecutablesCollector public class ExecutablesCollector
{ {

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml.Linq; using System.Xml.Linq;
namespace WelsonJS.Launcher namespace WelsonJS.Launcher.Tools
{ {
public class ResourceServer public class ResourceServer
{ {

View File

@ -72,14 +72,14 @@
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="DnsQuery.cs" /> <Compile Include="Tools\DnsQuery.cs" />
<Compile Include="EnvForm.cs"> <Compile Include="EnvForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="EnvForm.Designer.cs"> <Compile Include="EnvForm.Designer.cs">
<DependentUpon>EnvForm.cs</DependentUpon> <DependentUpon>EnvForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ExecutablesCollector.cs" /> <Compile Include="Tools\ExecutablesCollector.cs" />
<Compile Include="InstancesForm.cs"> <Compile Include="InstancesForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -100,7 +100,7 @@
<Compile Include="GlobalSettingsForm.Designer.cs"> <Compile Include="GlobalSettingsForm.Designer.cs">
<DependentUpon>GlobalSettingsForm.cs</DependentUpon> <DependentUpon>GlobalSettingsForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ResourceServer.cs" /> <Compile Include="Tools\ResourceServer.cs" />
<EmbeddedResource Include="EnvForm.resx"> <EmbeddedResource Include="EnvForm.resx">
<DependentUpon>EnvForm.cs</DependentUpon> <DependentUpon>EnvForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>