aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vs/TimeHACK/v15/.suobin166912 -> 156672 bytes
-rw-r--r--TimeHACK.Engine/SaveSystem.cs61
-rw-r--r--TimeHACK.Engine/bin/Release/TimeHACK.Engine.dllbin187392 -> 187392 bytes
-rw-r--r--TimeHACK.Engine/bin/Release/TimeHACK.Engine.pdbbin54784 -> 54784 bytes
-rw-r--r--TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.FileListAbsolute.txt1
-rw-r--r--TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.GenerateResource.Cachebin2245 -> 2531 bytes
-rw-r--r--TimeHACK.Engine/obj/Release/TimeHACK.Engine.csprojResolveAssemblyReference.cachebin10673 -> 0 bytes
-rw-r--r--TimeHACK.Engine/obj/Release/TimeHACK.Engine.dllbin187392 -> 187392 bytes
-rw-r--r--TimeHACK.Engine/obj/Release/TimeHACK.Engine.pdbbin54784 -> 54784 bytes
-rw-r--r--TimeHACK.Main/NewGameDialog.cs42
-rw-r--r--TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs101
-rw-r--r--TimeHACK.Main/SaveDialogs/LoadGameDialog.cs57
-rw-r--r--TimeHACK.Main/SaveDialogs/LoadGameDialog.resx (renamed from TimeHACK.Main/NewGameDialog.resx)0
-rw-r--r--TimeHACK.Main/SaveDialogs/LoadGameProfileItem.Designer.cs190
-rw-r--r--TimeHACK.Main/SaveDialogs/LoadGameProfileItem.cs152
-rw-r--r--TimeHACK.Main/SaveDialogs/LoadGameProfileItem.resx120
-rw-r--r--TimeHACK.Main/SaveDialogs/NewGameDialog.Designer.cs (renamed from TimeHACK.Main/NewGameDialog.Designer.cs)16
-rw-r--r--TimeHACK.Main/SaveDialogs/NewGameDialog.cs99
-rw-r--r--TimeHACK.Main/SaveDialogs/NewGameDialog.resx120
-rw-r--r--TimeHACK.Main/TimeHACK.Main.csproj24
-rw-r--r--TimeHACK.Main/TitleScreen.Designer.cs3
-rw-r--r--TimeHACK.Main/TitleScreen.cs49
-rw-r--r--TimeHACK.Main/bin/Release/TimeHACK.Engine.dllbin187392 -> 187392 bytes
-rw-r--r--TimeHACK.Main/bin/Release/TimeHACK.Engine.pdbbin54784 -> 54784 bytes
-rw-r--r--TimeHACK.Main/bin/Release/TimeHACK.application2
-rw-r--r--TimeHACK.Main/bin/Release/TimeHACK.exebin4804608 -> 4812288 bytes
-rw-r--r--TimeHACK.Main/bin/Release/TimeHACK.exe.manifest6
-rw-r--r--TimeHACK.Main/bin/Release/TimeHACK.pdbbin235008 -> 249344 bytes
-rw-r--r--TimeHACK.Main/bin/Release/app.publish/TimeHACK.exebin4804608 -> 4812288 bytes
-rw-r--r--TimeHACK.Main/obj/Release/CoreCompileInputs.cache2
-rw-r--r--TimeHACK.Main/obj/Release/DesignTimeResolveAssemblyReferences.cachebin1464 -> 35211 bytes
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.LoadGameDialog.resourcesbin0 -> 180 bytes
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.LoadGameProfileItem.resourcesbin0 -> 180 bytes
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.FileListAbsolute.txt2
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.GenerateResource.Cachebin6278 -> 6453 bytes
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cachebin15071 -> 15081 bytes
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.WinClassicForms.WinClassicInstaller.resourcesbin1385 -> 1383 bytes
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.application2
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.exebin4804608 -> 4812288 bytes
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.exe.manifest6
-rw-r--r--TimeHACK.Main/obj/Release/TimeHACK.pdbbin235008 -> 249344 bytes
41 files changed, 967 insertions, 88 deletions
diff --git a/.vs/TimeHACK/v15/.suo b/.vs/TimeHACK/v15/.suo
index 6f8653c..47719f4 100644
--- a/.vs/TimeHACK/v15/.suo
+++ b/.vs/TimeHACK/v15/.suo
Binary files differ
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs
index 2016110..89c9cb0 100644
--- a/TimeHACK.Engine/SaveSystem.cs
+++ b/TimeHACK.Engine/SaveSystem.cs
@@ -11,6 +11,7 @@ namespace TimeHACK.Engine
public static class SaveSystem
{
public static Save CurrentSave { get; private set; }
+ public static Boolean DevMode = false;
public static string GameDirectory
{
@@ -20,7 +21,7 @@ namespace TimeHACK.Engine
}
}
- public static string ProfileDirectory
+ public static string AllProfilesDirectory
{
get
{
@@ -28,33 +29,47 @@ namespace TimeHACK.Engine
}
}
- public static bool LoadSave()
+ public static string ProfileName = "";
+ public static string ProfileFile = "main.save";
+
+ public static string ProfileDirectory
{
- if(File.Exists(Path.Combine(ProfileDirectory, "user.save")))
- {
- //Read base64 string from file
- string b64 = File.ReadAllText(Path.Combine(ProfileDirectory, "user.save"));
- //Get Unicode byte array
- byte[] bytes = Convert.FromBase64String(b64);
- //Decode the Unicode
- string json = Encoding.UTF8.GetString(bytes);
- //Deserialize save object.
- CurrentSave = JsonConvert.DeserializeObject<Save>(json);
- return true;
- }
- else
+ get
{
- NewGame();
- return false;
+ return Path.Combine(GameDirectory, Path.Combine("Profiles", ProfileName));
}
}
+ public static bool LoadSave()
+ {
+ // ON A FINAL RELEASE USE THE "FINAL RELEASE THINGS"
+ #region Final Release Things
+ //Read base64 string from file
+ //string b64 = File.ReadAllText(Path.Combine(ProfileDirectory, ProfileFile));
+ //Get Unicode byte array
+ //byte[] bytes = Convert.FromBase64String(b64);
+ //Decode the Unicode
+ //string json = Encoding.UTF8.GetString(bytes);
+ //Deserialize save object.
+ #endregion
+ // USE THE THINGS IN THE "DEVELOPER THINGS" FOR A DEVELOPMENT RELEASE
+ #region Developer Things
+ string json = File.ReadAllText(Path.Combine(ProfileDirectory, ProfileFile));
+ #endregion
+ CurrentSave = JsonConvert.DeserializeObject<Save>(json);
+ return true;
+ }
+
public static void NewGame()
{
+
//TODO: User must set a username....somehow
if (!Directory.Exists(GameDirectory))
Directory.CreateDirectory(GameDirectory);
+ if (!Directory.Exists(AllProfilesDirectory))
+ Directory.CreateDirectory(AllProfilesDirectory);
+
if (!Directory.Exists(ProfileDirectory))
Directory.CreateDirectory(ProfileDirectory);
@@ -68,13 +83,17 @@ namespace TimeHACK.Engine
public static void SaveGame()
{
//Serialize the save to JSON.
- string json = JsonConvert.SerializeObject(CurrentSave);
+ string json = JsonConvert.SerializeObject(CurrentSave, Formatting.Indented);
+
+ // ADD THE TWO LINES OF CODE BELOW ON A FINAL RELEASE
//Get JSON bytes (Unicode format).
- var bytes = Encoding.UTF8.GetBytes(json);
+ //var bytes = Encoding.UTF8.GetBytes(json);
//Encode the array into Base64.
- string b64 = Convert.ToBase64String(bytes);
+ //string b64 = Convert.ToBase64String(bytes);
//Write to disk.
- File.WriteAllText(Path.Combine(ProfileDirectory, "user.save"), b64);
+
+ // CHANGE THE "JSON" TO "B64" ON A FINAL RELEASE!
+ File.WriteAllText(Path.Combine(ProfileDirectory, ProfileFile), json);
}
}
diff --git a/TimeHACK.Engine/bin/Release/TimeHACK.Engine.dll b/TimeHACK.Engine/bin/Release/TimeHACK.Engine.dll
index 86d9598..062eb83 100644
--- a/TimeHACK.Engine/bin/Release/TimeHACK.Engine.dll
+++ b/TimeHACK.Engine/bin/Release/TimeHACK.Engine.dll
Binary files differ
diff --git a/TimeHACK.Engine/bin/Release/TimeHACK.Engine.pdb b/TimeHACK.Engine/bin/Release/TimeHACK.Engine.pdb
index 10716d1..57383ef 100644
--- a/TimeHACK.Engine/bin/Release/TimeHACK.Engine.pdb
+++ b/TimeHACK.Engine/bin/Release/TimeHACK.Engine.pdb
Binary files differ
diff --git a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.FileListAbsolute.txt b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.FileListAbsolute.txt
index 7fd9d9e..f9bcb5d 100644
--- a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.FileListAbsolute.txt
+++ b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.FileListAbsolute.txt
@@ -28,7 +28,6 @@ I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Engine\obj\Release\TimeHACK
I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Engine\obj\Release\TimeHACK.Engine.csproj.GenerateResource.Cache
I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Engine\obj\Release\TimeHACK.Engine.dll
I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Engine\obj\Release\TimeHACK.Engine.pdb
-I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Engine\obj\Release\TimeHACK.Engine.csprojResolveAssemblyReference.cache
C:\Users\lempamo\Documents\GitHub\TimeHACK-fork\TimeHACK.Engine\bin\Release\TimeHACK.Engine.dll
C:\Users\lempamo\Documents\GitHub\TimeHACK-fork\TimeHACK.Engine\bin\Release\TimeHACK.Engine.pdb
C:\Users\lempamo\Documents\GitHub\TimeHACK-fork\TimeHACK.Engine\bin\Release\Newtonsoft.Json.dll
diff --git a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.GenerateResource.Cache b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.GenerateResource.Cache
index c63151a..5860591 100644
--- a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.GenerateResource.Cache
+++ b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csproj.GenerateResource.Cache
Binary files differ
diff --git a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csprojResolveAssemblyReference.cache b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csprojResolveAssemblyReference.cache
deleted file mode 100644
index 138bee0..0000000
--- a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.csprojResolveAssemblyReference.cache
+++ /dev/null
Binary files differ
diff --git a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.dll b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.dll
index 86d9598..062eb83 100644
--- a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.dll
+++ b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.dll
Binary files differ
diff --git a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.pdb b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.pdb
index 10716d1..57383ef 100644
--- a/TimeHACK.Engine/obj/Release/TimeHACK.Engine.pdb
+++ b/TimeHACK.Engine/obj/Release/TimeHACK.Engine.pdb
Binary files differ
diff --git a/TimeHACK.Main/NewGameDialog.cs b/TimeHACK.Main/NewGameDialog.cs
deleted file mode 100644
index 0d95aff..0000000
--- a/TimeHACK.Main/NewGameDialog.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using TimeHACK.Engine;
-using Newtonsoft.Json;
-
-namespace TimeHACK
-{
- public partial class NewGameDialog : Form
- {
- public NewGameDialog()
- {
- InitializeComponent();
- }
-
- private void btnHelp_Click(object sender, EventArgs e)
- {
- MessageBox.Show("You can choose a profile name - this will create a new profile! Whenever you want to Load a game, click 'Load Game' and then choose a profile (You can have as many prfiles as you want)");
- }
-
- private void btnCancl_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void btnInfo_Click(object sender, EventArgs e)
- {
- MessageBox.Show("The game's profiles are stored in C:/TimeHACK/Profiles - the rest is for you to figure out!");
- }
-
- private void btnOk_Click(object sender, EventArgs e)
- {
-
- }
- }
-}
diff --git a/TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs b/TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs
new file mode 100644
index 0000000..4d8691d
--- /dev/null
+++ b/TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs
@@ -0,0 +1,101 @@
+namespace TimeHACK
+{
+ partial class LoadGameDialog
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button1 = new System.Windows.Forms.Button();
+ this.Profiles = new System.Windows.Forms.Panel();
+ this.panel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // panel1
+ //
+ this.panel1.BackColor = System.Drawing.Color.Silver;
+ this.panel1.Controls.Add(this.button3);
+ this.panel1.Controls.Add(this.button1);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panel1.Location = new System.Drawing.Point(0, 340);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(516, 25);
+ this.panel1.TabIndex = 0;
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(360, -1);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(75, 23);
+ this.button3.TabIndex = 0;
+ this.button3.Text = "Help";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(441, 0);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "OK";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // Profiles
+ //
+ this.Profiles.AutoScroll = true;
+ this.Profiles.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.Profiles.Location = new System.Drawing.Point(0, 0);
+ this.Profiles.Name = "Profiles";
+ this.Profiles.Size = new System.Drawing.Size(516, 340);
+ this.Profiles.TabIndex = 2;
+ //
+ // LoadGameDialog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+ this.ClientSize = new System.Drawing.Size(516, 365);
+ this.Controls.Add(this.Profiles);
+ this.Controls.Add(this.panel1);
+ this.Name = "LoadGameDialog";
+ this.Text = "Profiles";
+ this.Load += new System.EventHandler(this.LoadGameDialog_Load);
+ this.panel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Panel Profiles;
+ }
+} \ No newline at end of file
diff --git a/TimeHACK.Main/SaveDialogs/LoadGameDialog.cs b/TimeHACK.Main/SaveDialogs/LoadGameDialog.cs
new file mode 100644
index 0000000..b31bc50
--- /dev/null
+++ b/TimeHACK.Main/SaveDialogs/LoadGameDialog.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.IO;
+using static TimeHACK.Engine.SaveSystem;
+
+namespace TimeHACK
+{
+ public partial class LoadGameDialog : Form
+ {
+ public Boolean successful = false;
+ public LoadGameDialog()
+ {
+ InitializeComponent();
+ }
+
+ public void ChooseProfile(string SelectedProfile)
+ {
+ ProfileName = SelectedProfile;
+ successful = true;
+ this.Close();
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ MessageBox.Show("Here you can control all your profiles! Use can open a profile by hovering over it and clicking 'Load Profile!'");
+ }
+
+ private void LoadGameDialog_Load(object sender, EventArgs e)
+ {
+ foreach (string dir in Directory.GetDirectories(AllProfilesDirectory))
+ {
+ LoadGameProfileItem newItem = new LoadGameProfileItem();
+ newItem.Tag = Path.GetFileName(dir);
+ newItem.Dock = DockStyle.Top;
+ Profiles.Controls.Add(newItem);
+ newItem.Show();
+ }
+ }
+ }
+}
diff --git a/TimeHACK.Main/NewGameDialog.resx b/TimeHACK.Main/SaveDialogs/LoadGameDialog.resx
index 1af7de1..1af7de1 100644
--- a/TimeHACK.Main/NewGameDialog.resx
+++ b/TimeHACK.Main/SaveDialogs/LoadGameDialog.resx
diff --git a/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.Designer.cs b/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.Designer.cs
new file mode 100644
index 0000000..61a0976
--- /dev/null
+++ b/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.Designer.cs
@@ -0,0 +1,190 @@
+namespace TimeHACK
+{
+ partial class LoadGameProfileItem
+ {
+ /// <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 Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.sidebar = new System.Windows.Forms.Panel();
+ this.exampleLoadProfile = new System.Windows.Forms.Button();
+ this.exampleDelete = new System.Windows.Forms.Button();
+ this.exampleNameBtn = new System.Windows.Forms.Button();
+ this.profileName = new System.Windows.Forms.Label();
+ this.pnlConfirm = new System.Windows.Forms.Panel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.sidebar.SuspendLayout();
+ this.pnlConfirm.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // sidebar
+ //
+ this.sidebar.BackColor = System.Drawing.Color.Gray;
+ this.sidebar.Controls.Add(this.exampleLoadProfile);
+ this.sidebar.Controls.Add(this.exampleDelete);
+ this.sidebar.Controls.Add(this.exampleNameBtn);
+ this.sidebar.Dock = System.Windows.Forms.DockStyle.Right;
+ this.sidebar.Location = new System.Drawing.Point(245, 0);
+ this.sidebar.Name = "sidebar";
+ this.sidebar.Size = new System.Drawing.Size(102, 82);
+ this.sidebar.TabIndex = 2;
+ this.sidebar.Visible = false;
+ //
+ // exampleLoadProfile
+ //
+ this.exampleLoadProfile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+ this.exampleLoadProfile.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.exampleLoadProfile.Location = new System.Drawing.Point(3, 1);
+ this.exampleLoadProfile.Name = "exampleLoadProfile";
+ this.exampleLoadProfile.Size = new System.Drawing.Size(94, 23);
+ this.exampleLoadProfile.TabIndex = 0;
+ this.exampleLoadProfile.Text = "Load Profile!";
+ this.exampleLoadProfile.UseVisualStyleBackColor = false;
+ this.exampleLoadProfile.Click += new System.EventHandler(this.exampleLoadProfile_Click);
+ //
+ // exampleDelete
+ //
+ this.exampleDelete.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.exampleDelete.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.exampleDelete.Location = new System.Drawing.Point(3, 54);
+ this.exampleDelete.Name = "exampleDelete";
+ this.exampleDelete.Size = new System.Drawing.Size(93, 23);
+ this.exampleDelete.TabIndex = 0;
+ this.exampleDelete.Text = "Delete";
+ this.exampleDelete.UseVisualStyleBackColor = false;
+ this.exampleDelete.Click += new System.EventHandler(this.exampleDelete_Click);
+ //
+ // exampleNameBtn
+ //
+ this.exampleNameBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+ this.exampleNameBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.exampleNameBtn.Location = new System.Drawing.Point(3, 27);
+ this.exampleNameBtn.Name = "exampleNameBtn";
+ this.exampleNameBtn.Size = new System.Drawing.Size(93, 23);
+ this.exampleNameBtn.TabIndex = 0;
+ this.exampleNameBtn.Text = "Change Name";
+ this.exampleNameBtn.UseVisualStyleBackColor = false;
+ this.exampleNameBtn.Click += new System.EventHandler(this.exampleNameBtn_Click);
+ //
+ // profileName
+ //
+ this.profileName.BackColor = System.Drawing.Color.Gray;
+ this.profileName.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.profileName.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.profileName.Location = new System.Drawing.Point(0, 0);
+ this.profileName.Name = "profileName";
+ this.profileName.Size = new System.Drawing.Size(245, 82);
+ this.profileName.TabIndex = 1;
+ this.profileName.Text = "Profile Name";
+ //
+ // pnlConfirm
+ //
+ this.pnlConfirm.BackColor = System.Drawing.Color.Gray;
+ this.pnlConfirm.Controls.Add(this.button2);
+ this.pnlConfirm.Controls.Add(this.button1);
+ this.pnlConfirm.Controls.Add(this.label1);
+ this.pnlConfirm.Controls.Add(this.textBox1);
+ this.pnlConfirm.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.pnlConfirm.Location = new System.Drawing.Point(0, 32);
+ this.pnlConfirm.Name = "pnlConfirm";
+ this.pnlConfirm.Size = new System.Drawing.Size(245, 50);
+ this.pnlConfirm.TabIndex = 1;
+ this.pnlConfirm.Visible = false;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(3, 5);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(240, 13);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "Are you really sure you want to delete this Profile?";
+ //
+ // button1
+ //
+ this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.button1.Location = new System.Drawing.Point(10, 20);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(109, 22);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "Yes";
+ this.button1.UseVisualStyleBackColor = false;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button2
+ //
+ this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
+ this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.button2.Location = new System.Drawing.Point(136, 20);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(109, 23);
+ this.button2.TabIndex = 1;
+ this.button2.Text = "No";
+ this.button2.UseVisualStyleBackColor = false;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(3, 22);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(130, 20);
+ this.textBox1.TabIndex = 1;
+ this.textBox1.Visible = false;
+ //
+ // LoadGameProfileItem
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.pnlConfirm);
+ this.Controls.Add(this.profileName);
+ this.Controls.Add(this.sidebar);
+ this.Name = "LoadGameProfileItem";
+ this.Size = new System.Drawing.Size(347, 82);
+ this.Paint += new System.Windows.Forms.PaintEventHandler(this.LoadGameProfileItem_Paint);
+ this.sidebar.ResumeLayout(false);
+ this.pnlConfirm.ResumeLayout(false);
+ this.pnlConfirm.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel sidebar;
+ private System.Windows.Forms.Button exampleLoadProfile;
+ private System.Windows.Forms.Button exampleDelete;
+ private System.Windows.Forms.Button exampleNameBtn;
+ private System.Windows.Forms.Label profileName;
+ private System.Windows.Forms.Panel pnlConfirm;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.TextBox textBox1;
+ }
+}
diff --git a/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.cs b/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.cs
new file mode 100644
index 0000000..0087fb0
--- /dev/null
+++ b/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using static TimeHACK.Engine.SaveSystem;
+using System.IO;
+
+namespace TimeHACK
+{
+ public partial class LoadGameProfileItem : UserControl, IMessageFilter
+ {
+ public Boolean OnceRemoveHeight = false;
+ public Boolean OnceAddHeight = false;
+ public Boolean RequestingNewName = false;
+ public LoadGameProfileItem()
+ {
+ InitializeComponent();
+ Application.AddMessageFilter(this);
+ }
+
+ //private void LoadGameProfileItem_MouseHover(object sender, EventArgs e)
+ //{
+ // exampleTop.Show();
+ // this.Height += 28;
+ // OnceRemoveHeight = false;
+ //}
+
+ public bool PreFilterMessage(ref Message m)
+ {
+ var mouseLocation = Cursor.Position;
+
+ if (!ClientRectangle.Contains(PointToClient(Control.MousePosition)))
+ {
+ sidebar.Hide();
+ if (OnceRemoveHeight == false)
+ {
+ this.Height -= 28;
+ OnceRemoveHeight = true;
+ profileName.BackColor = Color.Gray;
+ sidebar.BackColor = Color.Gray;
+ pnlConfirm.BackColor = Color.Gray;
+ }
+ OnceAddHeight = false;
+ } else
+ {
+ sidebar.Show();
+ if (OnceAddHeight == false)
+ {
+ this.Height += 28;
+ OnceAddHeight = true;
+ profileName.BackColor = Color.LightGray;
+ sidebar.BackColor = Color.LightGray;
+ pnlConfirm.BackColor = Color.LightGray;
+ }
+ OnceRemoveHeight = false;
+ }
+
+ if (m.Msg != 0x20a) // Scrolling Message
+ {
+ return false;//ignore message
+ }
+ return false;
+ }
+
+ private void LoadGameProfileItem_Paint(object sender, PaintEventArgs e)
+ {
+ profileName.Text = this.Tag.ToString();
+ }
+
+ private void exampleLoadProfile_Click(object sender, EventArgs e)
+ {
+ ((LoadGameDialog)this.TopLevelControl).ChooseProfile(this.Tag.ToString());
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ DeleteProfile();
+ }
+
+ void DeleteProfile()
+ {
+ if (Directory.Exists(Path.Combine(AllProfilesDirectory, this.Tag.ToString())))
+ {
+ Directory.Delete(Path.Combine(AllProfilesDirectory, this.Tag.ToString()), true);
+ this.Hide();
+ }
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (!RequestingNewName == false)
+ {
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("New profile name cannot be empty!");
+ }
+ else
+ {
+ if (textBox1.Text.Length > 20)
+ {
+ MessageBox.Show("The profile name cannot be longer than 20 characters");
+ }
+ else
+ {
+ if (Directory.Exists(Path.Combine(AllProfilesDirectory, textBox1.Text)))
+ {
+ MessageBox.Show("That profile already exists");
+ }
+ else
+ {
+ Directory.Move(Path.Combine(AllProfilesDirectory, this.Tag.ToString()), Path.Combine(AllProfilesDirectory, textBox1.Text));
+ this.Tag = textBox1.Text;
+ this.Invalidate();
+ }
+ }
+ }
+ }
+ pnlConfirm.Hide();
+ } catch (Exception ex)
+ {
+
+ }
+ }
+
+ private void exampleDelete_Click(object sender, EventArgs e)
+ {
+ label1.Text = "Are you really sure you want to delete this Profile?";
+ button1.Show();
+ textBox1.Hide();
+ button2.Text = "No";
+ RequestingNewName = false;
+ pnlConfirm.Show();
+ }
+
+ private void exampleNameBtn_Click(object sender, EventArgs e)
+ {
+ label1.Text = "Enter a new profile name: ";
+ button1.Hide();
+ textBox1.Show();
+ button2.Text = "OK";
+ RequestingNewName = true;
+ pnlConfirm.Show();
+ }
+ }
+}
diff --git a/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.resx b/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/TimeHACK.Main/SaveDialogs/LoadGameProfileItem.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/TimeHACK.Main/NewGameDialog.Designer.cs b/TimeHACK.Main/SaveDialogs/NewGameDialog.Designer.cs
index 9aee1e0..e58e0a7 100644
--- a/TimeHACK.Main/NewGameDialog.Designer.cs
+++ b/TimeHACK.Main/SaveDialogs/NewGameDialog.Designer.cs
@@ -34,6 +34,7 @@
this.btnHelp = new System.Windows.Forms.Button();
this.btnCancl = new System.Windows.Forms.Button();
this.btnInfo = new System.Windows.Forms.Button();
+ this.btnDevMode = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// txtProfName
@@ -92,11 +93,23 @@
this.btnInfo.UseVisualStyleBackColor = true;
this.btnInfo.Click += new System.EventHandler(this.btnInfo_Click);
//
+ // btnDevMode
+ //
+ this.btnDevMode.Location = new System.Drawing.Point(7, 41);
+ this.btnDevMode.Name = "btnDevMode";
+ this.btnDevMode.Size = new System.Drawing.Size(121, 23);
+ this.btnDevMode.TabIndex = 3;
+ this.btnDevMode.Text = "What is DevMode?";
+ this.btnDevMode.UseVisualStyleBackColor = true;
+ this.btnDevMode.Visible = false;
+ this.btnDevMode.Click += new System.EventHandler(this.btnDevMode_Click);
+ //
// NewGameDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(469, 96);
+ this.Controls.Add(this.btnDevMode);
this.Controls.Add(this.btnInfo);
this.Controls.Add(this.btnCancl);
this.Controls.Add(this.btnHelp);
@@ -107,7 +120,9 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "NewGameDialog";
+ this.Tag = "ignoreFormOnTaskbar";
this.Text = "New Game";
+ this.Load += new System.EventHandler(this.NewGameDialog_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -121,5 +136,6 @@
private System.Windows.Forms.Button btnHelp;
private System.Windows.Forms.Button btnCancl;
private System.Windows.Forms.Button btnInfo;
+ private System.Windows.Forms.Button btnDevMode;
}
} \ No newline at end of file
diff --git a/TimeHACK.Main/SaveDialogs/NewGameDialog.cs b/TimeHACK.Main/SaveDialogs/NewGameDialog.cs
new file mode 100644
index 0000000..20895cb
--- /dev/null
+++ b/TimeHACK.Main/SaveDialogs/NewGameDialog.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using TimeHACK.Engine;
+using Newtonsoft.Json;
+using static TimeHACK.Engine.SaveSystem;
+using System.IO;
+
+namespace TimeHACK
+{
+ public partial class NewGameDialog : Form
+ {
+ public Boolean Successful = false;
+ public NewGameDialog()
+ {
+ InitializeComponent();
+ }
+
+ private void btnHelp_Click(object sender, EventArgs e)
+ {
+ MessageBox.Show("You can choose a profile name - this will create a new profile! Whenever you want to Load a game, click 'Load Game' and then choose a profile (You can have as many profiles as you want)");
+ }
+
+ private void btnCancl_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void btnInfo_Click(object sender, EventArgs e)
+ {
+ MessageBox.Show("The game's profiles are stored in your Documents /TimeHACK/Profiles - the rest is for you to figure out!");
+ }
+
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (txtProfName.Text != "")
+ {
+ if (!(txtProfName.Text.Length > 20))
+ {
+ ProfileName = txtProfName.Text;
+ if (DevMode == true)
+ {
+ if (Directory.Exists(ProfileDirectory))
+ {
+ Directory.Delete(ProfileDirectory, true);
+ Successful = true;
+ this.Close();
+ }
+ }
+
+ if (!Directory.Exists(ProfileDirectory))
+ {
+ Successful = true;
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("That profile already exists! \n USEFUL INFO: Use 'Load Game' to manage your profiles - from there you can delete the profile!");
+ }
+ }
+ else
+ {
+ MessageBox.Show("The profile name cannot be longer than 20 characters");
+ }
+
+ }
+ else
+ {
+ MessageBox.Show("You must enter a profile name!");
+ }
+ } catch (Exception ex)
+ {
+
+ }
+ }
+
+ private void NewGameDialog_Load(object sender, EventArgs e)
+ {
+ if (DevMode == true)
+ {
+ btnDevMode.Show();
+ }
+ }
+
+ private void btnDevMode_Click(object sender, EventArgs e)
+ {
+ MessageBox.Show("DevMode is a mode Designed for Development of the game, if you are seeing this that means it is activated! All DevMode does is if a Profile already exists then rather than asking you to choose a different name it just " +
+ "deletes the old one! This means that you won't have 1 million profiles everytime you want to test something in the game!");
+ }
+ }
+}
diff --git a/TimeHACK.Main/SaveDialogs/NewGameDialog.resx b/TimeHACK.Main/SaveDialogs/NewGameDialog.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/TimeHACK.Main/SaveDialogs/NewGameDialog.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj
index 4956405..a8ccbff 100644
--- a/TimeHACK.Main/TimeHACK.Main.csproj
+++ b/TimeHACK.Main/TimeHACK.Main.csproj
@@ -122,10 +122,22 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="NewGameDialog.cs">
+ <Compile Include="SaveDialogs\LoadGameDialog.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="NewGameDialog.Designer.cs">
+ <Compile Include="SaveDialogs\LoadGameDialog.Designer.cs">
+ <DependentUpon>LoadGameDialog.cs</DependentUpon>
+ </Compile>
+ <Compile Include="SaveDialogs\LoadGameProfileItem.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="SaveDialogs\LoadGameProfileItem.Designer.cs">
+ <DependentUpon>LoadGameProfileItem.cs</DependentUpon>
+ </Compile>
+ <Compile Include="SaveDialogs\NewGameDialog.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="SaveDialogs\NewGameDialog.Designer.cs">
<DependentUpon>NewGameDialog.cs</DependentUpon>
</Compile>
<Compile Include="OS\Win95\Win95.cs">
@@ -231,7 +243,13 @@
<Compile Include="TitleScreen.Designer.cs">
<DependentUpon>TitleScreen.cs</DependentUpon>
</Compile>
- <EmbeddedResource Include="NewGameDialog.resx">
+ <EmbeddedResource Include="SaveDialogs\LoadGameDialog.resx">
+ <DependentUpon>LoadGameDialog.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="SaveDialogs\LoadGameProfileItem.resx">
+ <DependentUpon>LoadGameProfileItem.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="SaveDialogs\NewGameDialog.resx">
<DependentUpon>NewGameDialog.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="UI\IProgressBar.cs">
diff --git a/TimeHACK.Main/TitleScreen.Designer.cs b/TimeHACK.Main/TitleScreen.Designer.cs
index 0437c60..6ecbda3 100644
--- a/TimeHACK.Main/TitleScreen.Designer.cs
+++ b/TimeHACK.Main/TitleScreen.Designer.cs
@@ -61,7 +61,7 @@
this.gameversion.Text = "gameversion";
this.gameversion.MouseLeave += new System.EventHandler(this.gameversion_MouseLeave);
this.gameversion.MouseHover += new System.EventHandler(this.gameversion_MouseHover);
- //
+ this.gameversion.Click += new System.EventHandler(this.startbutton_Click);
// vm_mode
//
this.vm_mode.AutoSize = true;
@@ -214,6 +214,7 @@
this.startbutton.Size = new System.Drawing.Size(279, 22);
this.startbutton.TabIndex = 12;
this.startbutton.TabStop = false;
+ this.startbutton.Click += new System.EventHandler(this.startbutton_Click);
//
// TitleScreen
//
diff --git a/TimeHACK.Main/TitleScreen.cs b/TimeHACK.Main/TitleScreen.cs
index c883a95..05fb7cf 100644
--- a/TimeHACK.Main/TitleScreen.cs
+++ b/TimeHACK.Main/TitleScreen.cs
@@ -19,17 +19,19 @@ namespace TimeHACK
public static DirectoryInfo thfolder;
public static DirectoryInfo datafolder;
public static DirectoryInfo profilefolder;
+ public static NewGameDialog newGameBox;
+ public static LoadGameDialog loadGameBox;
public void StartGame()
- {
+ {
//TODO: You may want to handle story stuff to decide what OS to boot here.
if (Convert.ToInt32(VM_Width.Text) == 1337 && Convert.ToInt32(VM_Height.Text) == 1337)
{
leet();
}
else
-// If VM Mode is not enabled
-if (vm_mode.Checked != true)
+ // If VM Mode is not enabled
+ if (vm_mode.Checked != true)
{
// Generate fullscreen desktop
frm95 = new Windows95();
@@ -50,7 +52,6 @@ if (vm_mode.Checked != true)
frm95.Show();
Hide();
}
-
}
@@ -144,8 +145,14 @@ if (vm_mode.Checked != true)
// When NewGame is Clicked
private void NewGame_Click(object sender, EventArgs e)
{
- NewGame();
- StartGame();
+ newGameBox = new NewGameDialog();
+ newGameBox.ShowDialog();
+
+ if (newGameBox.Successful == true)
+ {
+ NewGame();
+ StartGame();
+ }
}
public void BSODRewind(object sender, EventArgs e)
@@ -193,12 +200,19 @@ if (vm_mode.Checked != true)
#region LoadGame
private void LoadGame_Click(object sender, EventArgs e)
{
- var result = LoadSave();
- if(result == false)
+ loadGameBox = new LoadGameDialog();
+ loadGameBox.ShowDialog();
+
+ //var result = LoadSave();
+ //if(result == false)
+ //{
+ // MessageBox.Show(caption: "No save found.", text: "No save was found on your system. However, we have created a new one, and we will start it up for you.");
+ //}
+ if (loadGameBox.successful == true)
{
- MessageBox.Show(caption: "No save found.", text: "No save was found on your system. However, we have created a new one, and we will start it up for you.");
- }
- StartGame();
+ LoadSave();
+ StartGame();
+ }
}
private void LoadGame_Enter(object sender, EventArgs e)
{
@@ -236,5 +250,18 @@ if (vm_mode.Checked != true)
{
gameversion.Text = "TimeHACK " + Program.gameID;
}
+
+ private void startbutton_Click(object sender, EventArgs e)
+ {
+ if (DevMode == true)
+ {
+ DevMode = false;
+ gameversion.Text = "Developer Mode Deactivated";
+ } else {
+ DevMode = true;
+ gameversion.Text = "Developer Mode Activated";
+ }
+
+ }
}
}
diff --git a/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll b/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll
index 86d9598..062eb83 100644
--- a/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll
+++ b/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll
Binary files differ
diff --git a/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb b/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb
index 10716d1..57383ef 100644
--- a/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb
+++ b/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb
Binary files differ
diff --git a/TimeHACK.Main/bin/Release/TimeHACK.application b/TimeHACK.Main/bin/Release/TimeHACK.application
index 0330353..9ade0ab 100644
--- a/TimeHACK.Main/bin/Release/TimeHACK.application
+++ b/TimeHACK.Main/bin/Release/TimeHACK.application
@@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>XMTyg5Kg3uvVV2ZvfkI43b0wiH20oJy+kuosu8ml90M=</dsig:DigestValue>
+ <dsig:DigestValue>ENTn7t1t261AVKr1rjMRpP9Qg3oVkKGXFM3DsueB79g=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/TimeHACK.Main/bin/Release/TimeHACK.exe b/TimeHACK.Main/bin/Release/TimeHACK.exe
index 65f8e05..c570f0c 100644
--- a/TimeHACK.Main/bin/Release/TimeHACK.exe
+++ b/TimeHACK.Main/bin/Release/TimeHACK.exe
Binary files differ
diff --git a/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest b/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest
index 6059ec2..17ebb49 100644
--- a/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest
+++ b/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest
@@ -56,14 +56,14 @@
</dependentAssembly>
</dependency>
<dependency>
- <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="TimeHACK.exe" size="4804608">
+ <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="TimeHACK.exe" size="4812288">
<assemblyIdentity name="TimeHACK" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>u03DD/pHUph61RloaEJSWDxvuKIJlTZGJIAld/bJir8=</dsig:DigestValue>
+ <dsig:DigestValue>aHpmb2rmm80xa4/waiF18Jzl63icUPagQfq/eo+mJ84=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
@@ -75,7 +75,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>4Bmiv+Bv5HnrACFrxYEZWLpxwAHN9AGwSRIgpeHajHM=</dsig:DigestValue>
+ <dsig:DigestValue>EffWUA6LIrqzxasZmwNPhJDRDde+8cUqYyPVn9gesvQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/TimeHACK.Main/bin/Release/TimeHACK.pdb b/TimeHACK.Main/bin/Release/TimeHACK.pdb
index 85b4249..fcd48e7 100644
--- a/TimeHACK.Main/bin/Release/TimeHACK.pdb
+++ b/TimeHACK.Main/bin/Release/TimeHACK.pdb
Binary files differ
diff --git a/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe b/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe
index 65f8e05..c570f0c 100644
--- a/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe
+++ b/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/CoreCompileInputs.cache b/TimeHACK.Main/obj/Release/CoreCompileInputs.cache
index 0769fb6..7c551b4 100644
--- a/TimeHACK.Main/obj/Release/CoreCompileInputs.cache
+++ b/TimeHACK.Main/obj/Release/CoreCompileInputs.cache
@@ -1 +1 @@
-1b9c46aa867d802039fc56e435e48b2dd2dc4952
+55e5267912f35225509997d29deb1d005ac19e4a
diff --git a/TimeHACK.Main/obj/Release/DesignTimeResolveAssemblyReferences.cache b/TimeHACK.Main/obj/Release/DesignTimeResolveAssemblyReferences.cache
index 8ab60bb..3502978 100644
--- a/TimeHACK.Main/obj/Release/DesignTimeResolveAssemblyReferences.cache
+++ b/TimeHACK.Main/obj/Release/DesignTimeResolveAssemblyReferences.cache
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.LoadGameDialog.resources b/TimeHACK.Main/obj/Release/TimeHACK.LoadGameDialog.resources
new file mode 100644
index 0000000..6c05a97
--- /dev/null
+++ b/TimeHACK.Main/obj/Release/TimeHACK.LoadGameDialog.resources
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.LoadGameProfileItem.resources b/TimeHACK.Main/obj/Release/TimeHACK.LoadGameProfileItem.resources
new file mode 100644
index 0000000..6c05a97
--- /dev/null
+++ b/TimeHACK.Main/obj/Release/TimeHACK.LoadGameProfileItem.resources
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.FileListAbsolute.txt b/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.FileListAbsolute.txt
index a0a93a1..2377ecd 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.FileListAbsolute.txt
+++ b/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.FileListAbsolute.txt
@@ -27,3 +27,5 @@ I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Main\obj\Release\TimeHACK.e
I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Main\obj\Release\TimeHACK.application
I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Main\obj\Release\TimeHACK.exe
I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Main\obj\Release\TimeHACK.pdb
+I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Main\obj\Release\TimeHACK.LoadGameDialog.resources
+I:\Desktop\HistamcomVB\My-TimeHACK\TimeHACK\TimeHACK.Main\obj\Release\TimeHACK.LoadGameProfileItem.resources
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.GenerateResource.Cache b/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.GenerateResource.Cache
index 52c2d62..1364508 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.GenerateResource.Cache
+++ b/TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.GenerateResource.Cache
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache b/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache
index 567e21d..f689b80 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache
+++ b/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.WinClassicForms.WinClassicInstaller.resources b/TimeHACK.Main/obj/Release/TimeHACK.WinClassicForms.WinClassicInstaller.resources
index 3dc6527..efaafcd 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.WinClassicForms.WinClassicInstaller.resources
+++ b/TimeHACK.Main/obj/Release/TimeHACK.WinClassicForms.WinClassicInstaller.resources
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.application b/TimeHACK.Main/obj/Release/TimeHACK.application
index 0330353..9ade0ab 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.application
+++ b/TimeHACK.Main/obj/Release/TimeHACK.application
@@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>XMTyg5Kg3uvVV2ZvfkI43b0wiH20oJy+kuosu8ml90M=</dsig:DigestValue>
+ <dsig:DigestValue>ENTn7t1t261AVKr1rjMRpP9Qg3oVkKGXFM3DsueB79g=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.exe b/TimeHACK.Main/obj/Release/TimeHACK.exe
index 65f8e05..c570f0c 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.exe
+++ b/TimeHACK.Main/obj/Release/TimeHACK.exe
Binary files differ
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest b/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest
index 6059ec2..17ebb49 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest
+++ b/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest
@@ -56,14 +56,14 @@
</dependentAssembly>
</dependency>
<dependency>
- <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="TimeHACK.exe" size="4804608">
+ <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="TimeHACK.exe" size="4812288">
<assemblyIdentity name="TimeHACK" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>u03DD/pHUph61RloaEJSWDxvuKIJlTZGJIAld/bJir8=</dsig:DigestValue>
+ <dsig:DigestValue>aHpmb2rmm80xa4/waiF18Jzl63icUPagQfq/eo+mJ84=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
@@ -75,7 +75,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>4Bmiv+Bv5HnrACFrxYEZWLpxwAHN9AGwSRIgpeHajHM=</dsig:DigestValue>
+ <dsig:DigestValue>EffWUA6LIrqzxasZmwNPhJDRDde+8cUqYyPVn9gesvQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/TimeHACK.Main/obj/Release/TimeHACK.pdb b/TimeHACK.Main/obj/Release/TimeHACK.pdb
index 85b4249..fcd48e7 100644
--- a/TimeHACK.Main/obj/Release/TimeHACK.pdb
+++ b/TimeHACK.Main/obj/Release/TimeHACK.pdb
Binary files differ