Remove old reference to PS2

This commit is contained in:
Chord 2016-06-19 23:25:06 -04:00
parent 824d7b5a7b
commit d67413195c
21 changed files with 1 additions and 1 deletions

108
PSLauncher/.gitignore vendored Normal file
View file

@ -0,0 +1,108 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML

130
PSLauncher/AboutBox1.Designer.cs generated Normal file
View file

@ -0,0 +1,130 @@
namespace PSLauncher
{
partial class About
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
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()
{
this.okButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.versionInfo = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// okButton
//
this.okButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(135, 107);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 25;
this.okButton.Text = "&OK";
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
this.label1.Location = new System.Drawing.Point(9, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(328, 23);
this.label1.TabIndex = 26;
this.label1.Text = "PS1 GameLauncher";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
this.label2.Location = new System.Drawing.Point(9, 32);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(328, 23);
this.label2.TabIndex = 27;
this.label2.Text = "Designed by Chord for PSForever";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label2.Click += new System.EventHandler(this.label2_Click);
//
// linkLabel1
//
this.linkLabel1.Dock = System.Windows.Forms.DockStyle.Top;
this.linkLabel1.Location = new System.Drawing.Point(9, 55);
this.linkLabel1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 5);
this.linkLabel1.Size = new System.Drawing.Size(328, 22);
this.linkLabel1.TabIndex = 28;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "http://psforever.net";
this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// versionInfo
//
this.versionInfo.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.versionInfo.Dock = System.Windows.Forms.DockStyle.Top;
this.versionInfo.Location = new System.Drawing.Point(9, 77);
this.versionInfo.Margin = new System.Windows.Forms.Padding(3, 10, 3, 10);
this.versionInfo.Name = "versionInfo";
this.versionInfo.ReadOnly = true;
this.versionInfo.Size = new System.Drawing.Size(328, 13);
this.versionInfo.TabIndex = 29;
this.versionInfo.TabStop = false;
this.versionInfo.Text = "Version 1.x.x.x";
this.versionInfo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// About
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(346, 142);
this.Controls.Add(this.versionInfo);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "About";
this.Padding = new System.Windows.Forms.Padding(9);
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About PS1 GameLauncher";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.TextBox versionInfo;
}
}

35
PSLauncher/AboutBox1.cs Normal file
View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
namespace PSLauncher
{
partial class About : Form
{
public About()
{
InitializeComponent();
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
string version = fvi.FileVersion;
versionInfo.Text = "Version " + version;
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(linkLabel1.Text);
}
private void label2_Click(object sender, EventArgs e)
{
}
}
}

120
PSLauncher/AboutBox1.resx Normal file
View file

@ -0,0 +1,120 @@
<?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>
</root>

355
PSLauncher/LauncherForm.Designer.cs generated Normal file
View file

