Skip to content

Commit

Permalink
Merge pull request #1 from ShardTheBroken/0.2/refactor
Browse files Browse the repository at this point in the history
0.1.1/refactor
  • Loading branch information
BrokenShards authored Jun 29, 2020
2 parents bd12976 + a2396da commit 50274a4
Show file tree
Hide file tree
Showing 29 changed files with 243 additions and 178 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*/obj
*/bin
Binary file modified .vs/SCVITool/v15/.suo
Binary file not shown.
Binary file modified .vs/SCVITool/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file modified .vs/SCVITool/v15/Server/sqlite3/storage.ide-shm
Binary file not shown.
Binary file modified .vs/SCVITool/v15/Server/sqlite3/storage.ide-wal
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 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: AssemblyVersion( "0.1.1.0" )]
[assembly: AssemblyFileVersion( "1.0.0.0" )]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions SCVITool/SCVITool.csproj → SCVITool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.cs">
<Compile Include="Source\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<Compile Include="Source\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Source\Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainForm.resx">
<Compile Include="Source\SaveManager.cs" />
<EmbeddedResource Include="Source\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
Expand All @@ -71,6 +72,7 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include=".gitignore" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
6 changes: 6 additions & 0 deletions SCVITool.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion SCVITool.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1169
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCVITool", "SCVITool\SCVITool.csproj", "{4A7F008B-A9D5-4322-9DA5-9602274DC545}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCVITool", "SCVITool.csproj", "{4A7F008B-A9D5-4322-9DA5-9602274DC545}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
136 changes: 0 additions & 136 deletions SCVITool/MainForm.cs

This file was deleted.

18 changes: 0 additions & 18 deletions SCVITool/Program.cs

This file was deleted.

Binary file removed SCVITool/bin/Debug/SCVITool.exe
Binary file not shown.
6 changes: 0 additions & 6 deletions SCVITool/bin/Debug/SCVITool.exe.config

This file was deleted.

2 changes: 0 additions & 2 deletions SCVITool/bin/Debug/SCVITool.ini

This file was deleted.

Binary file removed SCVITool/bin/Debug/SCVITool.pdb
Binary file not shown.
Binary file removed SCVITool/bin/Release/SCVITool.exe
Binary file not shown.
6 changes: 0 additions & 6 deletions SCVITool/bin/Release/SCVITool.exe.config

This file was deleted.

Binary file removed SCVITool/bin/Release/SCVITool.pdb
Binary file not shown.
File renamed without changes.
27 changes: 27 additions & 0 deletions Source/MainForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// MainForm.cs //

using System;
using System.IO;
using System.Windows.Forms;

namespace SCVITool
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}

private void BackupClicked( object sender, EventArgs e )
{
if( !SaveManager.Backup() )
MessageBox.Show( this, SaveManager.ErrorMessage, "Backup failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation );
}
private void RestoreClicked( object sender, EventArgs e )
{
if( !SaveManager.Restore() )
MessageBox.Show( this, SaveManager.ErrorMessage, "Restore failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation );
}
}
}
File renamed without changes.
83 changes: 83 additions & 0 deletions Source/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Program.cs //

using System;
using System.Text;
using System.Windows.Forms;

namespace SCVITool
{
static class Program
{
static class Version
{
public const uint Major = 0;
public const uint Minor = 1;
public const uint Patch = 1;

public new static string ToString()
{
StringBuilder sb = new StringBuilder();

sb.Append( Major );
sb.Append( '.' );
sb.Append( Minor );
sb.Append( '.' );
sb.Append( Patch );

return sb.ToString();
}
}

static readonly string About = "SCVITool Version " + Version.ToString();
const string Help = "`SCVITool.exe [arg]`\n`-b` or `-backup` to perform a backup.\n`-r` or `-restore` to reastore the backup.";

[STAThread]
static int Main( string[] args )
{
if( args.Length > 0 )
{
Console.WriteLine( About );

if( args.Length > 1 )
{
Console.WriteLine( Help );
return -1;
}

string arg = args[ 0 ].ToLower();

if( arg == "-b" || arg == "-backup" )
{
if( !SaveManager.Backup() )
{
Console.Write( "Backup failed: " );
Console.WriteLine( SaveManager.ErrorMessage );
return -2;
}
}
else if( arg == "-r" || arg == "-restore" )
{
if( !SaveManager.Restore() )
{
Console.Write( "Restoration failed: " );
Console.WriteLine( SaveManager.ErrorMessage );
return -2;
}
}
else
{
Console.WriteLine( Help );
return -1;
}
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault( false );
Application.Run( new MainForm() );
}

return 0;
}
}
}
Loading

0 comments on commit 50274a4

Please sign in to comment.