From 9d2508aa94f24d2c7c16568cc3c0981e41d5922d Mon Sep 17 00:00:00 2001 From: Sander ten Brinke Date: Tue, 4 Apr 2017 21:33:54 +0200 Subject: [PATCH] #16 #10 #6 Started working on menubar, created an about pop-up, started working on save/import/export characters Increased version to 2.1.7.0 in About pop-up and Assembly file so I don't forget to do that the next time I publish something. --- AboutForm.Designer.cs | 151 +++++++++++++++++++++++++++++++++++++ AboutForm.cs | 105 ++++++++++++++++++++++++++ AboutForm.resx | 120 +++++++++++++++++++++++++++++ CombatTracker.csproj | 9 +++ DataSaver.cs | 2 +- OverviewForm.Designer.cs | 110 ++++++++++++++++++++++++--- OverviewForm.cs | 28 +++++++ OverviewForm.resx | 3 + Properties/AssemblyInfo.cs | 6 +- 9 files changed, 520 insertions(+), 14 deletions(-) create mode 100644 AboutForm.Designer.cs create mode 100644 AboutForm.cs create mode 100644 AboutForm.resx diff --git a/AboutForm.Designer.cs b/AboutForm.Designer.cs new file mode 100644 index 0000000..f0b863a --- /dev/null +++ b/AboutForm.Designer.cs @@ -0,0 +1,151 @@ +namespace CombatTracker +{ + partial class AboutForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.labelProductName = new System.Windows.Forms.Label(); + this.labelVersion = new System.Windows.Forms.Label(); + this.labelCopyright = new System.Windows.Forms.Label(); + this.okButton = new System.Windows.Forms.Button(); + this.textBoxDescription = new System.Windows.Forms.TextBox(); + this.tableLayoutPanel.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel + // + this.tableLayoutPanel.ColumnCount = 1; + this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel.Controls.Add(this.labelProductName, 0, 0); + this.tableLayoutPanel.Controls.Add(this.labelVersion, 0, 1); + this.tableLayoutPanel.Controls.Add(this.labelCopyright, 0, 2); + this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 0, 3); + this.tableLayoutPanel.Controls.Add(this.okButton, 0, 4); + this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); + this.tableLayoutPanel.Name = "tableLayoutPanel"; + this.tableLayoutPanel.RowCount = 5; + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 55.55556F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.tableLayoutPanel.Size = new System.Drawing.Size(417, 292); + this.tableLayoutPanel.TabIndex = 0; + // + // labelProductName + // + this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelProductName.Location = new System.Drawing.Point(6, 0); + this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); + this.labelProductName.Name = "labelProductName"; + this.labelProductName.Size = new System.Drawing.Size(0, 17); + this.labelProductName.TabIndex = 19; + this.labelProductName.Text = "Product Name"; + this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelVersion + // + this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelVersion.Location = new System.Drawing.Point(6, 29); + this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); + this.labelVersion.Name = "labelVersion"; + this.labelVersion.Size = new System.Drawing.Size(0, 17); + this.labelVersion.TabIndex = 0; + this.labelVersion.Text = "Version"; + this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelCopyright + // + this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelCopyright.Location = new System.Drawing.Point(6, 58); + this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); + this.labelCopyright.Name = "labelCopyright"; + this.labelCopyright.Size = new System.Drawing.Size(0, 17); + this.labelCopyright.TabIndex = 21; + this.labelCopyright.Text = "Copyright"; + this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.okButton.Location = new System.Drawing.Point(339, 266); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 24; + this.okButton.Text = "&OK"; + // + // textBoxDescription + // + this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBoxDescription.Location = new System.Drawing.Point(6, 119); + this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.textBoxDescription.Multiline = true; + this.textBoxDescription.Name = "textBoxDescription"; + this.textBoxDescription.ReadOnly = true; + this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.textBoxDescription.Size = new System.Drawing.Size(408, 140); + this.textBoxDescription.TabIndex = 23; + this.textBoxDescription.TabStop = false; + this.textBoxDescription.Text = "Description"; + // + // AboutForm + // + this.AcceptButton = this.okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(435, 310); + this.Controls.Add(this.tableLayoutPanel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AboutForm"; + this.Padding = new System.Windows.Forms.Padding(9); + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "AboutForm"; + this.tableLayoutPanel.ResumeLayout(false); + this.tableLayoutPanel.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; + private System.Windows.Forms.Label labelProductName; + private System.Windows.Forms.Label labelVersion; + private System.Windows.Forms.Label labelCopyright; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.TextBox textBoxDescription; + } +} diff --git a/AboutForm.cs b/AboutForm.cs new file mode 100644 index 0000000..06537a9 --- /dev/null +++ b/AboutForm.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CombatTracker +{ + partial class AboutForm : Form + { + public AboutForm() + { + InitializeComponent(); + this.Text = String.Format("About {0}", AssemblyTitle); + this.labelProductName.Text = AssemblyProduct; + this.labelVersion.Text = $"Version {AssemblyVersion}"; + + this.labelCopyright.Text = AssemblyCopyright; + this.textBoxDescription.Text = AssemblyDescription; + } + + #region Assembly Attribute Accessors + + public string AssemblyTitle + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); + if (attributes.Length > 0) + { + AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; + if (titleAttribute.Title != "") + { + return titleAttribute.Title; + } + } + return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); + } + } + + public string AssemblyVersion + { + get + { + return Assembly.GetExecutingAssembly().GetName().Version.ToString(); + } + } + + public string AssemblyDescription + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyDescriptionAttribute)attributes[0]).Description; + } + } + + public string AssemblyProduct + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyProductAttribute)attributes[0]).Product; + } + } + + public string AssemblyCopyright + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + } + + public string AssemblyCompany + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyCompanyAttribute)attributes[0]).Company; + } + } + #endregion + } +} diff --git a/AboutForm.resx b/AboutForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/AboutForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CombatTracker.csproj b/CombatTracker.csproj index a332746..8eb467a 100644 --- a/CombatTracker.csproj +++ b/CombatTracker.csproj @@ -91,6 +91,12 @@ + + Form + + + AboutForm.cs + @@ -102,6 +108,9 @@ + + AboutForm.cs + OverviewForm.cs diff --git a/DataSaver.cs b/DataSaver.cs index 435de26..be93ffa 100644 --- a/DataSaver.cs +++ b/DataSaver.cs @@ -97,7 +97,7 @@ public List ReadFromJsonFile() reader = new StreamReader(FILE_PATH); var fileContents = reader.ReadToEnd(); var deserialized = JsonConvert.DeserializeObject>(fileContents); - return deserialized; + return deserialized; //TODO: Error handling! if file is wrong, tell user file is corrupt. } finally { diff --git a/OverviewForm.Designer.cs b/OverviewForm.Designer.cs index 170c95d..6724185 100644 --- a/OverviewForm.Designer.cs +++ b/OverviewForm.Designer.cs @@ -31,7 +31,6 @@ private void InitializeComponent() this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OverviewForm)); this.SaveButton = new System.Windows.Forms.Button(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.DeleteButton = new System.Windows.Forms.Button(); this.NextButton = new System.Windows.Forms.Button(); this.InitiativeList = new System.Windows.Forms.ListBox(); @@ -107,7 +106,15 @@ private void InitializeComponent() this.NameDetailLabel = new System.Windows.Forms.Label(); this.ReduceHPLabel = new System.Windows.Forms.Label(); this.ReduceHPInput = new System.Windows.Forms.TextBox(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exportCharactersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.charactersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.savedCharactersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aboutDD5eCombatTrackerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.ItemsGroupBox.SuspendLayout(); this.ConditionsListGroupbox.SuspendLayout(); this.DeathSavesListGroupBox.SuspendLayout(); @@ -116,11 +123,13 @@ private void InitializeComponent() this.groupBox2.SuspendLayout(); this.groupBox1.SuspendLayout(); this.ConditionsDetailGroupBox.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); this.SuspendLayout(); // // SaveButton // - this.SaveButton.Location = new System.Drawing.Point(12, 525); + this.SaveButton.Location = new System.Drawing.Point(12, 537); this.SaveButton.Name = "SaveButton"; this.SaveButton.Size = new System.Drawing.Size(75, 43); this.SaveButton.TabIndex = 28; @@ -131,7 +140,7 @@ private void InitializeComponent() // // DeleteButton // - this.DeleteButton.Location = new System.Drawing.Point(105, 525); + this.DeleteButton.Location = new System.Drawing.Point(105, 537); this.DeleteButton.Name = "DeleteButton"; this.DeleteButton.Size = new System.Drawing.Size(75, 43); this.DeleteButton.TabIndex = 29; @@ -168,7 +177,7 @@ private void InitializeComponent() this.ItemsGroupBox.Controls.Add(this.InitiativeList); this.ItemsGroupBox.Controls.Add(this.InfoListGroupBox); this.ItemsGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ItemsGroupBox.Location = new System.Drawing.Point(12, 12); + this.ItemsGroupBox.Location = new System.Drawing.Point(12, 24); this.ItemsGroupBox.Name = "ItemsGroupBox"; this.ItemsGroupBox.Size = new System.Drawing.Size(371, 512); this.ItemsGroupBox.TabIndex = 4; @@ -575,7 +584,7 @@ private void InitializeComponent() this.DetailsGroupBox.Controls.Add(this.InitiativeDetailLabel); this.DetailsGroupBox.Controls.Add(this.NameDetailLabel); this.DetailsGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.DetailsGroupBox.Location = new System.Drawing.Point(389, 12); + this.DetailsGroupBox.Location = new System.Drawing.Point(389, 24); this.DetailsGroupBox.Name = "DetailsGroupBox"; this.DetailsGroupBox.Size = new System.Drawing.Size(393, 512); this.DetailsGroupBox.TabIndex = 5; @@ -926,7 +935,7 @@ private void InitializeComponent() // this.ReduceHPLabel.AutoSize = true; this.ReduceHPLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ReduceHPLabel.Location = new System.Drawing.Point(209, 539); + this.ReduceHPLabel.Location = new System.Drawing.Point(209, 551); this.ReduceHPLabel.Name = "ReduceHPLabel"; this.ReduceHPLabel.Size = new System.Drawing.Size(92, 18); this.ReduceHPLabel.TabIndex = 14; @@ -935,28 +944,98 @@ private void InitializeComponent() // ReduceHPInput // this.ReduceHPInput.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ReduceHPInput.Location = new System.Drawing.Point(307, 538); + this.ReduceHPInput.Location = new System.Drawing.Point(307, 550); this.ReduceHPInput.Name = "ReduceHPInput"; this.ReduceHPInput.Size = new System.Drawing.Size(26, 21); this.ReduceHPInput.TabIndex = 27; // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.charactersToolStripMenuItem, + this.helpToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(794, 24); + this.menuStrip1.TabIndex = 30; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.importToolStripMenuItem, + this.exportCharactersToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // importToolStripMenuItem + // + this.importToolStripMenuItem.Name = "importToolStripMenuItem"; + this.importToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + this.importToolStripMenuItem.Text = "Import Characters"; + this.importToolStripMenuItem.ToolTipText = "Import a .json file filled with categories and characters"; + this.importToolStripMenuItem.Click += new System.EventHandler(this.Import_Click); + // + // exportCharactersToolStripMenuItem + // + this.exportCharactersToolStripMenuItem.Name = "exportCharactersToolStripMenuItem"; + this.exportCharactersToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + this.exportCharactersToolStripMenuItem.Text = "Export Characters"; + this.exportCharactersToolStripMenuItem.ToolTipText = "Export a .json file filled with all your categories and characters"; + this.exportCharactersToolStripMenuItem.Click += new System.EventHandler(this.Export_Click); + // + // charactersToolStripMenuItem + // + this.charactersToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.savedCharactersToolStripMenuItem}); + this.charactersToolStripMenuItem.Name = "charactersToolStripMenuItem"; + this.charactersToolStripMenuItem.Size = new System.Drawing.Size(75, 20); + this.charactersToolStripMenuItem.Text = "Characters"; + // + // savedCharactersToolStripMenuItem + // + this.savedCharactersToolStripMenuItem.Name = "savedCharactersToolStripMenuItem"; + this.savedCharactersToolStripMenuItem.Size = new System.Drawing.Size(164, 22); + this.savedCharactersToolStripMenuItem.Text = "Saved Characters"; + this.savedCharactersToolStripMenuItem.ToolTipText = "Manage your saved characters"; + this.savedCharactersToolStripMenuItem.Click += new System.EventHandler(this.Characters_Click); + // + // helpToolStripMenuItem + // + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.aboutDD5eCombatTrackerToolStripMenuItem}); + this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.helpToolStripMenuItem.Text = "Help"; + // + // aboutDD5eCombatTrackerToolStripMenuItem + // + this.aboutDD5eCombatTrackerToolStripMenuItem.Name = "aboutDD5eCombatTrackerToolStripMenuItem"; + this.aboutDD5eCombatTrackerToolStripMenuItem.ShortcutKeyDisplayString = ""; + this.aboutDD5eCombatTrackerToolStripMenuItem.Size = new System.Drawing.Size(238, 22); + this.aboutDD5eCombatTrackerToolStripMenuItem.Text = "About D&&D 5e Combat Tracker"; + this.aboutDD5eCombatTrackerToolStripMenuItem.Click += new System.EventHandler(this.About_Click); + // // OverviewForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(794, 580); + this.ClientSize = new System.Drawing.Size(794, 588); this.Controls.Add(this.ReduceHPInput); this.Controls.Add(this.ReduceHPLabel); this.Controls.Add(this.DetailsGroupBox); this.Controls.Add(this.ItemsGroupBox); this.Controls.Add(this.DeleteButton); this.Controls.Add(this.SaveButton); + this.Controls.Add(this.menuStrip1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MainMenuStrip = this.menuStrip1; this.MaximizeBox = false; this.Name = "OverviewForm"; this.Text = "D&D 5e Combat Tracker"; - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); this.ItemsGroupBox.ResumeLayout(false); this.ConditionsListGroupbox.ResumeLayout(false); this.ConditionsListGroupbox.PerformLayout(); @@ -971,6 +1050,9 @@ private void InitializeComponent() this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.ConditionsDetailGroupBox.ResumeLayout(false); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1054,5 +1136,13 @@ private void InitializeComponent() private System.Windows.Forms.Label TempHPNextDetailLabel; private System.Windows.Forms.Label NextInitiativePlaceholderLabel; private System.Windows.Forms.Label NextNamePlaceholderLabel; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exportCharactersToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem charactersToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem savedCharactersToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem aboutDD5eCombatTrackerToolStripMenuItem; } } \ No newline at end of file diff --git a/OverviewForm.cs b/OverviewForm.cs index 0c84dfa..dde976a 100644 --- a/OverviewForm.cs +++ b/OverviewForm.cs @@ -621,5 +621,33 @@ private void UpdateNextTab(Character character) short outValue; return short.TryParse(val, out outValue) ? (short?)outValue : null; } + + private void About_Click(object sender, EventArgs e) + { + new AboutForm().Show(); + } + + private void Import_Click(object sender, EventArgs e) + { + //Show import screen, locate .JSON file, add it (Do error handling!). Ask if it should be merged or added as a new file. Merge it with the current list of characters, alphabatacially + //if name of category/character already exists, error! Allow user to edit the name immediatly (with pop up) and resume merging + + //Do the stuff that you noted down + } + + private void Export_Click(object sender, EventArgs e) + { + //Open Windows Explorer to the folder where the .json files are saved? + } + + private void Characters_Click(object sender, EventArgs e) + { + //maybe also offer the option to locate a different .json file and edit that? :) + //Default give the current list of characters on harddisk (DataSaver.GetCharacters() or something) as a parameter + + //Do the stuff that you noted down + + //Remember to check out the D&D monster API, maybe have a list of Default monsters + } } } diff --git a/OverviewForm.resx b/OverviewForm.resx index 58a6461..09b3bfa 100644 --- a/OverviewForm.resx +++ b/OverviewForm.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 154, 17 + 17, 17 diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 2cc3a75..ccf640e 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -6,11 +6,11 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("CombatTracker")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("A D&D 5e Combat Tracker application that you can use to easily manage your combat as DM. Check out the project on Github: https://www.github.com/sander1095/DnDCombatTracker")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CombatTracker")] -[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyCopyright("MIT LICENSE")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -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("2.1.7.0")] [assembly: AssemblyFileVersion("1.0.0.0")]