@ -0,0 +1,355 @@
namespace PSLauncher
{
partial class LauncherForm
{
/// <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()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LauncherForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.hideShowOutput = new System.Windows.Forms.Button();
this.skipLauncher = new System.Windows.Forms.CheckBox();
this.passwordLabel = new System.Windows.Forms.Label();
this.usernameLabel = new System.Windows.Forms.Label();
this.password = new System.Windows.Forms.TextBox();
this.username = new System.Windows.Forms.TextBox();
this.launchGame = new System.Windows.Forms.Button();
this.launchMessage = new System.Windows.Forms.Label();
this.spinner = new System.Windows.Forms.PictureBox();
this.ps_consoleOutput = new System.Windows.Forms.TextBox();
this.outputRightClick = new System.Windows.Forms.ContextMenuStrip(this.components);
this.selectAll = new System.Windows.Forms.ToolStripMenuItem();
this.copy = new System.Windows.Forms.ToolStripMenuItem();
this.saveToFile = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.spinner)).BeginInit();
this.outputRightClick.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.toolStripContainer1.ContentPanel.SuspendLayout();
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
this.toolStripContainer1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.splitContainer1.Panel1.Controls.Add(this.hideShowOutput);
this.splitContainer1.Panel1.Controls.Add(this.skipLauncher);
this.splitContainer1.Panel1.Controls.Add(this.passwordLabel);
this.splitContainer1.Panel1.Controls.Add(this.usernameLabel);
this.splitContainer1.Panel1.Controls.Add(this.password);
this.splitContainer1.Panel1.Controls.Add(this.username);
this.splitContainer1.Panel1.Controls.Add(this.launchGame);
this.splitContainer1.Panel1.Controls.Add(this.launchMessage);
this.splitContainer1.Panel1.Controls.Add(this.spinner);
this.splitContainer1.Panel1MinSize = 95;
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.ps_consoleOutput);
this.splitContainer1.Size = new System.Drawing.Size(404, 287);
this.splitContainer1.SplitterDistance = this.splitContainer1.Panel1MinSize;
this.splitContainer1.TabIndex = 0;
//
// hideShowOutput
//
this.hideShowOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.hideShowOutput.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.hideShowOutput.Location = new System.Drawing.Point(317, 69);
this.hideShowOutput.Name = "hideShowOutput";
this.hideShowOutput.Size = new System.Drawing.Size(84, 21);
this.hideShowOutput.TabIndex = 23;
this.hideShowOutput.Text = "vv Show vv";
this.hideShowOutput.UseVisualStyleBackColor = true;
this.hideShowOutput.Click += new System.EventHandler(this.hideShowOutput_Click_1);
//
// skipLauncher
//
this.skipLauncher.AutoSize = true;
this.skipLauncher.Location = new System.Drawing.Point(205, 13);
this.skipLauncher.Name = "skipLauncher";
this.skipLauncher.Size = new System.Drawing.Size(95, 17);
this.skipLauncher.TabIndex = 3;
this.skipLauncher.Text = "Skip Launcher";
this.skipLauncher.UseVisualStyleBackColor = true;
this.skipLauncher.CheckedChanged += new System.EventHandler(this.loginFormChanged);
//
// passwordLabel
//
this.passwordLabel.AutoSize = true;
this.passwordLabel.Location = new System.Drawing.Point(8, 45);
this.passwordLabel.Name = "passwordLabel";
this.passwordLabel.Size = new System.Drawing.Size(53, 13);
this.passwordLabel.TabIndex = 21;
this.passwordLabel.Text = "Password";
//
// usernameLabel
//
this.usernameLabel.AutoSize = true;
this.usernameLabel.Location = new System.Drawing.Point(6, 14);
this.usernameLabel.Name = "usernameLabel";
this.usernameLabel.Size = new System.Drawing.Size(55, 13);
this.usernameLabel.TabIndex = 20;
this.usernameLabel.Text = "Username";
//
// password
//
this.password.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.password.Location = new System.Drawing.Point(67, 41);
this.password.Name = "password";
this.password.Size = new System.Drawing.Size(123, 20);
this.password.TabIndex = 1;
this.password.UseSystemPasswordChar = true;
this.password.TextChanged += new System.EventHandler(this.loginFormChanged);
//
// username
//
this.username.Location = new System.Drawing.Point(67, 11);
this.username.Name = "username";
this.username.Size = new System.Drawing.Size(123, 20);
this.username.TabIndex = 0;
this.username.TextChanged += new System.EventHandler(this.loginFormChanged);
//
// launchGame
//
this.launchGame.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.launchGame.Enabled = false;
this.launchGame.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.launchGame.Location = new System.Drawing.Point(67, 67);
this.launchGame.Name = "launchGame";
this.launchGame.Size = new System.Drawing.Size(123, 23);
this.launchGame.TabIndex = 2;
this.launchGame.Text = "Launch";
this.launchGame.UseVisualStyleBackColor = false;
this.launchGame.Click += new System.EventHandler(this.button2_Click);
//
// launchMessage
//
this.launchMessage.ForeColor = System.Drawing.Color.Red;
this.launchMessage.Location = new System.Drawing.Point(202, 37);
this.launchMessage.Name = "launchMessage";
this.launchMessage.Size = new System.Drawing.Size(197, 27);
this.launchMessage.TabIndex = 22;
this.launchMessage.Text = "Error message";
this.launchMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.launchMessage.Visible = false;
//
// spinner
//
this.spinner.Enabled = false;
this.spinner.Image = ((System.Drawing.Image)(resources.GetObject("spinner.Image")));
this.spinner.Location = new System.Drawing.Point(114, 67);
this.spinner.Name = "spinner";
this.spinner.Size = new System.Drawing.Size(26, 24);
this.spinner.TabIndex = 24;
this.spinner.TabStop = false;
this.spinner.Visible = false;
//
// ps_consoleOutput
//
this.ps_consoleOutput.BackColor = System.Drawing.Color.WhiteSmoke;
this.ps_consoleOutput.ContextMenuStrip = this.outputRightClick;
this.ps_consoleOutput.Dock = System.Windows.Forms.DockStyle.Fill;
this.ps_consoleOutput.Location = new System.Drawing.Point(0, 0);
this.ps_consoleOutput.Multiline = true;
this.ps_consoleOutput.Name = "ps_consoleOutput";
this.ps_consoleOutput.ReadOnly = true;
this.ps_consoleOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.ps_consoleOutput.Size = new System.Drawing.Size(404, 188);
this.ps_consoleOutput.TabIndex = 1;
this.ps_consoleOutput.WordWrap = false;
//
// outputRightClick
//
this.outputRightClick.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.selectAll,
this.copy,
this.saveToFile});
this.outputRightClick.Name = "outputRightClick";
this.outputRightClick.Size = new System.Drawing.Size(165, 70);
//
// selectAll
//
this.selectAll.Name = "selectAll";
this.selectAll.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
this.selectAll.Size = new System.Drawing.Size(164, 22);
this.selectAll.Text = "Select All";
this.selectAll.Click += new System.EventHandler(this.selectAll_Click);
//
// copy
//
this.copy.Name = "copy";
this.copy.ShortcutKeyDisplayString = "";
this.copy.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
this.copy.Size = new System.Drawing.Size(164, 22);
this.copy.Text = "Copy";
this.copy.Click += new System.EventHandler(this.copy_Click);
//
// saveToFile
//
this.saveToFile.Name = "saveToFile";
this.saveToFile.Size = new System.Drawing.Size(164, 22);
this.saveToFile.Text = "Save to file ...";
this.saveToFile.Click += new System.EventHandler(this.saveToFile_Click);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.aboutToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(108, 26);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
this.aboutToolStripMenuItem.Text = "About";
//
// menuStrip1
//
this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.settingsToolStripMenuItem,
this.aboutToolStripMenuItem1});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(404, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// settingsToolStripMenuItem
//
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.settingsToolStripMenuItem.Text = "Settings";
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
//
// aboutToolStripMenuItem1
//
this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(52, 20);
this.aboutToolStripMenuItem1.Text = "About";
this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
//
// toolStripContainer1
//
//
// toolStripContainer1.ContentPanel
//
this.toolStripContainer1.ContentPanel.Controls.Add(this.splitContainer1);
this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(404, 287);
this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStripContainer1.LeftToolStripPanelVisible = false;
this.toolStripContainer1.Location = new System.Drawing.Point(0, 0);
this.toolStripContainer1.Name = "toolStripContainer1";
this.toolStripContainer1.RightToolStripPanelVisible = false;
this.toolStripContainer1.Size = new System.Drawing.Size(404, 311);
this.toolStripContainer1.TabIndex = 3;
this.toolStripContainer1.Text = "toolStripContainer1";
//
// toolStripContainer1.TopToolStripPanel
//
this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1);
//
// LauncherForm
//
this.AcceptButton = this.launchGame;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(404, 311);
this.Controls.Add(this.toolStripContainer1);
this.MainMenuStrip = this.menuStrip1;
this.MinimumSize = new System.Drawing.Size(420, 350);
this.Name = "LauncherForm";
this.Text = "PS1 GameLauncher";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LauncherForm_FormClosing);
this.ResizeBegin += new System.EventHandler(this.LauncherForm_ResizeBegin);
this.ResizeEnd += new System.EventHandler(this.LauncherForm_ResizeEnd);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.spinner)).EndInit();
this.outputRightClick.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.toolStripContainer1.ContentPanel.ResumeLayout(false);
this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
this.toolStripContainer1.TopToolStripPanel.PerformLayout();
this.toolStripContainer1.ResumeLayout(false);
this.toolStripContainer1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Button launchGame;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.Label usernameLabel;
private System.Windows.Forms.TextBox password;
private System.Windows.Forms.TextBox username;
private System.Windows.Forms.TextBox ps_consoleOutput;
private System.Windows.Forms.Label passwordLabel;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
private System.Windows.Forms.Label launchMessage;
private System.Windows.Forms.CheckBox skipLauncher;
private System.Windows.Forms.ToolStripContainer toolStripContainer1;
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
private System.Windows.Forms.Button hideShowOutput;
private System.Windows.Forms.PictureBox spinner;
private System.Windows.Forms.ContextMenuStrip outputRightClick;
private System.Windows.Forms.ToolStripMenuItem selectAll;
private System.Windows.Forms.ToolStripMenuItem copy;
private System.Windows.Forms.ToolStripMenuItem saveToFile;
}
}

725
PSLauncher/LauncherForm.cs Normal file
View file

@ -0,0 +1,725 @@
using Microsoft.Win32;
using Newtonsoft.Json.Linq;
using PSLauncher.Properties;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PSLauncher
{
public enum LaunchDomain
{
Live,
PSForever
}
public enum GameState
{
Stopped,
Launching,
Running,
Stopping
}
public partial class LauncherForm : Form
{
Process psProcess;
string USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0";
int DEFAULT_WEB_TIMEOUT = 5000;
bool bGameRunning = false;
GameState gameState = GameState.Stopped;
System.Drawing.Size oldSize = new System.Drawing.Size(0, 0);
LaunchDomain domain = LaunchDomain.Live;
Dictionary<LaunchDomain, string> domains = new Dictionary<LaunchDomain, string>()
{
{ LaunchDomain.Live, "https://lpj.daybreakgames.com/ps/live" },
{ LaunchDomain.PSForever, "https://login.psforever.net/" }
};
public LauncherForm()
{
InitializeComponent();
//if (Debugger.IsAttached)
// Settings.Default.Reset();
string psDefault = Util.getDefaultPlanetSideDirectory();
// first run with no settings or invalid starting path
if (Settings.Default.PSPath == "" || !Util.checkDirForPlanetSide(Settings.Default.PSPath))
{
Settings.Default.PSPath = psDefault;
}
setConsoleWindowState(Settings.Default.OutputShown);
skipLauncher.Checked = Settings.Default.SkipLauncher;
}
private void LauncherForm_FormClosing(object sender, FormClosingEventArgs e)
{
if (this.bGameRunning)
{
DialogResult res = MessageBox.Show( "Are you sure you want to exit while managing PlanetSide PID " + psProcess.Id + "?" +
Environment.NewLine + "You won't see any debugging output if you do.", "Confirm exit", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (res == DialogResult.No)
e.Cancel = true;
}
}
private void stopLaunching()
{
setButtonState(GameState.Stopped);
progressShown(false);
gameState = GameState.Stopped;
}
private void startLaunching()
{
setButtonState(GameState.Launching);
progressShown(true);
gameState = GameState.Launching;
}
private void setButtonState(GameState state)
{
this.SafeInvoke(a =>
{
switch (state)
{
case GameState.Launching:
this.launchGame.Enabled = false;
this.launchGame.Text = "Launching...";
break;
case GameState.Running:
this.launchGame.BackColor = System.Drawing.Color.FromArgb(255, 128, 128);
this.launchGame.Enabled = true;
this.launchGame.Text = "Kill";
break;
case GameState.Stopped:
this.launchGame.BackColor = System.Drawing.Color.FromArgb(128, 255, 128);
this.launchGame.Enabled = true;
this.launchGame.Text = "Launch";
break;
case GameState.Stopping:
this.launchGame.Enabled = false;
this.launchGame.Text = "Killing...";
break;
}
});
}
private void setErrorMessage(string error)
{
this.SafeInvoke(a =>
{
if (error == "")
{
this.launchMessage.Visible = false;
return;
}
this.launchMessage.Visible = true;
this.launchMessage.Text = error;
});
}
private void button2_Click(object sender, EventArgs e)
{
if(gameState == GameState.Running) // kill command
{
psProcess.Kill();
return;
}
if(Settings.Default.ClearOutputOnLaunch)
{
this.ps_consoleOutput.Clear();
}
string path = Settings.Default.PSPath;
string psExe = Path.Combine(path, SettingsForm.PS_EXE_NAME);
if (!skipLauncher.Checked && (username.Text == String.Empty || password.Text == String.Empty))
{
setErrorMessage("Username or password blank");
return;
}
if (!Util.checkDirForPlanetSide(path))
{
setErrorMessage("Invalid planetside exe");
return;
}
if (skipLauncher.Checked)
{
// magic string to login to planetside from the actual game
startPlanetSide(psExe, Path.GetDirectoryName(psExe), "/K:StagingTest " + Settings.Default.ExtraArgs);
}
else
{
startLaunching();
Task.Factory.StartNew(() =>
{
this.doLogin();
});
}
}
HttpWebResponse netGetSession(string endpoint, CookieContainer cookies)
{
string hostname = domains[domain];
HttpWebRequest req = WebRequest.Create(hostname + endpoint) as HttpWebRequest;
req.CookieContainer = cookies;
req.CookieContainer.MaxCookieSize = 4000;
req.Method = "GET";
req.UserAgent = USER_AGENT;
req.Timeout = DEFAULT_WEB_TIMEOUT;
return req.GetResponse() as HttpWebResponse;
}
void doLogin()
{
long ts = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
string path = Settings.Default.PSPath;
string psExe = Path.Combine(path, SettingsForm.PS_EXE_NAME);
/////////////////////////////////////////////////////////////////
// Step 1: Establish Session ID
/////////////////////////////////////////////////////////////////
String endpoint = domains[domain];
CookieContainer reqCookies = new CookieContainer();
HttpWebRequest req;
HttpWebResponse r;
try
{
r = netGetSession("/?t=43323", reqCookies);
}
catch (WebException x)
{
addLine("Failed to gather initial session: " + x.Message);
if (x.Status != WebExceptionStatus.TrustFailure)
{
stopLaunching();
return;
}
DialogResult res = MessageBox.Show("DBG's HTTPS certificate has failed to verify. This means that their certificate has expired " +
"or you may be getting Man-in-the-middled (attacked). If you are under attack, your credentials could be lost. Continue regardless?",
"Certificate error", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (res != DialogResult.Yes)
{
stopLaunching();
return;
}
// WARNING: once we hit yes, all further SSL errors will be ignored
// https://stackoverflow.com/questions/2675133/c-sharp-ignore-certificate-errors
ServicePointManager.ServerCertificateValidationCallback +=
(sender, cert, chain, sslPolicyErrors) => true;
try
{
r = netGetSession("/?t=43323", reqCookies);
}
catch (WebException x2)
{
addLine("Failed to gather initial session: " + x2.Message);
stopLaunching();
return;
}
}
// Note: we must manually add secure cookies and CookieContainer is crap
// See http://thomaskrehbiel.com/post/1690-cookiecontainer_httpwebrequest_and_secure_cookies/
reqCookies.Add(new Uri(endpoint), r.Cookies);
addLine("PSWeb: session started");
r.Close();
/////////////////////////////////////////////////////////////////
// Step 2: Try logging in
/////////////////////////////////////////////////////////////////
req = WebRequest.Create(endpoint + "/login?t=43323") as HttpWebRequest;
req.CookieContainer = reqCookies;
req.Method = "POST";
req.UserAgent = USER_AGENT;
req.Timeout = DEFAULT_WEB_TIMEOUT;
req.Headers.Add("X-Requested-With", "XMLHttpRequest");
req.Headers.Add("Origin", "https://lp.soe.com");
req.ContentType = "application/x-www-form-urlencoded";
req.Referer = endpoint + "/?t=43323";
NameValueCollection query = new NameValueCollection();
query.Add("username", username.Text);
query.Add("password", password.Text);
query.Add("rememberPassword", "false");
query.Add("ts", ts.ToString());
var postdata = Encoding.ASCII.GetBytes(query.ToQueryString());
//addLine(query.ToQueryString());
req.ContentLength = postdata.Length;
using (var stream = req.GetRequestStream())
{
stream.Write(postdata, 0, postdata.Length);
}
try
{
r = req.GetResponse() as HttpWebResponse;
}
catch (WebException x)
{
string txt;
using (HttpWebResponse respExcept = (HttpWebResponse)x.Response)
{
if (respExcept != null && respExcept.GetResponseStream().CanRead)
{
StreamReader r2 = new StreamReader(respExcept.GetResponseStream());
txt = r2.ReadToEnd();
respExcept.Close();
}
else
{
txt = "";
addLine("Login failed: " + x.Message);
return;
}
}
string errorDetail = "";
try
{
JObject obj2 = JObject.Parse(txt);
errorDetail = (string)obj2["error"];
}
catch (Newtonsoft.Json.JsonException x2)
{
errorDetail = "Json parse error: " + x2.Message;
}
if (errorDetail == "INVALID_ACCOUNT_ID") // not sure if we still get this...
{
setErrorMessage("Unknown username");
}
else if (errorDetail == "NEED_PASSWORD_RESET")
{
setErrorMessage("Your account needs a password reset");
}
else if (errorDetail == "BAD_LOGIN")
{
setErrorMessage("Bad password or username");
}
else // unrecognized!
{
setErrorMessage("Unknown error - see output window");
addLine("Login failure: " + x.Status);
addLine("Error: " + errorDetail);
addLine(txt);
}
stopLaunching();
return;
}
if (!r.GetResponseStream().CanRead)
{
setErrorMessage("Unknown error - see output window");
addLine("No login response received");
addLine("Status: " + r.StatusCode);
stopLaunching();
return;
}
StreamReader reader = new StreamReader(r.GetResponseStream());
string text = reader.ReadToEnd();
//addLine(r.Headers["Set-Cookie"]);
reqCookies.Add(new Uri(endpoint), r.Cookies);
string result = "";
r.Close();
addLine("PSWeb: logged in");
try
{
JObject obj = JObject.Parse(text);
result = (string)obj["result"];
}
catch (Newtonsoft.Json.JsonException x2)
{
result = "Json parse error: " + x2.Message;
}
if (result != "SUCCESS")
{
setErrorMessage("Unknown error - see output window");
addLine("Bad login response: " + result);
addLine("Status: " + r.StatusCode);
addLine(text);
stopLaunching();
return;
}
/////////////////////////////////////////////////////////////////
// Step 3: Fetch the login token
/////////////////////////////////////////////////////////////////
req = WebRequest.Create(endpoint + "/get_play_session?t=43323") as HttpWebRequest;
req.CookieContainer = reqCookies;
req.Method = "GET";
req.UserAgent = USER_AGENT;
req.Timeout = DEFAULT_WEB_TIMEOUT;
req.Headers.Add("Origin", "https://lp.soe.com");
req.Referer = endpoint + "/login?t=43323";
req.Headers.Add("X-Requested-With", "XMLHttpRequest");
req.Accept = "*/*";
try
{
r = req.GetResponse() as HttpWebResponse;
}
catch (WebException x)
{
string txt;
using (HttpWebResponse respExcept = (HttpWebResponse)x.Response)
{
if (respExcept != null && respExcept.GetResponseStream().CanRead)
{
StreamReader r2 = new StreamReader(respExcept.GetResponseStream());
txt = r2.ReadToEnd();
}
else
{
txt = "";
}
}
string errorDetail = "";
try
{
JObject obj2 = JObject.Parse(txt);
errorDetail = (string)obj2["result"];
}
catch (Newtonsoft.Json.JsonException x2)
{
errorDetail = "Json parse error: " + x2.Message;
}
if (errorDetail == "RE_LOGIN")
{
setErrorMessage("Failed to fetch token: bad login");
}
else // unrecognized!
{
setErrorMessage("Unknown error - see output window");
}
addLine("Get token failure: " + x.Status);
addLine("Error: " + errorDetail);
addLine(txt);
stopLaunching();
return;
}
if (!r.GetResponseStream().CanRead)
{
setErrorMessage("Unknown error - see output window");
addLine("No login response received");
addLine("Status: " + r.StatusCode);
stopLaunching();
return;
}
reader = new StreamReader(r.GetResponseStream());
text = reader.ReadToEnd();
result = "";
r.Close();
string token = "";
try
{
JObject obj = JObject.Parse(text);
result = (string)obj["result"];
token = (string)obj["launchArgs"];
addLine(text);
}
catch (Newtonsoft.Json.JsonException x2)
{
result = "Json parse error: " + x2.Message;
token = "";
}
if (result != "SUCCESS")
{
setErrorMessage("Failed to get token");
addLine("Bad token response: " + result);
addLine("Status: " + r.StatusCode);
addLine(text);
stopLaunching();
return;
}
addLine("PSWeb: got launch args " + token);
string launch_args = token;
string ExtraLaunchArgs = Settings.Default.ExtraArgs;
if (ExtraLaunchArgs != String.Empty)
launch_args += " " + ExtraLaunchArgs;
startPlanetSide(psExe, path, launch_args);
return;
}
void startPlanetSide(string exe, string workingDir, string args)
{
psProcess = new Process();
psProcess.StartInfo.WorkingDirectory = workingDir; // TODO: should this be where the launcher is for logging?
psProcess.StartInfo.FileName = exe;
psProcess.StartInfo.Arguments = args;
psProcess.StartInfo.RedirectStandardOutput = true;
psProcess.StartInfo.RedirectStandardError = true;
psProcess.StartInfo.UseShellExecute = false;
psProcess.Exited += new EventHandler(ps_Exited);
psProcess.OutputDataReceived += new DataReceivedEventHandler(ps_OutputDataReceived);
psProcess.EnableRaisingEvents = true;
addLine("ProcessStart: \"" + exe + "\" " + args);
psProcess.Start();
psProcess.BeginErrorReadLine();
psProcess.BeginOutputReadLine();
gameRunning();
}
void ps_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if(e != null)
{
addLine(e.Data);
}
}
void addLine(String line)
{
this.SafeInvoke(a =>
{
ps_consoleOutput.AppendText(line + Environment.NewLine);
});
}
void gameRunning()
{
setButtonState(GameState.Running);
progressShown(false);
bGameRunning = true;
gameState = GameState.Running;
}
void gameStopped()
{
this.stopLaunching();
bGameRunning = false;
}
void ps_Exited(object sender, EventArgs e)
{
addLine(String.Format("ProcessEnd: exit code 0x{0}", psProcess.ExitCode.ToString("X8")));
gameStopped();
}
private void progressShown(bool shown)
{
this.SafeInvoke(a =>
{
if (shown)
{
this.spinner.Visible = true;
this.spinner.Enabled = true;
this.launchGame.Visible = false;
}
else
{
this.spinner.Visible = false;
this.spinner.Enabled = false;
this.launchGame.Visible = true;
}
});
}
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
{
About a = new About();
a.StartPosition = FormStartPosition.CenterParent;
a.ShowDialog(this);
}
private void loginFormChanged(object sender, EventArgs e)
{
if (gameState == GameState.Stopped)
{
if (username.Text.Length > 0 && password.Text.Length > 0 || skipLauncher.Checked)
launchGame.Enabled = true;
else
launchGame.Enabled = false;
}
if (skipLauncher.Checked)
{
Settings.Default.SkipLauncher = true;
username.Enabled = false;
password.Enabled = false;
}
else
{
Settings.Default.SkipLauncher = false;
username.Enabled = true;
password.Enabled = true;
}
}
private void setConsoleWindowState(bool open)
{
if (!open)
{
oldSize = this.Size;
this.hideShowOutput.Text = "vv Show vv";
this.MinimumSize = this.MaximumSize = new System.Drawing.Size(420, 160);
this.Size = new System.Drawing.Size(420, 160);
this.WindowState = FormWindowState.Normal;
this.MaximizeBox = false;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
}
else
{
this.hideShowOutput.Text = "^^ Hide ^^";
this.MinimumSize = new System.Drawing.Size(420, 350);
this.MaximumSize = new System.Drawing.Size(0, 0);
if (oldSize.IsEmpty)
this.Size = new System.Drawing.Size(600, 500); // default size to expand to
else
this.Size = oldSize;
this.MaximizeBox = true;
this.FormBorderStyle = FormBorderStyle.Sizable;
}
splitContainer1.Panel2Collapsed = !open;
}
private void LauncherForm_ResizeBegin(object sender, EventArgs e)
{
splitContainer1.Panel2.SuspendLayout();
}
private void LauncherForm_ResizeEnd(object sender, EventArgs e)
{
Win32.SuspendPainting(splitContainer1.Panel2.Handle);
splitContainer1.Panel2.ResumeLayout();
Win32.ResumePainting(splitContainer1.Panel2.Handle);
this.Refresh();
}
private void hideShowOutput_Click_1(object sender, EventArgs e)
{
if (splitContainer1.Panel2Collapsed)
{
Settings.Default.OutputShown = true;
setConsoleWindowState(true);
}
else
{
Settings.Default.OutputShown = false;
setConsoleWindowState(false);
}
}
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
{
SettingsForm a = new SettingsForm();
a.StartPosition = FormStartPosition.CenterParent;
a.ShowDialog(this);
}
private void selectAll_Click(object sender, EventArgs e)
{
this.ps_consoleOutput.Focus();
this.ps_consoleOutput.SelectAll();
}
private void copy_Click(object sender, EventArgs e)
{
this.ps_consoleOutput.Copy();
}
private void saveToFile_Click(object sender, EventArgs e)
{
SaveFileDialog saveFile = new SaveFileDialog();
saveFile.FileName = "";
saveFile.Filter = "Output file (*.txt) | *.txt";
saveFile.AddExtension = true;
saveFile.DefaultExt = ".txt";
DialogResult result = saveFile.ShowDialog();
if (result == DialogResult.OK)
{
FileStream f = File.OpenWrite(saveFile.FileName);
var encoder = new ASCIIEncoding();
var header = encoder.GetBytes(String.Format("{0} log output {1}" + Environment.NewLine, this.Text, DateTime.Now.ToString()));
var data = new ASCIIEncoding().GetBytes(this.ps_consoleOutput.Text);
f.Write(header, 0, header.Length);
f.Write(data, 0, data.Length);
f.Close();
}
}
}
}

View file

@ -0,0 +1,180 @@
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="spinner.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhGAAYAPQAAP///wAAAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaG
hri4uGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBF
Mi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAg
jiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA
1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0
lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAA
ACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeG
CdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkGd2CESoeIIwoMBQUMP4cNeQQGDYuNj4iS
b5WJnmeGng0CDGaBlIQEJziHk3sABidDAHBgagButSKvAAoyuHuUYHgCkAZqebw0AgLBQyyzNKO3byNu
oSS8x8OfwIchACH5BAkHAAAALAAAAAAYABgAAAW4ICCOJIAgZVoOBJkkpDKoo5EI43GMjNPSokXCINKJ
CI4HcCRIQEQvqIOhGhBHhUTDhGo4diOZyFAoKEQDxra2mAEgjghOpCgz3LTBIxJ5kgwMBShACREHZ1V4
Kg1rS44pBAgMDAg/Sw0GBAQGDZGTlY+YmpyPpSQDiqYiDQoCliqZBqkGAgKIS5kEjQ21VwCyp76dBHiN
vz+MR74AqSOdVwbQuo+abppo10ssjdkAnc0rf8vgl8YqIQAh+QQJBwAAACwAAAAAGAAYAAAFrCAgjiQg
CGVaDgZZFCQxqKNRKGOSjMjR0qLXTyciHA7AkaLACMIAiwOC1iAxCrMToHHYjWQiA4NBEA0Q1RpWxHg4
cMXxNDk4OBxNUkPAQAEXDgllKgMzQA1pSYopBgonCj9JEA8REQ8QjY+RQJOVl4ugoYssBJuMpYYjDQSl
iwasiQOwNakALKqsqbWvIohFm7V6rQAGP6+JQLlFg7KDQLKJrLjBKbvAor3IKiEAIfkECQcAAAAsAAAA
ABgAGAAABbUgII4koChlmhokw5DEoI4NQ4xFMQoJO4uuhignMiQWvxGBIQC+AJBEUyUcIRiyE6CR0Cll
W4HABxBURTUw4nC4FcWo5CDBRpQaCoF7VjgsyCUDYDMNZ0mHdwYEBAaGMwwHDg4HDA2KjI4qkJKUiJ6f
aJkiA4qAKQkRB3E0i6YpAw8RERAjA4tnBoMApCMQDhFTuySKoSKMJAq6rD4GzASiJYtgi6PUcs9Kew0x
h7rNJMqIhYchACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJEAQZZo2JIKQxqCOjWCMDDMqxT2LAgELkBMZ
CoXfyCBQiFwiRsGpku0EshNgUNAtrYPT0GQVNRBWwSKBMp98P24iISgNDAS4ipGA6JUpA2WAhDR4eWM/
CAkHBwkIDYcGiTOLjY+FmZkNlCN3eUoLDmwlDW+AAwcODl5bYl8wCVYMDw5UWzBtnAANEQ8kBIM0oAAG
PgcREIQnVloAChEOqARjzgAQEbczg8YkWJq8nSUhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJGAYZZoO
pKKQqDoORDMKwkgwtiwSBBYAJ2owGL5RgxBziQQMgkwoMkhNqAEDARPSaiMDFdDIiRSFQowMXE8Z6Rdp
YHWnEAWGPVkajPmARVZMPUkCBQkJBQINgwaFPoeJi4GVlQ2Qc3VJBQcLV0ptfAMJBwdcIl+FYjALQgim
oGNWIhAQZA4HXSpLMQ8PIgkOSHxAQhERPw7ASTSFyCMMDqBTJL8tf3y2fCEAIfkECQcAAAAsAAAAABgA
GAAABa8gII4k0DRlmg6kYZCoOg5EDBDEaAi2jLO3nEkgkMEIL4BLpBAkVy3hCTAQKGAznM0AFNFGBAbj
2cA9jQixcGZAGgECBu/9HnTp+FGjjezJFAwFBQwKe2Z+KoCChHmNjVMqA21nKQwJEJRlbnUFCQlFXlpe
CWcGBUACCwlrdw8RKGImBwktdyMQEQciB7oACwcIeA4RVwAODiIGvHQKERAjxyMIB5QlVSTLYLZ0sW8h
ACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK
4umWPM5wNiV0UDUIBNkdoepTfMkA7thIECiyRtUAGq8fm2O4jIBgMBA1eAZ6Knx+gHaJR4QwdCMKBxEJ
RggFDGgQEREPjjAMBQUKIwIRDhBDC2QNDDEKoEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkL
cQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoS
xNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGI
z+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggH
jwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k
0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukk
KQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMM
nA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkH
AAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQ
JyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUj
BhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64
nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==
</value>
</data>
<metadata name="outputRightClick.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>511, 9</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>224, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>396, 9</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>132</value>
</metadata>
</root>

View file

@ -0,0 +1,238 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0D6A691E-95FE-4056-8979-190A9A35BDC7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PSLauncher</RootNamespace>
<AssemblyName>PS1_GameLauncher</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>publish\</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>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</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|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'LiveSupport|x86'">
<OutputPath>bin\x86\LiveSupport\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Debug\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>BasicCorrectnessRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<UseVSHostingProcess>false</UseVSHostingProcess>
<WarningLevel>0</WarningLevel>
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'LiveSupport|AnyCPU'">
<OutputPath>bin\LiveSupport\</OutputPath>
<DefineConstants>HACKS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>793DD622BA49EF7D3494640F6D9646D8D289304B</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>PSLauncher_1_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" />
<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="AboutBox1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AboutBox1.Designer.cs">
<DependentUpon>AboutBox1.cs</DependentUpon>
</Compile>
<Compile Include="LauncherForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LauncherForm.Designer.cs">
<DependentUpon>LauncherForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SettingsForm.Designer.cs">
<DependentUpon>SettingsForm.cs</DependentUpon>
</Compile>
<Compile Include="Util.cs" />
<EmbeddedResource Include="AboutBox1.resx">
<DependentUpon>AboutBox1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LauncherForm.resx">
<DependentUpon>LauncherForm.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>
<EmbeddedResource Include="SettingsForm.resx">
<DependentUpon>SettingsForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="Properties\app.manifest" />
<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>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

30
PSLauncher/Program.cs Normal file
View file

@ -0,0 +1,30 @@
using PSLauncher.Properties;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace PSLauncher
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Settings.Default.PropertyChanged += Default_PropertyChanged;
Application.Run(new LauncherForm());
}
static void Default_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
Settings.Default.Save();
}
}
}

