Add project files.
This commit is contained in:
parent
5a5de42af7
commit
816b84fd23
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.32630.194
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ARCHBLOXLauncher_XP", "ARCHBLOXLauncher_XP\ARCHBLOXLauncher_XP.csproj", "{8DF23FBD-B288-40AF-B820-67F6BE8F7D94}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8DF23FBD-B288-40AF-B820-67F6BE8F7D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8DF23FBD-B288-40AF-B820-67F6BE8F7D94}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8DF23FBD-B288-40AF-B820-67F6BE8F7D94}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8DF23FBD-B288-40AF-B820-67F6BE8F7D94}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {50024C77-2D61-4718-BA4E-35931D18035A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8DF23FBD-B288-40AF-B820-67F6BE8F7D94}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>ARCHBLOXLauncher_XP</RootNamespace>
|
||||
<AssemblyName>ARCHBLOXLauncher_XP</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>C:\Users\Thomas\OneDrive\Documents\ARCHBLOXLauncherLegacy\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<AutorunEnabled>true</AutorunEnabled>
|
||||
<ApplicationRevision>2</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\..\OneDrive\Documents\ARCHBLOXLauncherLegacy\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>75BD841DDF4341CEB3C0CB2CF037AB995CBA742B</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>ARCHBLOXLauncher_XP_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Extensions.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Form2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form2.Designer.cs">
|
||||
<DependentUpon>Form2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="URI_Maker.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form2.resx">
|
||||
<DependentUpon>Form2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="ARCHBLOXLauncher_XP_TemporaryKey.pfx" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\unknown.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\buttonblue200.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\buttongreen200.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\archbloxlowres.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\archblox.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
|
||||
namespace ARCHBLOXLauncher_XP
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
|
||||
static extern uint GetModuleFileName(IntPtr hModule, System.Text.StringBuilder lpFilename, int nSize);
|
||||
public static string GetExecutablePath()
|
||||
{
|
||||
return System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,350 @@
|
|||
namespace ARCHBLOXLauncher_XP
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.JoinBox = new System.Windows.Forms.GroupBox();
|
||||
this.serverip = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.serverport = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.HostBox = new System.Windows.Forms.GroupBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.BackBTN = new System.Windows.Forms.Button();
|
||||
this.UpdateBTN = new System.Windows.Forms.Button();
|
||||
this.JoinBTN = new System.Windows.Forms.Button();
|
||||
this.HostBTN = new System.Windows.Forms.Button();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.JoinBox.SuspendLayout();
|
||||
this.HostBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// JoinBox
|
||||
//
|
||||
this.JoinBox.BackColor = System.Drawing.Color.Black;
|
||||
this.JoinBox.Controls.Add(this.serverip);
|
||||
this.JoinBox.Controls.Add(this.label4);
|
||||
this.JoinBox.Controls.Add(this.serverport);
|
||||
this.JoinBox.Controls.Add(this.label7);
|
||||
this.JoinBox.Controls.Add(this.button2);
|
||||
this.JoinBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.JoinBox.Location = new System.Drawing.Point(6, 45);
|
||||
this.JoinBox.Name = "JoinBox";
|
||||
this.JoinBox.Size = new System.Drawing.Size(245, 130);
|
||||
this.JoinBox.TabIndex = 26;
|
||||
this.JoinBox.TabStop = false;
|
||||
this.JoinBox.Visible = false;
|
||||
//
|
||||
// serverip
|
||||
//
|
||||
this.serverip.CharacterCasing = System.Windows.Forms.CharacterCasing.Lower;
|
||||
this.serverip.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.serverip.Location = new System.Drawing.Point(5, 34);
|
||||
this.serverip.MaxLength = 15;
|
||||
this.serverip.Name = "serverip";
|
||||
this.serverip.Size = new System.Drawing.Size(237, 21);
|
||||
this.serverip.TabIndex = 18;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label4.Location = new System.Drawing.Point(5, 17);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(251, 13);
|
||||
this.label4.TabIndex = 17;
|
||||
this.label4.Text = "Server IP (Use localhost if joining your own server)";
|
||||
//
|
||||
// serverport
|
||||
//
|
||||
this.serverport.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.serverport.Location = new System.Drawing.Point(5, 72);
|
||||
this.serverport.MaxLength = 5;
|
||||
this.serverport.Name = "serverport";
|
||||
this.serverport.Size = new System.Drawing.Size(235, 21);
|
||||
this.serverport.TabIndex = 19;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label7.Location = new System.Drawing.Point(5, 58);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(62, 13);
|
||||
this.label7.TabIndex = 25;
|
||||
this.label7.Text = "Server Port";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
|
||||
this.button2.BackgroundImage = global::ARCHBLOXLauncher_XP.Properties.Resources.buttongreen200;
|
||||
this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.button2.Location = new System.Drawing.Point(5, 101);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(235, 19);
|
||||
this.button2.TabIndex = 24;
|
||||
this.button2.Text = "Join";
|
||||
this.button2.UseVisualStyleBackColor = false;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// HostBox
|
||||
//
|
||||
this.HostBox.BackColor = System.Drawing.Color.Black;
|
||||
this.HostBox.Controls.Add(this.label2);
|
||||
this.HostBox.Controls.Add(this.textBox1);
|
||||
this.HostBox.Controls.Add(this.label3);
|
||||
this.HostBox.Controls.Add(this.button3);
|
||||
this.HostBox.Controls.Add(this.textBox2);
|
||||
this.HostBox.Controls.Add(this.button1);
|
||||
this.HostBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.HostBox.Location = new System.Drawing.Point(6, 45);
|
||||
this.HostBox.Name = "HostBox";
|
||||
this.HostBox.Size = new System.Drawing.Size(247, 122);
|
||||
this.HostBox.TabIndex = 27;
|
||||
this.HostBox.TabStop = false;
|
||||
this.HostBox.Visible = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Location = new System.Drawing.Point(3, 17);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(148, 13);
|
||||
this.label2.TabIndex = 23;
|
||||
this.label2.Text = "Port (53640 is recommended)";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.textBox1.Location = new System.Drawing.Point(5, 32);
|
||||
this.textBox1.MaxLength = 5;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(235, 21);
|
||||
this.textBox1.TabIndex = 24;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label3.Location = new System.Drawing.Point(3, 55);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(171, 13);
|
||||
this.label3.TabIndex = 27;
|
||||
this.label3.Text = "Filename (use temp.rbxl if unsure)";
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.BackgroundImage = global::ARCHBLOXLauncher_XP.Properties.Resources.buttonblue200;
|
||||
this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.button3.Location = new System.Drawing.Point(177, 70);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(63, 19);
|
||||
this.button3.TabIndex = 26;
|
||||
this.button3.Text = "Browse...";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.textBox2.Location = new System.Drawing.Point(5, 71);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(168, 21);
|
||||
this.textBox2.TabIndex = 25;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
|
||||
this.button1.BackgroundImage = global::ARCHBLOXLauncher_XP.Properties.Resources.buttongreen200;
|
||||
this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.button1.Location = new System.Drawing.Point(5, 95);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(235, 19);
|
||||
this.button1.TabIndex = 28;
|
||||
this.button1.Text = "Host";
|
||||
this.button1.UseVisualStyleBackColor = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// BackBTN
|
||||
//
|
||||
this.BackBTN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.BackBTN.BackgroundImage = global::ARCHBLOXLauncher_XP.Properties.Resources.buttonblue200;
|
||||
this.BackBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.BackBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.BackBTN.Font = new System.Drawing.Font("Tahoma", 10.25F, System.Drawing.FontStyle.Bold);
|
||||
this.BackBTN.Location = new System.Drawing.Point(194, 12);
|
||||
this.BackBTN.Name = "BackBTN";
|
||||
this.BackBTN.Size = new System.Drawing.Size(60, 27);
|
||||
this.BackBTN.TabIndex = 31;
|
||||
this.BackBTN.Text = "Back";
|
||||
this.BackBTN.UseVisualStyleBackColor = false;
|
||||
this.BackBTN.Visible = false;
|
||||
this.BackBTN.Click += new System.EventHandler(this.BackBTN_Click);
|
||||
//
|
||||
// UpdateBTN
|
||||
//
|
||||
this.UpdateBTN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.UpdateBTN.BackgroundImage = global::ARCHBLOXLauncher_XP.Properties.Resources.buttonblue200;
|
||||
this.UpdateBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.UpdateBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.UpdateBTN.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Bold);
|
||||
this.UpdateBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.UpdateBTN.Location = new System.Drawing.Point(10, 61);
|
||||
this.UpdateBTN.Name = "UpdateBTN";
|
||||
this.UpdateBTN.Size = new System.Drawing.Size(237, 45);
|
||||
this.UpdateBTN.TabIndex = 30;
|
||||
this.UpdateBTN.Text = "Install";
|
||||
this.UpdateBTN.UseVisualStyleBackColor = false;
|
||||
this.UpdateBTN.Click += new System.EventHandler(this.UpdateBTN_Click);
|
||||
//
|
||||
// JoinBTN
|
||||
//
|
||||
this.JoinBTN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.JoinBTN.BackgroundImage = global::ARCHBLOXLauncher_XP.Properties.Resources.buttonblue200;
|
||||
this.JoinBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.JoinBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.JoinBTN.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Bold);
|
||||
this.JoinBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.JoinBTN.Location = new System.Drawing.Point(133, 112);
|
||||
this.JoinBTN.Name = "JoinBTN";
|
||||
this.JoinBTN.Size = new System.Drawing.Size(116, 45);
|
||||
this.JoinBTN.TabIndex = 29;
|
||||
this.JoinBTN.Text = "Join a Game";
|
||||
this.JoinBTN.UseVisualStyleBackColor = false;
|
||||
this.JoinBTN.Click += new System.EventHandler(this.JoinBTN_Click);
|
||||
//
|
||||
// HostBTN
|
||||
//
|
||||
this.HostBTN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.HostBTN.BackgroundImage = global::ARCHBLOXLauncher_XP.Properties.Resources.buttonblue200;
|
||||
this.HostBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.HostBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.HostBTN.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Bold);
|
||||
this.HostBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.HostBTN.Location = new System.Drawing.Point(10, 112);
|
||||
this.HostBTN.Name = "HostBTN";
|
||||
this.HostBTN.Size = new System.Drawing.Size(117, 45);
|
||||
this.HostBTN.TabIndex = 28;
|
||||
this.HostBTN.Text = "Host a Game";
|
||||
this.HostBTN.UseVisualStyleBackColor = false;
|
||||
this.HostBTN.Click += new System.EventHandler(this.HostBTN_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.pictureBox1.Image = global::ARCHBLOXLauncher_XP.Properties.Resources.archbloxlowres;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(14, 5);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(174, 34);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.Location = new System.Drawing.Point(12, 35);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(131, 13);
|
||||
this.label1.TabIndex = 26;
|
||||
this.label1.Text = "Windows XP/Vista Edition";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Black;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.ClientSize = new System.Drawing.Size(259, 179);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.BackBTN);
|
||||
this.Controls.Add(this.UpdateBTN);
|
||||
this.Controls.Add(this.JoinBTN);
|
||||
this.Controls.Add(this.HostBTN);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.JoinBox);
|
||||
this.Controls.Add(this.HostBox);
|
||||
this.DoubleBuffered = true;
|
||||
this.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "Form1";
|
||||
this.Text = "ARCHBLOX";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.JoinBox.ResumeLayout(false);
|
||||
this.JoinBox.PerformLayout();
|
||||
this.HostBox.ResumeLayout(false);
|
||||
this.HostBox.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.GroupBox JoinBox;
|
||||
private System.Windows.Forms.TextBox serverip;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox serverport;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.GroupBox HostBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button HostBTN;
|
||||
private System.Windows.Forms.Button JoinBTN;
|
||||
private System.Windows.Forms.Button UpdateBTN;
|
||||
private System.Windows.Forms.Button BackBTN;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,285 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
namespace ARCHBLOXLauncher_XP
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
// variables
|
||||
bool rbxl = false;
|
||||
bool exitafterarg = false;
|
||||
private static WebClient wc = new WebClient();
|
||||
static byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
|
||||
static string webData = Encoding.UTF8.GetString(raw);
|
||||
static string version_string = webData;
|
||||
static string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
|
||||
static string clientPath = Path.Combine(folderPath, version_string + @"\");
|
||||
static string filePath = Path.Combine(clientPath, "ArchbloxPlayerBeta.exe");
|
||||
// animations
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register();
|
||||
var lastword = "";
|
||||
var info1 = "";
|
||||
var info2 = "";
|
||||
string[] args = ARCHBLOXProtocol.SharedVariables.Arguments.Split('/');
|
||||
// check to see if uri/arguments were used
|
||||
foreach (var word in args)
|
||||
{
|
||||
if (lastword == "host")
|
||||
{
|
||||
exitafterarg = true;
|
||||
lastword = "stop";
|
||||
string[] info = word.Split('|');
|
||||
foreach (var word2 in info)
|
||||
{
|
||||
if (info1 == "")
|
||||
{
|
||||
info1 = word2;
|
||||
}
|
||||
else
|
||||
{
|
||||
info2 = word2;
|
||||
}
|
||||
}
|
||||
if (info1 == "" || info2 == "")
|
||||
{
|
||||
MessageBox.Show("Paramaters are invalid. Please try again. (ID: 500)", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
var pProcess = new Process();
|
||||
pProcess.StartInfo.FileName = filePath;
|
||||
pProcess.StartInfo.Arguments = "-a \"http://www.morblox.us/\" -j \"http://www.morblox.us/game/gameserver.php?port=" + info1 + "&rbxl=" + info2 + "\" -t \"1\"";
|
||||
pProcess.StartInfo.UseShellExecute = false;
|
||||
pProcess.StartInfo.RedirectStandardOutput = true;
|
||||
pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
pProcess.StartInfo.CreateNoWindow = false;
|
||||
pProcess.Start();
|
||||
MessageBox.Show("Starting game server on port " + info1 + " using " + info2, "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
if (lastword == "join")
|
||||
{
|
||||
exitafterarg = true;
|
||||
lastword = "stop";
|
||||
string[] info = word.Split('|');
|
||||
foreach (var word2 in info)
|
||||
{
|
||||
if (info1 == "")
|
||||
{
|
||||
info1 = word2;
|
||||
}
|
||||
else
|
||||
{
|
||||
info2 = word2;
|
||||
}
|
||||
}
|
||||
if (info1 == "" || info2 == "")
|
||||
{
|
||||
MessageBox.Show("Paramaters are invalid. Please try again. (ID: 500)", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
var pProcess = new Process();
|
||||
pProcess.StartInfo.FileName = filePath;
|
||||
pProcess.StartInfo.Arguments = "-a \"http://www.morblox.us/\" -j \"http://www.morblox.us/game/join.ashx?port=" + info1 + "&ip=" + info2 + "\" -t \"1\"";
|
||||
pProcess.StartInfo.UseShellExecute = false;
|
||||
pProcess.StartInfo.RedirectStandardOutput = true;
|
||||
pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
pProcess.StartInfo.CreateNoWindow = false;
|
||||
pProcess.Start();
|
||||
MessageBox.Show("Joining " + info2 + ":" + info1, "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
if (word == "install")
|
||||
{
|
||||
ARCHBLOXLauncher_XP.Form2 form2 = new ARCHBLOXLauncher_XP.Form2();
|
||||
form2.Show();
|
||||
}
|
||||
if (word == "") { }
|
||||
else
|
||||
{
|
||||
lastword = word;
|
||||
}
|
||||
}
|
||||
if (exitafterarg == true)
|
||||
{
|
||||
// close program
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
// hosting
|
||||
string phrase = textBox2.Text;
|
||||
string[] words = phrase.Split('.');
|
||||
string sWord = "";
|
||||
foreach (var word in words)
|
||||
{
|
||||
sWord = word.ToLower();
|
||||
if (sWord == "rbxl")
|
||||
{
|
||||
rbxl = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
rbxl = false;
|
||||
}
|
||||
}
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
DialogResult res = MessageBox.Show("You need to install the latest version of ARCHBLOX to host. Would you like to install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
ARCHBLOXLauncher_XP.Form2 form2 = new ARCHBLOXLauncher_XP.Form2();
|
||||
form2.Show();
|
||||
}
|
||||
}
|
||||
else if (textBox1.Text == "" || textBox2.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please fill in all of the text fields.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else if (rbxl == false)
|
||||
{
|
||||
MessageBox.Show("Please use a valid .RBXL! ." + sWord + " is not a supported file format.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
var pProcess = new Process();
|
||||
pProcess.StartInfo.FileName = filePath;
|
||||
pProcess.StartInfo.Arguments = "-a \"http://www.morblox.us/\" -j \"http://www.morblox.us/game/gameserver.php?port=" + textBox1.Text + "&rbxl=" + textBox2.Text + "\" -t \"1\"";
|
||||
pProcess.StartInfo.UseShellExecute = false;
|
||||
pProcess.StartInfo.RedirectStandardOutput = true;
|
||||
pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
pProcess.StartInfo.CreateNoWindow = false;
|
||||
pProcess.Start();
|
||||
pProcess.EnableRaisingEvents = true;
|
||||
var random = new Random();
|
||||
MessageBox.Show("Starting game server on port " + textBox1.Text + " using " + textBox2.Text, "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
// joining
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
DialogResult res = MessageBox.Show("You need to install the latest version of ARCHBLOX to join " + serverip.Text + ":" + serverport.Text + ". Would you like to install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
ARCHBLOXLauncher_XP.Form2 form2 = new ARCHBLOXLauncher_XP.Form2();
|
||||
form2.Show();
|
||||
}
|
||||
}
|
||||
else if (serverip.Text == "" || serverport.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please fill in all of the text fields.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
var pProcess = new Process();
|
||||
pProcess.StartInfo.FileName = filePath;
|
||||
pProcess.StartInfo.Arguments = "-a \"http://www.morblox.us/\" -j \"http://www.morblox.us/game/join.ashx?port=" + serverport.Text + "&ip=" + serverip.Text + "\" -t \"1\"";
|
||||
pProcess.StartInfo.UseShellExecute = false;
|
||||
pProcess.StartInfo.RedirectStandardOutput = true;
|
||||
pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
pProcess.StartInfo.CreateNoWindow = false;
|
||||
pProcess.Start();
|
||||
pProcess.EnableRaisingEvents = true;
|
||||
MessageBox.Show("Joining " + serverip.Text + ":" + serverport.Text, "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
// ask user to open dialog
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Title = "Choose a RBXL...";
|
||||
dialog.AddExtension = true;
|
||||
dialog.Filter = "Place File (*.rbxl)| *.rbxl";
|
||||
if (DialogResult.OK == dialog.ShowDialog())
|
||||
{
|
||||
// check if it is a rbxl
|
||||
string word = Path.GetExtension(dialog.FileName);
|
||||
word = word.ToLower();
|
||||
if (word == ".rbxl")
|
||||
{
|
||||
// Thanks to ROBLOX LEGACY PLACE CONVERTER by BakonBot for the binary rbxl format detection.
|
||||
string[] file = System.IO.File.ReadAllLines(dialog.FileName);
|
||||
foreach (var line in file)
|
||||
{
|
||||
if (line.Contains("<roblox!"))
|
||||
{
|
||||
// is binary/unsupported format
|
||||
MessageBox.Show("Sorry, binary .RBXL files are not supported. Please convert the RBXL into XML format using a converter, then try again.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// it's supported, yay!
|
||||
string destFile = Path.Combine(clientPath, @"Content\", Path.GetFileName(dialog.FileName));
|
||||
System.IO.File.Copy(dialog.FileName, destFile, true);
|
||||
textBox2.Text = Path.GetFileName(dialog.FileName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (word == ".rbxlx")
|
||||
{
|
||||
// rbxlx, cringe!
|
||||
MessageBox.Show(".RBXLX file formats are not supported, are you sure you converted the .RBXL correctly?", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// wtf this isn't even a place
|
||||
MessageBox.Show(word.ToUpper() + " is not a supported file type!", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void JoinBTN_Click(object sender, EventArgs e)
|
||||
{
|
||||
JoinBTN.Visible = false;
|
||||
HostBTN.Visible = false;
|
||||
UpdateBTN.Visible = false;
|
||||
JoinBox.Visible = true;
|
||||
HostBox.Visible = false;
|
||||
BackBTN.Visible = true;
|
||||
}
|
||||
|
||||
private void UpdateBTN_Click(object sender, EventArgs e)
|
||||
{
|
||||
ARCHBLOXLauncher_XP.Form2 form2 = new ARCHBLOXLauncher_XP.Form2();
|
||||
form2.Show();
|
||||
}
|
||||
|
||||
private void BackBTN_Click(object sender, EventArgs e)
|
||||
{
|
||||
JoinBTN.Visible = true;
|
||||
HostBTN.Visible = true;
|
||||
UpdateBTN.Visible = true;
|
||||
JoinBox.Visible = false;
|
||||
HostBox.Visible = false;
|
||||
BackBTN.Visible = false;
|
||||
}
|
||||
|
||||
private void HostBTN_Click(object sender, EventArgs e)
|
||||
{
|
||||
JoinBTN.Visible = false;
|
||||
HostBTN.Visible = false;
|
||||
UpdateBTN.Visible = false;
|
||||
JoinBox.Visible = false;
|
||||
HostBox.Visible = true;
|
||||
BackBTN.Visible = true;
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,91 @@
|
|||
namespace ARCHBLOXLauncher_XP
|
||||
{
|
||||
partial class Form2
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2));
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.pictureBox1.Image = global::ARCHBLOXLauncher_XP.Properties.Resources.archblox;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(3, 5);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(39, 40);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(47, 8);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(130, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Configuring ARCHBLOX...";
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(47, 23);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(188, 20);
|
||||
this.progressBar1.TabIndex = 2;
|
||||
//
|
||||
// Form2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(240, 51);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Form2";
|
||||
this.Text = "ARCHBLOX Installer";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
namespace ARCHBLOXLauncher_XP
|
||||
{
|
||||
public partial class Form2 : Form
|
||||
{
|
||||
// setup variables
|
||||
public bool Uri_Installed = false;
|
||||
public bool IsCompleted = false;
|
||||
public bool DontEvenBother = false;
|
||||
private static WebClient wc = new WebClient();
|
||||
private static ManualResetEvent handle = new ManualResetEvent(true);
|
||||
|
||||
private static long GetDirectorySize(string folderPath)
|
||||
{
|
||||
// get size of a directory
|
||||
DirectoryInfo di = new DirectoryInfo(folderPath);
|
||||
return di.EnumerateFiles("*", SearchOption.AllDirectories).Sum(fi => fi.Length) / 1000000;
|
||||
}
|
||||
|
||||
public Form2()
|
||||
{
|
||||
InitializeComponent();
|
||||
// setup other variables
|
||||
try {
|
||||
wc.DownloadData("https://archblox.com/client/version.txt");
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Unable to connect to the ARCHBLOX servers!", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
label1.Text = "Cancelled install.";
|
||||
return;
|
||||
}
|
||||
byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
|
||||
string webData = Encoding.UTF8.GetString(raw);
|
||||
string version_string = webData;
|
||||
string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
|
||||
string clientPath = Path.Combine(folderPath, version_string + @"\");
|
||||
string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip"));
|
||||
// setup file paths etc
|
||||
{
|
||||
if (Directory.Exists(folderPath))
|
||||
{
|
||||
// since the folder already exists, show size of folder and ask user if they want to delete older versions
|
||||
DialogResult res = MessageBox.Show("Do you want to delete previous installs of ARCHBLOX? Current size of ARCHBLOX folder: " + GetDirectorySize(folderPath) + "MB.", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
label1.Text = "Removing previous installs...";
|
||||
Directory.Delete(folderPath, true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// setup variables
|
||||
wc.DownloadProgressChanged += Client_DownloadProgressChanged;
|
||||
wc.DownloadFileCompleted += Client_DownloadFileCompleted;
|
||||
progressBar1.Style = ProgressBarStyle.Marquee;
|
||||
label1.Text = "Configuring ARCHBLOX...";
|
||||
wc.DownloadProgressChanged += Client_DownloadProgressChanged;
|
||||
wc.DownloadFileCompleted += Client_DownloadFileCompleted;
|
||||
if (Directory.Exists(clientPath))
|
||||
{
|
||||
// ask user if they want to re-install
|
||||
DialogResult res = MessageBox.Show("The latest version of ARCHBLOX is already installed. Do you want to re-install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
label1.Text = "Removing previous installs...";
|
||||
Directory.Delete(clientPath, true);
|
||||
|
||||
}
|
||||
if (res == DialogResult.No)
|
||||
{
|
||||
label1.Text = "Cancelled install.";
|
||||
DontEvenBother = true;
|
||||
}
|
||||
}
|
||||
if (DontEvenBother == false)
|
||||
{
|
||||
// continue with install
|
||||
Directory.CreateDirectory(clientPath);
|
||||
wc.DownloadFileAsync(new Uri(@"https://archblox.com/client/" + version_string + ".zip"), filePath);
|
||||
progressBar1.Style = ProgressBarStyle.Blocks;
|
||||
handle.WaitOne();
|
||||
}
|
||||
}
|
||||
private void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
|
||||
{
|
||||
if (IsCompleted == false)
|
||||
{
|
||||
// the download has completed, extract zip, setup URI.
|
||||
IsCompleted = true;
|
||||
byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
|
||||
string webData = Encoding.UTF8.GetString(raw);
|
||||
string version_string = webData;
|
||||
string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
|
||||
string clientPath = Path.Combine(folderPath, version_string + @"\");
|
||||
string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip"));
|
||||
// ZipFile(filePath, clientPath);
|
||||
File.Delete(filePath);
|
||||
label1.Text = "Installing URi...";
|
||||
try
|
||||
{
|
||||
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register();
|
||||
Uri_Installed = true;
|
||||
}
|
||||
catch { Uri_Installed = false; }
|
||||
if (Uri_Installed == true)
|
||||
{
|
||||
label1.Text = "ARCHBLOX has been installed!";
|
||||
}
|
||||
else
|
||||
{
|
||||
label1.Text = "ARCHBLOX installed without URI.";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
|
||||
{
|
||||
// update the progress bar
|
||||
progressBar1.Minimum = 0;
|
||||
double receive = double.Parse(e.BytesReceived.ToString());
|
||||
double total = double.Parse(e.TotalBytesToReceive.ToString());
|
||||
double percentage = receive / total * 100;
|
||||
label1.Text = "Installing ARCHBLOX... (" + Math.Truncate(percentage).ToString() + "% Completed)";
|
||||
progressBar1.Value = int.Parse(Math.Truncate(percentage).ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ARCHBLOXLauncher_XP
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
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("ARCHBLOXLauncher_XP")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ARCHBLOXLauncher_XP")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8df23fbd-b288-40af-b820-67f6be8f7d94")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ARCHBLOXLauncher_XP.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ARCHBLOXLauncher_XP.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap archblox {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("archblox", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap archbloxlowres {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("archbloxlowres", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap buttonblue200 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("buttonblue200", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap buttongreen200 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("buttongreen200", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap unknown {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("unknown", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="buttongreen200" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\buttongreen200.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="buttonblue200" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\buttonblue200.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="unknown" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\unknown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="archbloxlowres" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\archbloxlowres.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="archblox" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\archblox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace ARCHBLOXLauncher_XP.Properties
|
||||
{
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 283 KiB |
|
|
@ -0,0 +1,36 @@
|
|||
using Microsoft.Win32;
|
||||
namespace ARCHBLOXProtocol
|
||||
{
|
||||
class SharedVariables
|
||||
{
|
||||
public static string Arguments = "";
|
||||
};
|
||||
internal static class ARCHBLOXURIProtocol
|
||||
{
|
||||
private static RegistryKey softwareClasses = Registry.CurrentUser.OpenSubKey("Software").OpenSubKey("Classes", true);
|
||||
|
||||
internal static void Register()
|
||||
{
|
||||
// credit to p0s0 for helping me with this
|
||||
if (softwareClasses.OpenSubKey("archblox") == null) {} else { softwareClasses.DeleteSubKeyTree("archblox"); }
|
||||
RegistryKey key = softwareClasses.CreateSubKey("archblox");
|
||||
key.SetValue("", "URL: archblox Protocol");
|
||||
key.SetValue("URL Protocol", "");
|
||||
|
||||
RegistryKey key1 = key.CreateSubKey("DefaultIcon");
|
||||
key1.SetValue("", ARCHBLOXLauncher_XP.Extensions.GetExecutablePath());
|
||||
|
||||
RegistryKey key2 = key.CreateSubKey("shell");
|
||||
RegistryKey key3 = key2.CreateSubKey("open");
|
||||
|
||||
RegistryKey key4 = key3.CreateSubKey("command");
|
||||
key4.SetValue("", "\"" + ARCHBLOXLauncher_XP.Extensions.GetExecutablePath() + "\" %1");
|
||||
|
||||
key.Close();
|
||||
key1.Close();
|
||||
key2.Close();
|
||||
key3.Close();
|
||||
key4.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue