This commit is contained in:
Thomas G 2022-07-29 19:16:13 +10:00
parent 848f21259d
commit bb5152b6f5
6 changed files with 37 additions and 12 deletions

View File

@ -34,6 +34,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>archblox.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -92,6 +95,15 @@
<None Include="Resources\Thumbs.db" />
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<Guid>{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Shell32">
<Guid>{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}</Guid>
<VersionMajor>1</VersionMajor>

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ARCHBLOXLauncher_XP", "ARCHBLOXLauncher_XP\ARCHBLOXLauncher_XP.csproj", "{11134DDF-A25D-4EF8-89A6-1A1BF2310F07}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ARCHBLOXLauncher_XP", "ARCHBLOXLauncher_XP.csproj", "{11134DDF-A25D-4EF8-89A6-1A1BF2310F07}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -72,7 +72,7 @@
// serverip
//
this.serverip.CharacterCasing = System.Windows.Forms.CharacterCasing.Lower;
this.serverip.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.serverip.ForeColor = System.Drawing.SystemColors.MenuText;
this.serverip.Location = new System.Drawing.Point(5, 34);
this.serverip.MaxLength = 15;
this.serverip.Name = "serverip";
@ -91,7 +91,7 @@
//
// serverport
//
this.serverport.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.serverport.ForeColor = System.Drawing.SystemColors.MenuText;
this.serverport.Location = new System.Drawing.Point(5, 72);
this.serverport.MaxLength = 5;
this.serverport.Name = "serverport";
@ -152,7 +152,7 @@
//
// textBox1
//
this.textBox1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.textBox1.ForeColor = System.Drawing.SystemColors.MenuText;
this.textBox1.Location = new System.Drawing.Point(5, 32);
this.textBox1.MaxLength = 5;
this.textBox1.Name = "textBox1";
@ -185,7 +185,7 @@
//
// textBox2
//
this.textBox2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.textBox2.ForeColor = System.Drawing.SystemColors.MenuText;
this.textBox2.Location = new System.Drawing.Point(5, 71);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(168, 21);

View File

@ -1,4 +1,5 @@
using System;
using IWshRuntimeLibrary;
using System;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
@ -19,10 +20,22 @@ namespace ARCHBLOXLauncher_XP
static string clientPath = Path.Combine(folderPath, version_string + @"\");
static string filePath = Path.Combine(clientPath, "ArchbloxPlayerBeta.exe");
// animations
private void CreateShortcut()
{
// create a shorcut on the user's desktop
object shDesktop = (object)"Desktop";
WshShell shell = new WshShell();
string shortcutAddress = (string)shell.SpecialFolders.Item(ref shDesktop) + @"\ARCHBLOX Launcher.lnk";
IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutAddress);
shortcut.Description = "ARCHBLOX Launcher";
shortcut.TargetPath = Extensions.GetExecutablePath();
shortcut.Save();
}
public Form1()
{
InitializeComponent();
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register();
CreateShortcut();
var lastword = "";
var info1 = "";
var info2 = "";
@ -220,7 +233,7 @@ namespace ARCHBLOXLauncher_XP
{
// it's supported, yay!
string destFile = Path.Combine(clientPath, @"Content\", Path.GetFileName(dialog.FileName));
System.IO.File.Copy(dialog.FileName, destFile, true);
if (!System.IO.File.Exists(destFile)) { System.IO.File.Copy(dialog.FileName, destFile, true); }
textBox2.Text = Path.GetFileName(dialog.FileName);
return;
}

View File

@ -5,12 +5,12 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WindowsFormsApplication1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("ARCHBLOX Launcher")]
[assembly: AssemblyDescription("ARCHBLOX Launcher for Windows XP and Vista")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WindowsFormsApplication1")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@ -7,7 +7,7 @@ namespace ARCHBLOXProtocol
};
internal static class ARCHBLOXURIProtocol
{
private static RegistryKey softwareClasses = Registry.CurrentUser.OpenSubKey("Software").OpenSubKey("Classes", true);
private static RegistryKey softwareClasses = Registry.CurrentUser.OpenSubKey("Software").OpenSubKey("Classes").OpenSubKey("Software",true);
internal static void Register()
{