View file

@ -0,0 +1,39 @@
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("PS1 GameLauncher")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("PSForever")]
[assembly: AssemblyProduct("PS1 GameLauncher")]
[assembly: AssemblyCopyright("")]
[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("5dff03d1-e8e0-42c0-a5b7-5ac290a55a56")]
// 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.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
// Stamp
// [assembly: AssemblyInformationalVersion("%version% [ %branch% @ %shorthash%%haschanges% ]")]

View file

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <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 PSLauncher.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", "4.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("PSLauncher.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;
}
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -0,0 +1,86 @@
//------------------------------------------------------------------------------
// <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 PSLauncher.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.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;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string PSPath {
get {
return ((string)(this["PSPath"]));
}
set {
this["PSPath"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ExtraArgs {
get {
return ((string)(this["ExtraArgs"]));
}
set {
this["ExtraArgs"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OutputShown {
get {
return ((bool)(this["OutputShown"]));
}
set {
this["OutputShown"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool SkipLauncher {
get {
return ((bool)(this["SkipLauncher"]));
}
set {
this["SkipLauncher"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ClearOutputOnLaunch {
get {
return ((bool)(this["ClearOutputOnLaunch"]));
}
set {
this["ClearOutputOnLaunch"] = value;
}
}
}
}

View file

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="PSLauncher.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="PSPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ExtraArgs" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="OutputShown" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="SkipLauncher" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ClearOutputOnLaunch" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

155
PSLauncher/SettingsForm.Designer.cs generated Normal file
View file

@ -0,0 +1,155 @@
namespace PSLauncher
{
partial class SettingsForm
{
/// <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()
{
this.label2 = new System.Windows.Forms.Label();
this.selectDirectory = new System.Windows.Forms.Button();
this.planetsidePathTextField = new System.Windows.Forms.TextBox();
this.launchArgs = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.planetsideVersion = new System.Windows.Forms.Label();
this.findPTRDirDialogue = new System.Windows.Forms.FolderBrowserDialog();
this.clearOnLaunch = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 17);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(90, 13);
this.label2.TabIndex = 10;
this.label2.Text = "PlanetSide Folder";
//
// selectDirectory
//
this.selectDirectory.Location = new System.Drawing.Point(12, 59);
this.selectDirectory.Name = "selectDirectory";
this.selectDirectory.Size = new System.Drawing.Size(75, 23);
this.selectDirectory.TabIndex = 9;
this.selectDirectory.Text = "Choose";
this.selectDirectory.UseVisualStyleBackColor = true;
this.selectDirectory.Click += new System.EventHandler(this.button1_Click);
//
// planetside2PathTextField
//
this.planetsidePathTextField.Location = new System.Drawing.Point(12, 33);
this.planetsidePathTextField.Name = "planetside2PathTextField";
this.planetsidePathTextField.ReadOnly = true;
this.planetsidePathTextField.Size = new System.Drawing.Size(222, 20);
this.planetsidePathTextField.TabIndex = 8;
this.planetsidePathTextField.Text = "Path to PlanetSide folder";
//
// launchArgs
//
this.launchArgs.Location = new System.Drawing.Point(12, 117);
this.launchArgs.Name = "launchArgs";
this.launchArgs.Size = new System.Drawing.Size(222, 20);
this.launchArgs.TabIndex = 15;
this.launchArgs.TextChanged += new System.EventHandler(this.launchArgs_TextChanged);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(9, 98);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(158, 13);
this.label10.TabIndex = 16;
this.label10.Text = "Additional command line options";
//
// planetsideVersion
//
this.planetsideVersion.Location = new System.Drawing.Point(102, 59);
this.planetsideVersion.Name = "planetsideVersion";
this.planetsideVersion.Size = new System.Drawing.Size(132, 21);
this.planetsideVersion.TabIndex = 25;
this.planetsideVersion.Text = "Version";
this.planetsideVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// clearOnLaunch
//
this.clearOnLaunch.AutoSize = true;
this.clearOnLaunch.Location = new System.Drawing.Point(13, 157);
this.clearOnLaunch.Name = "clearOnLaunch";
this.clearOnLaunch.Size = new System.Drawing.Size(133, 17);
this.clearOnLaunch.TabIndex = 26;
this.clearOnLaunch.Text = "Clear output on launch";
this.clearOnLaunch.UseVisualStyleBackColor = true;
this.clearOnLaunch.CheckedChanged += new System.EventHandler(this.clearOnLaunch_CheckedChanged);
//
// button1
//
this.button1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.button1.Location = new System.Drawing.Point(91, 186);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(62, 23);
this.button1.TabIndex = 27;
this.button1.Text = "OK";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// SettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(244, 211);
this.Controls.Add(this.planetsideVersion);
this.Controls.Add(this.button1);
this.Controls.Add(this.clearOnLaunch);
this.Controls.Add(this.launchArgs);
this.Controls.Add(this.label10);
this.Controls.Add(this.label2);
this.Controls.Add(this.selectDirectory);
this.Controls.Add(this.planetsidePathTextField);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(260, 250);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(260, 250);
this.Name = "SettingsForm";
this.Text = "Settings";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button selectDirectory;
private System.Windows.Forms.TextBox planetsidePathTextField;
private System.Windows.Forms.TextBox launchArgs;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label planetsideVersion;
private System.Windows.Forms.FolderBrowserDialog findPTRDirDialogue;
private System.Windows.Forms.CheckBox clearOnLaunch;
private System.Windows.Forms.Button button1;
}
}

View file

@ -0,0 +1,98 @@
using PSLauncher.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PSLauncher
{
public partial class SettingsForm : Form
{
static public string PS_EXE_NAME = "planetside.exe";
public SettingsForm()
{
InitializeComponent();
planetsidePathTextField.Text = Settings.Default.PSPath;
launchArgs.Text = Settings.Default.ExtraArgs;
clearOnLaunch.Checked = Settings.Default.ClearOutputOnLaunch;
checkPath(Path.Combine(planetsidePathTextField.Text, PS_EXE_NAME), false);
}
private void button1_Click(object sender, EventArgs e)
{
// set the starting path for the dialog
if (planetsidePathTextField.Text != "")
findPTRDirDialogue.SelectedPath = planetsidePathTextField.Text;
DialogResult r = findPTRDirDialogue.ShowDialog(this);
if (r == DialogResult.OK)
{
// combine the folder name with the standard PS.exe name
string psPath = Path.Combine(findPTRDirDialogue.SelectedPath, PS_EXE_NAME);
planetsidePathTextField.Text = findPTRDirDialogue.SelectedPath;
if (checkPath(psPath))
Settings.Default.PSPath = findPTRDirDialogue.SelectedPath;
}
}
private bool checkPath(string path, bool alert = true)
{
if (!File.Exists(path))
{
planetsideVersion.Text = "Not found";
planetsideVersion.ForeColor = System.Drawing.Color.Red;
if (alert)
MessageBox.Show("Cannot open " + PS_EXE_NAME + " (check the selected directory)",
"Cannot Find Executable", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
var versionInfo = FileVersionInfo.GetVersionInfo(path);
if (versionInfo.FileVersion != "")
{
planetsideVersion.Text = "Version " + versionInfo.FileVersion;
planetsideVersion.ForeColor = System.Drawing.Color.Green;
}
else
{
planetsideVersion.Text = "Unknown version";
planetsideVersion.ForeColor = System.Drawing.Color.Yellow;
}
return true;
}
private void launchArgs_TextChanged(object sender, EventArgs e)
{
if (Settings.Default.ExtraArgs != launchArgs.Text)
{
Settings.Default.ExtraArgs = this.launchArgs.Text;
}
}
private void clearOnLaunch_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.ClearOutputOnLaunch = this.clearOnLaunch.Checked;
}
private void button1_Click_1(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
}
}

View file

@ -0,0 +1,123 @@
<?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>
<metadata name="findPTRDirDialogue.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

116
PSLauncher/Util.cs Normal file
View file

@ -0,0 +1,116 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace PSLauncher
{
public static class ISynchronizeInvokeExtensions
{
public static void SafeInvoke<T>(this T @this, Action<T> action) where T : ISynchronizeInvoke
{
if (@this.InvokeRequired)
{
@this.Invoke(action, new object[] { @this });
}
else
{
action(@this);
}
}
}
public static class QueryExtensions
{
public static string ToQueryString(this NameValueCollection nvc)
{
IEnumerable<string> segments = from key in nvc.AllKeys
from value in nvc.GetValues(key)
select string.Format("{0}={1}", key, value);
return string.Join("&", segments);
}
}
public static class Win32
{
public const int WM_SETREDRAW = 0x0b;
[DllImport("user32.dll")]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
public static void SuspendPainting(IntPtr hWnd)
{
SendMessage(hWnd, WM_SETREDRAW, (IntPtr)0, IntPtr.Zero);
}
public static void ResumePainting(IntPtr hWnd)
{
SendMessage(hWnd, WM_SETREDRAW, (IntPtr)1, IntPtr.Zero);
}
}
public static class Util
{
public static string getDefaultPlanetSideDirectory()
{
Microsoft.Win32.RegistryKey key = null;
string psFolder = "";
// non-steam install
key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\App Paths\LaunchPad.exe");
if (key != null && key.GetValue("") != null)
{
String defaultDirectory;
defaultDirectory = key.GetValue("").ToString();
defaultDirectory = Path.GetDirectoryName(defaultDirectory);
// verify that we aren't mistakingly returning a PlanetSide 2 directory...
if (Directory.Exists(defaultDirectory) && checkDirForPlanetSide(defaultDirectory))
return defaultDirectory;
// try to go up a directory and find the PlanetSide folder
string upOne = Directory.GetParent(defaultDirectory).FullName;
psFolder = Path.Combine(upOne, "Planetside");
if (Directory.Exists(psFolder) && checkDirForPlanetSide(psFolder))
return psFolder;
}
// worth a shot!
psFolder = Path.Combine(ProgramFilesx86(), "Sony\\PlanetSide");
if (Directory.Exists(psFolder) && checkDirForPlanetSide(psFolder))
return psFolder;
// HACK: our last attempt. Should work on Win7 and above with and updated launcher
psFolder = "C:\\Users\\Public\\Sony Online Entertainment\\Installed Games\\Planetside";
if (Directory.Exists(psFolder) && checkDirForPlanetSide(psFolder))
return psFolder;
// give up
return "";
}
public static bool checkDirForPlanetSide(string dir)
{
return File.Exists(Path.Combine(dir, SettingsForm.PS_EXE_NAME));
}
public static string ProgramFilesx86()
{
if (8 == IntPtr.Size
|| (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
{
return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
}
return Environment.GetEnvironmentVariable("ProgramFiles");
}
}
}

27
PSLauncher/app.config Normal file
View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="PSLauncher.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<PSLauncher.Properties.Settings>
<setting name="PSPath" serializeAs="String">
<value />
</setting>
<setting name="ExtraArgs" serializeAs="String">
<value />
</setting>
<setting name="OutputShown" serializeAs="String">
<value>False</value>
</setting>
<setting name="SkipLauncher" serializeAs="String">
<value>False</value>
</setting>
<setting name="ClearOutputOnLaunch" serializeAs="String">
<value>True</value>
</setting>
</PSLauncher.Properties.Settings>
</userSettings>
</configuration>