-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ShardTheBroken/0.2/refactor
0.1.1/refactor
- Loading branch information
Showing
29 changed files
with
243 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*/obj | ||
*/bin |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
Oops, something went wrong.