Some cleanup

This commit is contained in:
Regalis
2016-10-09 20:51:11 +03:00
parent 74a9453676
commit 14447062a9
28 changed files with 0 additions and 66206 deletions

View File

@@ -1,15 +0,0 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/Windows
/intermediateDir:obj/Windows
/platform:Windows
/config:
/profile:Reach
/compress:False
#-------------------------------- References --------------------------------#
#---------------------------------- Content ---------------------------------#

View File

@@ -1,73 +0,0 @@
<?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>{6BE950CD-9A34-49C9-939A-786AC89C287E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CrashReporter</RootNamespace>
<AssemblyName>CrashReporter</AssemblyName>
<FileAlignment>512</FileAlignment>
<MonoGamePlatform>Windows</MonoGamePlatform>
<MonoGameContentBuilderExe>
</MonoGameContentBuilderExe>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Windows\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</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\Windows\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Compile Include="ReporterMain.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(MSBuildProgramFiles32)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Content Include="Icon.ico" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Subsurface\Barotrauma.csproj">
<Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project>
<Name>Barotrauma</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

View File

@@ -1,26 +0,0 @@
#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
#endregion
namespace CrashReporter
{
#if WINDOWS || LINUX
/// <summary>
/// The main class.
/// </summary>
public static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
using (var game = new ReporterMain())
game.Run();
}
}
#endif
}

View File

@@ -1,36 +0,0 @@
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("CrashReporter")]
[assembly: AssemblyProduct("CrashReporter")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[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("5087c690-b7c4-4087-979a-a064ada558b4")]
// 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("3.3.0.2069")]
[assembly: AssemblyFileVersion("3.3.0.2069")]

View File

@@ -1,147 +0,0 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Barotrauma;
using System.IO;
namespace CrashReporter
{
/// <summary>
/// This is the main type for your game
/// </summary>
public class ReporterMain : Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
int graphicsWidth, graphicsHeight;
Texture2D backgroundTexture, titleTexture;
GUIFrame guiRoot;
string crashReport;
public ReporterMain()
: base()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferWidth = 640;
graphics.PreferredBackBufferHeight = 360;
}
/// <summary>
/// Allows the game to perform any initialization it needs to before starting to run.
/// This is where it can query for any required services and load any non-graphic
/// related content. Calling base.Initialize will enumerate through any components
/// and initialize them as well.
/// </summary>
protected override void Initialize()
{
// TODO: Add your initialization logic here
base.Initialize();
}
/// <summary>
/// LoadContent will be called once per game and is the place to load
/// all of your content.
/// </summary>
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
graphicsWidth = GraphicsDevice.Viewport.Width;
graphicsHeight = GraphicsDevice.Viewport.Height;
TextureLoader.Init(GraphicsDevice);
GUI.Init(Content);
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
GUI.LoadContent(GraphicsDevice);
backgroundTexture = TextureLoader.FromFile("Content/UI/titleBackground.png");
titleTexture = TextureLoader.FromFile("Content/UI/titleText.png");
guiRoot = new GUIFrame(new Rectangle(0, 0, graphicsWidth, graphicsHeight), Color.Transparent);
guiRoot.Padding = new Vector4(40.0f, 40.0f, 40.0f, 40.0f);
GUIListBox infoBox = new GUIListBox(new Rectangle(0, 0, 330, 150), GUI.Style, guiRoot);
infoBox.Visible = false;
crashReport = System.IO.File.ReadAllText("CrashReport.txt");
string wrappedText = ToolBox.WrapText(crashReport, infoBox.Rect.Width, GUI.SmallFont);
int lineHeight = (int)GUI.SmallFont.MeasureString(" ").Y;
string[] lines = wrappedText.Split('\n');
foreach (string line in lines)
{
if (string.IsNullOrWhiteSpace(line)) continue;
GUITextBlock textBlock = new GUITextBlock(
new Rectangle(0, 0, 0, lineHeight),
line, GUI.Style,
Alignment.TopLeft, Alignment.TopLeft,
infoBox, false, GUI.SmallFont);
textBlock.CanBeFocused = false;
}
GUIButton sendButton = new GUIButton(new Rectangle(0, 0, 100, 30), "SEND", Alignment.BottomRight, GUI.Style, guiRoot);
//se.OnClicked = LaunchClick;
}
/// <summary>
/// UnloadContent will be called once per game and is the place to unload
/// all content.
/// </summary>
protected override void UnloadContent()
{
// TODO: Unload any non ContentManager content here
}
/// <summary>
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
// TODO: Add your update logic here
base.Update(gameTime);
guiRoot.Update((float)gameTime.ElapsedGameTime.TotalMilliseconds);
}
/// <summary>
/// This is called when the game should draw itself.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
guiRoot.Draw(spriteBatch);
spriteBatch.End();
}
private void SendReport()
{
}
}
}

View File

@@ -1,416 +0,0 @@
<stylecopresultscache>
<version>12</version>
<project key="-635107402">
<configuration>DEBUG;TRACE;WINDOWS</configuration>
</project>
<sourcecode name="Game1.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2014.04.01 10:18:24.000</styleCop>
<settingsFile>2012.09.27 21:03:32.000</settingsFile>
<sourceFile>2015.09.17 23:21:18.138</sourceFile>
<parser>2014.04.01 10:18:24.000</parser>
<StyleCop.CSharp.DocumentationRules>2014.04.01 10:18:24.000</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>-1945363787</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2014.04.01 10:18:24.000</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2014.04.01 10:18:24.000</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2014.04.01 10:18:24.000</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2014.04.01 10:18:24.000</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2014.04.01 10:18:24.000</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2014.04.01 10:18:24.000</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="FileMustHaveHeader" ruleCheckId="SA1633">
<context>The file has no header, the header Xml is invalid, or the header is not located at the top of the file.</context>
<line>1</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.OrderingRules" rule="UsingDirectivesMustBePlacedWithinNamespace" ruleCheckId="SA1200">
<context>All using directives must be placed inside of the namespace.</context>
<line>1</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.OrderingRules" rule="UsingDirectivesMustBePlacedWithinNamespace" ruleCheckId="SA1200">
<context>All using directives must be placed inside of the namespace.</context>
<line>2</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.OrderingRules" rule="UsingDirectivesMustBePlacedWithinNamespace" ruleCheckId="SA1200">
<context>All using directives must be placed inside of the namespace.</context>
<line>3</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.OrderingRules" rule="UsingDirectivesMustBePlacedWithinNamespace" ruleCheckId="SA1200">
<context>All using directives must be placed inside of the namespace.</context>
<line>4</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.OrderingRules" rule="UsingDirectivesMustBePlacedWithinNamespace" ruleCheckId="SA1200">
<context>All using directives must be placed inside of the namespace.</context>
<line>5</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.OrderingRules" rule="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives" ruleCheckId="SA1208">
<context>System using directives must be placed before all other using directives.</context>
<line>5</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="CodeMustNotContainMultipleBlankLinesInARow" ruleCheckId="SA1507">
<context>The code must not contain multiple blank lines in a row.</context>
<line>23</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="CodeMustNotContainMultipleBlankLinesInARow" ruleCheckId="SA1507">
<context>The code must not contain multiple blank lines in a row.</context>
<line>24</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>14</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.MaintainabilityRules" rule="AccessModifierMustBeDeclared" ruleCheckId="SA1400">
<context>The field must have an access modifier.</context>
<line>14</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>15</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.MaintainabilityRules" rule="AccessModifierMustBeDeclared" ruleCheckId="SA1400">
<context>The field must have an access modifier.</context>
<line>15</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>17</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.MaintainabilityRules" rule="AccessModifierMustBeDeclared" ruleCheckId="SA1400">
<context>The field must have an access modifier.</context>
<line>17</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>19</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.MaintainabilityRules" rule="AccessModifierMustBeDeclared" ruleCheckId="SA1400">
<context>The field must have an access modifier.</context>
<line>19</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>21</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.MaintainabilityRules" rule="AccessModifierMustBeDeclared" ruleCheckId="SA1400">
<context>The field must have an access modifier.</context>
<line>21</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The constructor must have a documentation header.</context>
<line>25</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphics must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>28</line>
<index>601</index>
<endIndex>608</endIndex>
<startLine>28</startLine>
<startColumn>13</startColumn>
<endLine>28</endLine>
<endColumn>20</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphics must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>31</line>
<index>708</index>
<endIndex>715</endIndex>
<startLine>31</startLine>
<startColumn>13</startColumn>
<endLine>31</endLine>
<endColumn>20</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphics must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>32</line>
<index>765</index>
<endIndex>772</endIndex>
<startLine>32</startLine>
<startColumn>13</startColumn>
<endLine>32</endLine>
<endColumn>20</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphics must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>33</line>
<index>819</index>
<endIndex>826</endIndex>
<startLine>33</startLine>
<startColumn>13</startColumn>
<endLine>33</endLine>
<endColumn>20</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="SingleLineCommentsMustNotBeFollowedByBlankLine" ruleCheckId="SA1512">
<context>A single-line comment must not be followed by a blank line. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>44</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="CurlyBracketsMustNotBeOmitted" ruleCheckId="SA1503">
<context>The body of the if statement must be wrapped in opening and closing curly brackets.</context>
<line>88</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="SingleLineCommentMustBePrecededByBlankLine" ruleCheckId="SA1515">
<context>A single-line comment must be preceded by a blank line or another single-line comment, or must be the first item in its scope. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>99</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="ParametersMustBeOnSameLineOrSeparateLines" ruleCheckId="SA1117">
<context>All method parameters must be placed on the same line, or each parameter must be placed on a separate line.</context>
<line>90</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="ParameterMustFollowComma" ruleCheckId="SA1115">
<context>The parameter must begin on the line after the previous parameter.</context>
<line>92</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="ParameterMustFollowComma" ruleCheckId="SA1115">
<context>The parameter must begin on the line after the previous parameter.</context>
<line>93</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="ParameterMustFollowComma" ruleCheckId="SA1115">
<context>The parameter must begin on the line after the previous parameter.</context>
<line>94</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to spriteBatch must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>56</line>
<index>1712</index>
<endIndex>1722</endIndex>
<startLine>56</startLine>
<startColumn>13</startColumn>
<endLine>56</endLine>
<endColumn>23</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphicsWidth must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>58</line>
<index>1774</index>
<endIndex>1786</endIndex>
<startLine>58</startLine>
<startColumn>13</startColumn>
<endLine>58</endLine>
<endColumn>25</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphicsHeight must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>59</line>
<index>1834</index>
<endIndex>1847</endIndex>
<startLine>59</startLine>
<startColumn>13</startColumn>
<endLine>59</endLine>
<endColumn>26</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to GraphicsDevice must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>61</line>
<index>1917</index>
<endIndex>1930</endIndex>
<startLine>61</startLine>
<startColumn>32</startColumn>
<endLine>61</endLine>
<endColumn>45</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to Content must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>63</line>
<index>1958</index>
<endIndex>1964</endIndex>
<startLine>63</startLine>
<startColumn>22</startColumn>
<endLine>63</endLine>
<endColumn>28</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to spriteBatch must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>66</line>
<index>2061</index>
<endIndex>2071</endIndex>
<startLine>66</startLine>
<startColumn>13</startColumn>
<endLine>66</endLine>
<endColumn>23</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to GraphicsDevice must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>68</line>
<index>2139</index>
<endIndex>2152</endIndex>
<startLine>68</startLine>
<startColumn>29</startColumn>
<endLine>68</endLine>
<endColumn>42</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to backgroundTexture must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>70</line>
<index>2171</index>
<endIndex>2187</endIndex>
<startLine>70</startLine>
<startColumn>13</startColumn>
<endLine>70</endLine>
<endColumn>29</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to titleTexture must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>71</line>
<index>2262</index>
<endIndex>2273</endIndex>
<startLine>71</startLine>
<startColumn>13</startColumn>
<endLine>71</endLine>
<endColumn>24</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to guiRoot must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>73</line>
<index>2344</index>
<endIndex>2350</endIndex>
<startLine>73</startLine>
<startColumn>13</startColumn>
<endLine>73</endLine>
<endColumn>19</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphicsWidth must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>73</line>
<index>2387</index>
<endIndex>2399</endIndex>
<startLine>73</startLine>
<startColumn>56</startColumn>
<endLine>73</endLine>
<endColumn>68</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to graphicsHeight must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>73</line>
<index>2402</index>
<endIndex>2415</endIndex>
<startLine>73</startLine>
<startColumn>71</startColumn>
<endLine>73</endLine>
<endColumn>84</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to guiRoot must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>74</line>
<index>2452</index>
<endIndex>2458</endIndex>
<startLine>74</startLine>
<startColumn>13</startColumn>
<endLine>74</endLine>
<endColumn>19</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to guiRoot must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>76</line>
<index>2616</index>
<endIndex>2622</endIndex>
<startLine>76</startLine>
<startColumn>91</startColumn>
<endLine>76</endLine>
<endColumn>97</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to guiRoot must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>98</line>
<index>3542</index>
<endIndex>3548</endIndex>
<startLine>98</startLine>
<startColumn>122</startColumn>
<endLine>98</endLine>
<endColumn>128</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="UseStringEmptyForEmptyStrings" ruleCheckId="SA1122">
<context>Use string.Empty rather than "".</context>
<line>79</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.SpacingRules" rule="SingleLineCommentsMustBeginWithSingleSpace" ruleCheckId="SA1005">
<context>The comment must start with a single space. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>99</line>
<index>3565</index>
<endIndex>3593</endIndex>
<startLine>99</startLine>
<startColumn>13</startColumn>
<endLine>99</endLine>
<endColumn>41</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="CurlyBracketsMustNotBeOmitted" ruleCheckId="SA1503">
<context>The body of the if statement must be wrapped in opening and closing curly brackets.</context>
<line>119</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="SingleLineCommentsMustNotBeFollowedByBlankLine" ruleCheckId="SA1512">
<context>A single-line comment must not be followed by a blank line. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>121</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="PrefixCallsCorrectly" ruleCheckId="SA1126">
<context>The call to Exit must begin with the 'this.', 'base.', 'object.' or 'ReporterMain.' or 'Game.' prefix to indicate the intended method call. </context>
<line>119</line>
<index>4396</index>
<endIndex>4399</endIndex>
<startLine>119</startLine>
<startColumn>17</startColumn>
<endLine>119</endLine>
<endColumn>20</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="SingleLineCommentsMustNotBeFollowedByBlankLine" ruleCheckId="SA1512">
<context>A single-line comment must not be followed by a blank line. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>134</line>
<warning>False</warning>
</violation>
</violations>
</sourcecode>
</stylecopresultscache>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

View File

@@ -1,256 +0,0 @@
namespace Launcher
{
partial class LauncherMain
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LauncherMain));
this.launchButton = new System.Windows.Forms.Button();
this.resolutionBox = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.fullscreenBox = new System.Windows.Forms.CheckBox();
this.contentPackageBox = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.packageManagerButton = new System.Windows.Forms.Button();
this.installedVersionLabel = new System.Windows.Forms.Label();
this.autoUpdateCheckBox = new System.Windows.Forms.CheckBox();
this.progressBar = new System.Windows.Forms.ProgressBar();
this.patchNoteBox = new System.Windows.Forms.TextBox();
this.updateLabel = new System.Windows.Forms.Label();
this.downloadButton = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// launchButton
//
this.launchButton.BackColor = System.Drawing.Color.OrangeRed;
this.launchButton.FlatAppearance.BorderColor = System.Drawing.Color.OrangeRed;
this.launchButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.launchButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.launchButton.ForeColor = System.Drawing.SystemColors.ControlText;
this.launchButton.Location = new System.Drawing.Point(455, 399);
this.launchButton.Name = "launchButton";
this.launchButton.Size = new System.Drawing.Size(161, 42);
this.launchButton.TabIndex = 1;
this.launchButton.Text = "LAUNCH";
this.launchButton.UseVisualStyleBackColor = false;
this.launchButton.Click += new System.EventHandler(this.launchButton_Click);
//
// resolutionBox
//
this.resolutionBox.AllowDrop = true;
this.resolutionBox.FormattingEnabled = true;
this.resolutionBox.Location = new System.Drawing.Point(369, 236);
this.resolutionBox.Name = "resolutionBox";
this.resolutionBox.Size = new System.Drawing.Size(212, 21);
this.resolutionBox.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.SystemColors.Window;
this.label1.Location = new System.Drawing.Point(366, 220);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(60, 13);
this.label1.TabIndex = 3;
this.label1.Text = "Resolution:";
//
// fullscreenBox
//
this.fullscreenBox.AutoSize = true;
this.fullscreenBox.BackColor = System.Drawing.Color.Transparent;
this.fullscreenBox.ForeColor = System.Drawing.SystemColors.Window;
this.fullscreenBox.Location = new System.Drawing.Point(369, 281);
this.fullscreenBox.Name = "fullscreenBox";
this.fullscreenBox.Size = new System.Drawing.Size(74, 17);
this.fullscreenBox.TabIndex = 4;
this.fullscreenBox.Text = "Fullscreen";
this.fullscreenBox.UseVisualStyleBackColor = false;
//
// contentPackageBox
//
this.contentPackageBox.FormattingEnabled = true;
this.contentPackageBox.Location = new System.Drawing.Point(369, 138);
this.contentPackageBox.Name = "contentPackageBox";
this.contentPackageBox.Size = new System.Drawing.Size(212, 21);
this.contentPackageBox.TabIndex = 5;
this.contentPackageBox.SelectedIndexChanged += new System.EventHandler(this.contentPackageBox_SelectedIndexChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.ForeColor = System.Drawing.SystemColors.Window;
this.label2.Location = new System.Drawing.Point(366, 122);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(92, 13);
this.label2.TabIndex = 6;
this.label2.Text = "Content package:";
//
// packageManagerButton
//
this.packageManagerButton.BackColor = System.Drawing.Color.OrangeRed;
this.packageManagerButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.packageManagerButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.packageManagerButton.Location = new System.Drawing.Point(369, 165);
this.packageManagerButton.Name = "packageManagerButton";
this.packageManagerButton.Size = new System.Drawing.Size(120, 35);
this.packageManagerButton.TabIndex = 7;
this.packageManagerButton.Text = "Package manager";
this.packageManagerButton.UseVisualStyleBackColor = false;
this.packageManagerButton.Click += new System.EventHandler(this.packageManagerButton_Click);
//
// installedVersionLabel
//
this.installedVersionLabel.BackColor = System.Drawing.Color.Transparent;
this.installedVersionLabel.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.installedVersionLabel.Location = new System.Drawing.Point(-8, 78);
this.installedVersionLabel.Name = "installedVersionLabel";
this.installedVersionLabel.Size = new System.Drawing.Size(644, 23);
this.installedVersionLabel.TabIndex = 8;
this.installedVersionLabel.Text = "Installed version:";
this.installedVersionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// autoUpdateCheckBox
//
this.autoUpdateCheckBox.AutoSize = true;
this.autoUpdateCheckBox.BackColor = System.Drawing.Color.Transparent;
this.autoUpdateCheckBox.ForeColor = System.Drawing.SystemColors.Window;
this.autoUpdateCheckBox.Location = new System.Drawing.Point(47, 122);
this.autoUpdateCheckBox.Name = "autoUpdateCheckBox";
this.autoUpdateCheckBox.Size = new System.Drawing.Size(177, 17);
this.autoUpdateCheckBox.TabIndex = 9;
this.autoUpdateCheckBox.Text = "Automatically check for updates";
this.autoUpdateCheckBox.UseVisualStyleBackColor = false;
//
// progressBar
//
this.progressBar.Location = new System.Drawing.Point(129, 407);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(207, 30);
this.progressBar.TabIndex = 10;
//
// patchNoteBox
//
this.patchNoteBox.AcceptsReturn = true;
this.patchNoteBox.Location = new System.Drawing.Point(47, 145);
this.patchNoteBox.Multiline = true;
this.patchNoteBox.Name = "patchNoteBox";
this.patchNoteBox.ReadOnly = true;
this.patchNoteBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.patchNoteBox.Size = new System.Drawing.Size(289, 226);
this.patchNoteBox.TabIndex = 11;
//
// updateLabel
//
this.updateLabel.AutoSize = true;
this.updateLabel.BackColor = System.Drawing.Color.Transparent;
this.updateLabel.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.updateLabel.Location = new System.Drawing.Point(44, 383);
this.updateLabel.Name = "updateLabel";
this.updateLabel.Size = new System.Drawing.Size(98, 13);
this.updateLabel.TabIndex = 12;
this.updateLabel.Text = "New update found!";
//
// downloadButton
//
this.downloadButton.BackColor = System.Drawing.Color.OrangeRed;
this.downloadButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.downloadButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.downloadButton.Location = new System.Drawing.Point(47, 407);
this.downloadButton.Name = "downloadButton";
this.downloadButton.Size = new System.Drawing.Size(76, 30);
this.downloadButton.TabIndex = 13;
this.downloadButton.Text = "Download";
this.downloadButton.UseVisualStyleBackColor = false;
this.downloadButton.Click += new System.EventHandler(this.downloadButton_Click);
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(-8, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(644, 63);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// LauncherMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.ClientSize = new System.Drawing.Size(628, 453);
this.Controls.Add(this.downloadButton);
this.Controls.Add(this.updateLabel);
this.Controls.Add(this.patchNoteBox);
this.Controls.Add(this.progressBar);
this.Controls.Add(this.autoUpdateCheckBox);
this.Controls.Add(this.installedVersionLabel);
this.Controls.Add(this.packageManagerButton);
this.Controls.Add(this.label2);
this.Controls.Add(this.contentPackageBox);
this.Controls.Add(this.fullscreenBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.launchButton);
this.Controls.Add(this.resolutionBox);
this.Controls.Add(this.pictureBox1);
this.DoubleBuffered = true;
this.Name = "LauncherMain";
this.Text = "Launcher";
this.Load += new System.EventHandler(this.LauncherMain_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button launchButton;
private System.Windows.Forms.ComboBox resolutionBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox fullscreenBox;
private System.Windows.Forms.ComboBox contentPackageBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button packageManagerButton;
private System.Windows.Forms.Label installedVersionLabel;
private System.Windows.Forms.CheckBox autoUpdateCheckBox;
private System.Windows.Forms.ProgressBar progressBar;
private System.Windows.Forms.TextBox patchNoteBox;
private System.Windows.Forms.Label updateLabel;
private System.Windows.Forms.Button downloadButton;
private System.Windows.Forms.PictureBox pictureBox1;
}
}

View File

@@ -1,410 +0,0 @@
using RestSharp;
using Barotrauma;
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.Net;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
namespace Launcher
{
public partial class LauncherMain : Form
{
string version = AssemblyName.GetAssemblyName("Barotrauma.exe").Version.ToString();
private const string configPath = "config.xml";
private Barotrauma.GameSettings settings;
private string latestVersionFileList, latestVersionFolder;
[DllImport("user32.dll")]
public static extern bool EnumDisplaySettings(
string deviceName, int modeNum, ref DEVMODE devMode);
const int ENUM_CURRENT_SETTINGS = -1;
const int ENUM_REGISTRY_SETTINGS = -2;
private List<GraphicsMode> supportedModes;
public bool FullScreenEnabled
{
get { return settings.FullScreenEnabled; }
set { settings.FullScreenEnabled = value; }
}
public bool AutoCheckUpdates
{
get { return settings.AutoCheckUpdates; }
set { settings.AutoCheckUpdates = value; }
}
//private GraphicsMode selectedMode;
public LauncherMain()
{
InitializeComponent();
ContentPackage.LoadAll(ContentPackage.Folder);
contentPackageBox.DataSource = ContentPackage.list;
supportedModes = new List<GraphicsMode>();
DEVMODE vDevMode = new DEVMODE();
int i = 0;
while (EnumDisplaySettings(null, i, ref vDevMode))
{
if (vDevMode.dmBitsPerPel < 16 || supportedModes.FirstOrDefault(sm => sm.Width == vDevMode.dmPelsWidth && sm.Height == vDevMode.dmPelsHeight) != null)
{
i++;
continue;
}
supportedModes.Add(
new GraphicsMode(vDevMode.dmPelsWidth,
vDevMode.dmPelsHeight,
vDevMode.dmBitsPerPel, vDevMode.dmDisplayFrequency));
i++;
}
resolutionBox.DataSource = new BindingList<GraphicsMode>(supportedModes);
//resolutionBox.SelectedIndexChanged =
//LoadSettings(configPath);
settings = new GameSettings(configPath);
resolutionBox.SelectedItem = supportedModes.FirstOrDefault(sm => sm.Width == settings.GraphicsWidth && sm.Height == settings.GraphicsHeight);
if (resolutionBox.SelectedItem == null)
{
resolutionBox.SelectedItem = supportedModes.FirstOrDefault(sm =>
sm.Width == Screen.PrimaryScreen.Bounds.Width &&
sm.Height == Screen.PrimaryScreen.Bounds.Height);
if (resolutionBox.SelectedItem == null) resolutionBox.SelectedItem = supportedModes[0];
}
fullscreenBox.DataBindings.Add("Checked", this, "FullscreenEnabled");
autoUpdateCheckBox.DataBindings.Add("Checked", this, "AutoCheckUpdates");
if (settings.SelectedContentPackage == null)
{
if (contentPackageBox.Items.Count > 0) contentPackageBox.SelectedItem = contentPackageBox.Items[0];
}
else
{
contentPackageBox.SelectedItem = settings.SelectedContentPackage;
}
progressBar.Visible = false;
updateLabel.Visible = false;
downloadButton.Visible = false;
installedVersionLabel.Text = "Installed version: " + version;
if (settings.AutoCheckUpdates)
{
CheckForUpdates();
}
//resolutionBox.SelectedItem = selectedMode;
}
private void SaveSettings(string filePath)
{
GraphicsMode selectedMode = resolutionBox.SelectedItem as GraphicsMode;
settings.GraphicsWidth = selectedMode.Width;
settings.GraphicsHeight = selectedMode.Height;
settings.Save(configPath);
}
private void launchButton_Click(object sender, EventArgs e)
{
SaveSettings(configPath);
var executables = settings.SelectedContentPackage.GetFilesOfType(ContentType.Executable);
if (executables.Count == 0)
{
MessageBox.Show("Error", "The game executable isn't configured in the selected content package.");
return;
}
string exePath = Directory.GetCurrentDirectory() + "//" + executables[0];
if (!File.Exists(exePath))
{
MessageBox.Show("Error", "Couldn't find the executable ''" + exePath + "''!");
return;
}
try
{
Process.Start(new ProcessStartInfo(exePath));
}
catch (Exception exception)
{
MessageBox.Show("Error while opening executable ''" + exePath + "''", exception.Message);
return;
}
Application.Exit();
}
private void packageManagerButton_Click(object sender, EventArgs e)
{
var packageManager = new PackageManager(settings.SelectedContentPackage);
packageManager.Show();
}
private void contentPackageBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (settings == null) return;
ComboBox comboBox = sender as ComboBox;
settings.SelectedContentPackage = comboBox.SelectedItem as ContentPackage;
}
private bool CheckForUpdates()
{
patchNoteBox.Text = "Checking for updates...";
XDocument doc = null;
try
{
doc = FetchXML("versioninfo.xml");
}
catch (Exception e)
{
patchNoteBox.Text = "Error while checking for updates: " + e.Message;
return false;
}
CheckUpdateXML(doc);
return true;
}
private XDocument FetchXML(string fileName)
{
var client = new RestClient(settings.MasterServerUrl);
var request = new RestRequest(fileName, Method.GET);
IRestResponse response = client.Execute(request);
if (response.ResponseStatus!= ResponseStatus.Completed) return null;
if (response.StatusCode != HttpStatusCode.OK) return null;
string xml = response.Content;
string _byteOrderMarkUtf8 = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble());
if (xml.StartsWith(_byteOrderMarkUtf8))
{
xml = xml.Remove(0, _byteOrderMarkUtf8.Length);
}
return XDocument.Parse(xml);
}
private bool CheckUpdateXML(XDocument doc)
{
if (doc.Root==null)
{
patchNoteBox.Text = "Error while checking for updates: could not parse update info";
return false;
}
progressBar.Visible = true;
downloadButton.Visible = true;
updateLabel.Visible = true;
string latestVersion = ToolBox.GetAttributeString(doc.Root, "latestversion", "");
latestVersionFolder = ToolBox.GetAttributeString(doc.Root, "latestversionfolder", "");
latestVersionFileList = ToolBox.GetAttributeString(doc.Root, "latestversionfilelist", "");
if (latestVersion == version)
{
patchNoteBox.Text = "Game is up to date!";
return false;
}
updateLabel.Text = "New update found! (" + latestVersion + ")";
XElement patchNotes = doc.Root.Element("patchnotes");
if (patchNotes!=null)
{
StringBuilder sb = new StringBuilder();
foreach (XElement patchNote in patchNotes.Elements())
{
string patchNumber = ToolBox.GetAttributeString(patchNote, "version", "");
//read the patch notes until we reach the user's version
if (patchNumber == version) break;
sb.AppendLine(ToolBox.ElementInnerText(patchNote));
sb.AppendLine("*************************************\n");
}
patchNoteBox.Text = sb.ToString();
}
return true;
}
private void downloadButton_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(latestVersionFolder)) return;
Button senderButton = sender as Button;
senderButton.Enabled = false;
XDocument doc = null;
try
{
doc = FetchXML("filelist.xml");
}
catch (Exception exception)
{
patchNoteBox.Text = "Error while checking for updates: " + exception.Message;
return;
}
filesToDownload = UpdaterUtil.GetRequiredFiles(doc);
string dir = Directory.GetCurrentDirectory();
filesToDownloadCount = filesToDownload.Count;
if (filesToDownloadCount>0)
{
WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
//webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
webClient.DownloadFileAsync(new Uri(latestVersionFolder + filesToDownload[0]), dir);
}
}
private List<string> filesToDownload;
private int filesDownloaded, filesToDownloadCount;
private void Completed(object sender, AsyncCompletedEventArgs e)
{
filesDownloaded++;
progressBar.Value = (int)(((float)filesDownloaded / (float)filesToDownloadCount) * 100.0f);//e.ProgressPercentage;
filesToDownload.RemoveAt(0);
if (filesToDownload.Count==0)
{
progressBar.Visible = false;
downloadButton.Visible = false;
updateLabel.Visible = false;
MessageBox.Show("Download completed!");
settings.WasGameUpdated = true;
return;
}
updateLabel.Text = "Downloading file "+ filesDownloaded + "/" + filesToDownloadCount + " ("+ filesToDownload[0] + ")";
WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
//webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
string dir = Directory.GetCurrentDirectory();
string fileDir = Path.GetDirectoryName(filesToDownload[0]);
if (!string.IsNullOrWhiteSpace(fileDir) && !Directory.Exists(fileDir))
{
Directory.CreateDirectory(fileDir);
}
webClient.DownloadFileAsync(new Uri(latestVersionFolder + filesToDownload[0]), @dir + "\\" + filesToDownload[0]);
}
private void LauncherMain_Load(object sender, EventArgs e)
{
}
}
public class GraphicsMode
{
public readonly int Width, Height;
public readonly int Bits;
public readonly int Frequency;
public GraphicsMode(int width, int height, int bits, int freq)
{
Width = width;
Height = height;
Bits = bits;
Frequency = freq;
}
public override string ToString()
{
return Width + "x" + Height;// +", " + Bits + " bit, " + Frequency + " Hz";
}
}
[StructLayout(LayoutKind.Sequential)]
public struct DEVMODE
{
private const int CCHDEVICENAME = 0x20;
private const int CCHFORMNAME = 0x20;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)]
public string dmDeviceName;
public short dmSpecVersion;
public short dmDriverVersion;
public short dmSize;
public short dmDriverExtra;
public int dmFields;
public int dmPositionX;
public int dmPositionY;
public ScreenOrientation dmDisplayOrientation;
public int dmDisplayFixedOutput;
public short dmColor;
public short dmDuplex;
public short dmYResolution;
public short dmTTOption;
public short dmCollate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)]
public string dmFormName;
public short dmLogPixels;
public int dmBitsPerPel;
public int dmPelsWidth;
public int dmPelsHeight;
public int dmDisplayFlags;
public int dmDisplayFrequency;
public int dmICMMethod;
public int dmICMIntent;
public int dmMediaType;
public int dmDitherType;
public int dmReserved1;
public int dmReserved2;
public int dmPanningWidth;
public int dmPanningHeight;
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,119 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{24420B91-6CD9-4DE3-9ADD-2F2C7E1FB6BB}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Launcher</RootNamespace>
<AssemblyName>Launcher</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Subsurface\bin\Windows\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>Launcher.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\RestSharp.105.2.3\lib\net45\RestSharp.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="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="PackageManager.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PackageManager.Designer.cs">
<DependentUpon>PackageManager.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="PackageManager.resx">
<DependentUpon>PackageManager.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>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Subsurface\Barotrauma.csproj">
<Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project>
<Name>Barotrauma</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Icon.ico" />
</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>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@@ -1,365 +0,0 @@
namespace Launcher
{
partial class PackageManager
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackageManager));
this.packageList = new System.Windows.Forms.ListBox();
this.newPackageName = new System.Windows.Forms.TextBox();
this.newPackage = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.itemList = new System.Windows.Forms.ListBox();
this.itemButton = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.characterList = new System.Windows.Forms.ListBox();
this.characterButton = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.structureList = new System.Windows.Forms.ListBox();
this.structureButton = new System.Windows.Forms.Button();
this.jobButton = new System.Windows.Forms.Button();
this.jobList = new System.Windows.Forms.ListBox();
this.label4 = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.characterFolder = new System.Windows.Forms.Button();
this.itemFolder = new System.Windows.Forms.Button();
this.structureFolder = new System.Windows.Forms.Button();
this.jobFolder = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label5 = new System.Windows.Forms.Label();
this.exeBox = new System.Windows.Forms.TextBox();
this.exeButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// packageList
//
this.packageList.FormattingEnabled = true;
this.packageList.Location = new System.Drawing.Point(12, 87);
this.packageList.Name = "packageList";
this.packageList.Size = new System.Drawing.Size(180, 381);
this.packageList.TabIndex = 3;
this.packageList.SelectedIndexChanged += new System.EventHandler(this.packageList_SelectedIndexChanged);
//
// newPackageName
//
this.newPackageName.Location = new System.Drawing.Point(12, 474);
this.newPackageName.Name = "newPackageName";
this.newPackageName.Size = new System.Drawing.Size(129, 20);
this.newPackageName.TabIndex = 4;
this.newPackageName.TextChanged += new System.EventHandler(this.newPackageName_TextChanged);
//
// newPackage
//
this.newPackage.Enabled = false;
this.newPackage.Location = new System.Drawing.Point(147, 474);
this.newPackage.Name = "newPackage";
this.newPackage.Size = new System.Drawing.Size(45, 20);
this.newPackage.TabIndex = 5;
this.newPackage.Text = "New";
this.newPackage.UseVisualStyleBackColor = true;
this.newPackage.Click += new System.EventHandler(this.newPackage_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.SystemColors.Control;
this.label1.Location = new System.Drawing.Point(215, 338);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(51, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Item files:";
//
// itemList
//
this.itemList.FormattingEnabled = true;
this.itemList.Location = new System.Drawing.Point(218, 360);
this.itemList.Name = "itemList";
this.itemList.Size = new System.Drawing.Size(255, 134);
this.itemList.TabIndex = 8;
this.itemList.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.fileList_KeyPress);
//
// itemButton
//
this.itemButton.Location = new System.Drawing.Point(317, 334);
this.itemButton.Name = "itemButton";
this.itemButton.Size = new System.Drawing.Size(75, 23);
this.itemButton.TabIndex = 9;
this.itemButton.Text = "Add file";
this.itemButton.UseVisualStyleBackColor = true;
this.itemButton.Click += new System.EventHandler(this.addFileButton_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.ForeColor = System.Drawing.SystemColors.Control;
this.label2.Location = new System.Drawing.Point(215, 173);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(77, 13);
this.label2.TabIndex = 7;
this.label2.Text = "Character files:";
//
// characterList
//
this.characterList.FormattingEnabled = true;
this.characterList.Location = new System.Drawing.Point(218, 198);
this.characterList.Name = "characterList";
this.characterList.Size = new System.Drawing.Size(255, 121);
this.characterList.TabIndex = 8;
this.characterList.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.fileList_KeyPress);
//
// characterButton
//
this.characterButton.Location = new System.Drawing.Point(317, 169);
this.characterButton.Name = "characterButton";
this.characterButton.Size = new System.Drawing.Size(75, 23);
this.characterButton.TabIndex = 9;
this.characterButton.Text = "Add file";
this.characterButton.UseVisualStyleBackColor = true;
this.characterButton.Click += new System.EventHandler(this.addFileButton_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.ForeColor = System.Drawing.SystemColors.Control;
this.label3.Location = new System.Drawing.Point(489, 174);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(96, 13);
this.label3.TabIndex = 7;
this.label3.Text = "Map structure files:";
//
// structureList
//
this.structureList.FormattingEnabled = true;
this.structureList.Location = new System.Drawing.Point(492, 198);
this.structureList.Name = "structureList";
this.structureList.Size = new System.Drawing.Size(255, 121);
this.structureList.TabIndex = 8;
this.structureList.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.fileList_KeyPress);
//
// structureButton
//
this.structureButton.Location = new System.Drawing.Point(591, 169);
this.structureButton.Name = "structureButton";
this.structureButton.Size = new System.Drawing.Size(75, 23);
this.structureButton.TabIndex = 9;
this.structureButton.Text = "Add file";
this.structureButton.UseVisualStyleBackColor = true;
this.structureButton.Click += new System.EventHandler(this.addFileButton_Click);
//
// jobButton
//
this.jobButton.Location = new System.Drawing.Point(591, 334);
this.jobButton.Name = "jobButton";
this.jobButton.Size = new System.Drawing.Size(75, 23);
this.jobButton.TabIndex = 12;
this.jobButton.Text = "Add file";
this.jobButton.UseVisualStyleBackColor = true;
this.jobButton.Click += new System.EventHandler(this.addFileButton_Click);
//
// jobList
//
this.jobList.FormattingEnabled = true;
this.jobList.Location = new System.Drawing.Point(492, 360);
this.jobList.Name = "jobList";
this.jobList.Size = new System.Drawing.Size(255, 134);
this.jobList.TabIndex = 11;
this.jobList.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.fileList_KeyPress);
//
// label4
//
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.ForeColor = System.Drawing.SystemColors.Control;
this.label4.Location = new System.Drawing.Point(489, 339);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(48, 13);
this.label4.TabIndex = 10;
this.label4.Text = "Job files:";
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(623, 513);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(124, 37);
this.okButton.TabIndex = 13;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// characterFolder
//
this.characterFolder.Location = new System.Drawing.Point(398, 169);
this.characterFolder.Name = "characterFolder";
this.characterFolder.Size = new System.Drawing.Size(75, 23);
this.characterFolder.TabIndex = 9;
this.characterFolder.Text = "Add folder";
this.characterFolder.UseVisualStyleBackColor = true;
this.characterFolder.Click += new System.EventHandler(this.addFolderButton_Click);
//
// itemFolder
//
this.itemFolder.Location = new System.Drawing.Point(398, 333);
this.itemFolder.Name = "itemFolder";
this.itemFolder.Size = new System.Drawing.Size(75, 23);
this.itemFolder.TabIndex = 14;
this.itemFolder.Text = "Add folder";
this.itemFolder.UseVisualStyleBackColor = true;
this.itemFolder.Click += new System.EventHandler(this.addFolderButton_Click);
//
// structureFolder
//
this.structureFolder.Location = new System.Drawing.Point(672, 169);
this.structureFolder.Name = "structureFolder";
this.structureFolder.Size = new System.Drawing.Size(75, 23);
this.structureFolder.TabIndex = 15;
this.structureFolder.Text = "Add folder";
this.structureFolder.UseVisualStyleBackColor = true;
this.structureFolder.Click += new System.EventHandler(this.addFolderButton_Click);
//
// jobFolder
//
this.jobFolder.Location = new System.Drawing.Point(672, 334);
this.jobFolder.Name = "jobFolder";
this.jobFolder.Size = new System.Drawing.Size(75, 23);
this.jobFolder.TabIndex = 16;
this.jobFolder.Text = "Add folder";
this.jobFolder.UseVisualStyleBackColor = true;
this.jobFolder.Click += new System.EventHandler(this.addFolderButton_Click);
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(-8, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(802, 56);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 17;
this.pictureBox1.TabStop = false;
//
// label5
//
this.label5.AutoSize = true;
this.label5.BackColor = System.Drawing.Color.Transparent;
this.label5.ForeColor = System.Drawing.SystemColors.Control;
this.label5.Location = new System.Drawing.Point(215, 87);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(63, 13);
this.label5.TabIndex = 18;
this.label5.Text = "Executable:";
//
// exeBox
//
this.exeBox.Enabled = false;
this.exeBox.Location = new System.Drawing.Point(284, 84);
this.exeBox.Name = "exeBox";
this.exeBox.Size = new System.Drawing.Size(176, 20);
this.exeBox.TabIndex = 19;
//
// exeButton
//
this.exeButton.Location = new System.Drawing.Point(466, 84);
this.exeButton.Name = "exeButton";
this.exeButton.Size = new System.Drawing.Size(32, 20);
this.exeButton.TabIndex = 20;
this.exeButton.Text = "...";
this.exeButton.UseVisualStyleBackColor = true;
this.exeButton.Click += new System.EventHandler(this.button1_Click);
//
// PackageManager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.ClientSize = new System.Drawing.Size(784, 562);
this.Controls.Add(this.exeButton);
this.Controls.Add(this.exeBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.jobFolder);
this.Controls.Add(this.structureFolder);
this.Controls.Add(this.itemFolder);
this.Controls.Add(this.okButton);
this.Controls.Add(this.jobButton);
this.Controls.Add(this.jobList);
this.Controls.Add(this.label4);
this.Controls.Add(this.structureButton);
this.Controls.Add(this.characterFolder);
this.Controls.Add(this.characterButton);
this.Controls.Add(this.itemButton);
this.Controls.Add(this.structureList);
this.Controls.Add(this.label3);
this.Controls.Add(this.characterList);
this.Controls.Add(this.label2);
this.Controls.Add(this.itemList);
this.Controls.Add(this.label1);
this.Controls.Add(this.newPackage);
this.Controls.Add(this.newPackageName);
this.Controls.Add(this.packageList);
this.DoubleBuffered = true;
this.Name = "PackageManager";
this.Text = "PackageManager";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListBox packageList;
private System.Windows.Forms.TextBox newPackageName;
private System.Windows.Forms.Button newPackage;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox itemList;
private System.Windows.Forms.Button itemButton;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ListBox characterList;
private System.Windows.Forms.Button characterButton;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ListBox structureList;
private System.Windows.Forms.Button structureButton;
private System.Windows.Forms.Button jobButton;
private System.Windows.Forms.ListBox jobList;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button characterFolder;
private System.Windows.Forms.Button itemFolder;
private System.Windows.Forms.Button structureFolder;
private System.Windows.Forms.Button jobFolder;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox exeBox;
private System.Windows.Forms.Button exeButton;
}
}

