diff options
| author | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
| commit | 3306d36ecbc024775972e5cf7971b2a7a70671d0 (patch) | |
| tree | 0a79e67b6723a8c75ffd66c7828bdd0ebb1bf74d /Histacom2/SaveDialogs/NewGameDialog.cs | |
| parent | 99fef5c57360f07259fc86f433bed8a9ab59c48e (diff) | |
| download | histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.gz histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.bz2 histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.zip | |
Renaming the game!
Diffstat (limited to 'Histacom2/SaveDialogs/NewGameDialog.cs')
| -rw-r--r-- | Histacom2/SaveDialogs/NewGameDialog.cs | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/Histacom2/SaveDialogs/NewGameDialog.cs b/Histacom2/SaveDialogs/NewGameDialog.cs new file mode 100644 index 0000000..7609d5d --- /dev/null +++ b/Histacom2/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 Histacom2.Engine; +using Newtonsoft.Json; +using static Histacom2.Engine.SaveSystem; +using System.IO; + +namespace Histacom2 +{ + public partial class NewGameDialog : Form + { + public bool 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 AppData /Histacom2/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 + { + + } + } + + 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!"); + } + } +} |