View File

@@ -1,295 +0,0 @@
using Barotrauma;
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.Threading.Tasks;
using System.Windows.Forms;
namespace Launcher
{
public partial class PackageManager : Form
{
private ContentPackage selectedPackage;
private List<ListBox> fileBoxes;
private List<TextBox> singleFileBoxes;
private List<Button> fileButtons;
public PackageManager(ContentPackage _selectedPackage)
{
InitializeComponent();
packageList.DisplayMember = "Name";
packageList.ValueMember = "MD5hash";
foreach (ContentPackage package in ContentPackage.list)
{
packageList.Items.Add(package);
}
fileBoxes = new List<ListBox>();
fileButtons = new List<Button>();
singleFileBoxes = new List<TextBox>();
fileBoxes.Add(itemList);
itemList.Tag = ContentType.Item;
itemButton.Tag = ContentType.Item;
itemFolder.Tag = ContentType.Item;
fileButtons.Add(itemButton);
fileButtons.Add(itemFolder);
fileBoxes.Add(characterList);
characterList.Tag = ContentType.Character;
characterButton.Tag = ContentType.Character;
characterFolder.Tag = ContentType.Character;
fileButtons.Add(characterButton);
fileButtons.Add(characterFolder);
fileBoxes.Add(structureList);
structureList.Tag = ContentType.Structure;
structureButton.Tag = ContentType.Structure;
structureFolder.Tag = ContentType.Structure;
fileButtons.Add(structureButton);
fileButtons.Add(structureFolder);
fileBoxes.Add(jobList);
jobList.Tag = ContentType.Jobs;
jobButton.Tag = ContentType.Jobs;
jobFolder.Tag = ContentType.Jobs;
fileButtons.Add(jobButton);
fileButtons.Add(jobFolder);
singleFileBoxes.Add(exeBox);
exeBox.Tag = ContentType.Executable;
exeButton.Tag = ContentType.Executable;
foreach (Button fileButton in fileButtons)
{
fileButton.Enabled = false;
}
selectedPackage = _selectedPackage;
SelectPackage(selectedPackage);
}
private void packageList_SelectedIndexChanged(object sender, EventArgs e)
{
ListBox listBox = sender as ListBox;
SelectPackage(listBox.SelectedItem as ContentPackage);
}
private void SelectPackage(ContentPackage package)
{
selectedPackage = package;
foreach (Button fileButton in fileButtons)
{
fileButton.Enabled = (selectedPackage != null);
}
foreach (ListBox fileBox in fileBoxes)
{
fileBox.Items.Clear();
}
foreach (ListBox fileBox in fileBoxes)
{
ContentType type = (fileBox.Tag is ContentType) ? (ContentType)fileBox.Tag : ContentType.None;
foreach (ContentFile file in selectedPackage.files)
{
if (file.type != type) continue;
fileBox.Items.Add(file);
}
}
}
private void newPackage_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(newPackageName.Text)) return;
ContentPackage newPackage = ContentPackage.CreatePackage(newPackageName.Text);
packageList.Items.Add(newPackage);
packageList.SelectedItem = newPackage;
newPackageName.Text = "";
}
private void newPackageName_TextChanged(object sender, EventArgs e)
{
newPackage.Enabled = !string.IsNullOrEmpty(newPackageName.Text);
}
private void addFileButton_Click(object sender, EventArgs e)
{
Button button = sender as Button;
ContentType type = (button.Tag is ContentType) ? (ContentType)button.Tag : ContentType.None;
Debug.Assert(type != ContentType.None, "ContentType of a button tag was ContentType.None");
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "XML files (*.xml)|*.xml;*.XML";
ofd.RestoreDirectory = true;
if (ofd.ShowDialog() == DialogResult.OK)
{
string[] fileNames = ofd.FileNames;
foreach (string file in fileNames)
{
AddFile(type, file);
}
}
}
private void fileList_KeyPress(object sender, PreviewKeyDownEventArgs e)
{
if (e.KeyCode != Keys.Delete) return;
ListBox listBox = sender as ListBox;
ContentType type = (listBox.Tag is ContentType) ? (ContentType)listBox.Tag : ContentType.None;
Debug.Assert(type != ContentType.None, "ContentType of a button tag was ContentType.None");
List<ContentFile> selectedFiles = new List<ContentFile>();
foreach (ContentFile item in listBox.SelectedItems)
{
selectedFiles.Add(item);
}
foreach (ContentFile file in selectedFiles)
{
RemoveFile(listBox, file);
}
}
private void AddFile(ContentType type, string path)
{
ListBox selectedBox = null;
foreach (ListBox fileBox in fileBoxes)
{
if (type != ((fileBox.Tag is ContentType) ? (ContentType)fileBox.Tag : ContentType.None)) continue;
selectedBox = fileBox;
break;
}
ContentFile newFile = selectedPackage.AddFile(GetRelativePath(path, Directory.GetCurrentDirectory()), type);
if (newFile!=null && selectedBox!=null) selectedBox.Items.Add(newFile);
}
private void RemoveFile(ListBox listBox, ContentFile file)
{
if (file == null) return;
if (listBox != null) listBox.Items.Remove(file);
selectedPackage.RemoveFile(file);
}
private void addFolderButton_Click(object sender, EventArgs e)
{
Button button = sender as Button;
ContentType type = (button.Tag is ContentType) ? (ContentType)button.Tag : ContentType.None;
Debug.Assert(type != ContentType.None, "ContentType of a button tag was ContentType.None");
FolderBrowserDialog fbd = new FolderBrowserDialog();
//OpenFileDialog ofd = new OpenFileDialog();
//ofd.Filter = "XML files (*.xml)|*.xml;*.XML";
//ofd.RestoreDirectory?
if (fbd.ShowDialog() == DialogResult.OK)
{
AddFilesInFolder(type, fbd.SelectedPath);
}
}
private void AddFilesInFolder(ContentType type, string folder, string searchPattern ="*xml")
{
if (!Directory.Exists(folder)) return;
string[] files = Directory.GetFiles(folder, "*.xml");
foreach (string filePath in files)
{
AddFile(type, filePath);
}
string[] subDirectories = Directory.GetDirectories(folder, "*");
foreach (string subDir in subDirectories)
{
AddFilesInFolder(type, subDir, searchPattern);
}
}
string GetRelativePath(string filespec, string folder)
{
Uri pathUri = new Uri(filespec);
// Folders must end in a slash
if (!folder.EndsWith(Path.DirectorySeparatorChar.ToString()))
{
folder += Path.DirectorySeparatorChar;
}
Uri folderUri = new Uri(folder);
return Uri.UnescapeDataString(folderUri.MakeRelativeUri(pathUri).ToString().Replace('/', Path.DirectorySeparatorChar));
}
private void okButton_Click(object sender, EventArgs e)
{
if (selectedPackage!=null) selectedPackage.Save(ContentPackage.Folder);
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
Button button = sender as Button;
ContentType type = (button.Tag is ContentType) ? (ContentType)button.Tag : ContentType.None;
Debug.Assert(type != ContentType.None, "ContentType of a button tag was ContentType.None");
TextBox selectedBox = null;
foreach (TextBox fileBox in singleFileBoxes)
{
if (type != ((fileBox.Tag is ContentType) ? (ContentType)fileBox.Tag : ContentType.None)) continue;
selectedBox = fileBox;
break;
}
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = (type == ContentType.Executable) ? "Executable (*.exe)|*.exe" : "XML files (*.xml)|*.xml;*.XML";
ofd.Multiselect = false;
if (ofd.ShowDialog() == DialogResult.OK)
{
var existingFile = selectedPackage.files.Find(f => f.type == type);
if (existingFile!=null)
{
RemoveFile(null, existingFile);
}
AddFile(type, ofd.FileName);
selectedBox.Text = GetRelativePath(ofd.FileName, Directory.GetCurrentDirectory());
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Launcher
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new LauncherMain());
}
}
}

View File

@@ -1,36 +0,0 @@
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("OldLauncher")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Launcher")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[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("ef69d08c-36d1-4c9b-ac73-198db7d6e904")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,71 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Launcher.Properties
{
/// <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 ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Launcher.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

@@ -1,117 +0,0 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Launcher.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
</packages>

Binary file not shown.

View File

@@ -1,719 +0,0 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketMustBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtStartOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtEndOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeAnalysisSuppressionMustHaveJustification">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugAssertMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugFailMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstantsMustAppearBeforeFields">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticElementsMustAppearBeforeInstanceElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DeclarationKeywordsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ProtectedMustComeBeforeInternal">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertyAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EventAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CommentsMustContainText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterListMustFollowDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustNotSpanMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustFollowPreviousClause">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPlaceRegionsWithinElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainEmptyStatements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedComments">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseBuiltInTypeAlias">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseShorthandForNullableTypes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="KeywordsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommasMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SemicolonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationLinesMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OperatorKeywordMustBeFollowedBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NegativeSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PositiveSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ColonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

File diff suppressed because it is too large Load Diff

Binary file not shown.