diff --git a/d20 SRD Spell Lists Tests/bin/Release/AppData/TestCharacter.xml b/d20 SRD Spell Lists Tests/bin/Release/AppData/TestCharacter.xml index 6c9d79b..e874aca 100644 --- a/d20 SRD Spell Lists Tests/bin/Release/AppData/TestCharacter.xml +++ b/d20 SRD Spell Lists Tests/bin/Release/AppData/TestCharacter.xml @@ -1 +1,9 @@ -Dummy Character SpellA short description. \ No newline at end of file + + + + + Dummy Character Spell + A short description. + + + \ No newline at end of file diff --git a/d20 SRD Spell Lists Tests/bin/Release/AppData/UserSpellList.xml b/d20 SRD Spell Lists Tests/bin/Release/AppData/UserSpellList.xml index 8cb2415..033d5aa 100644 --- a/d20 SRD Spell Lists Tests/bin/Release/AppData/UserSpellList.xml +++ b/d20 SRD Spell Lists Tests/bin/Release/AppData/UserSpellList.xml @@ -1 +1,7 @@ -Dummy SpellA short description. \ No newline at end of file + + + + Dummy Spell + A short description. + + \ No newline at end of file diff --git a/d20 SRD Spell Lists Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/d20 SRD Spell Lists Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 0305c4e..4ce4b3c 100644 Binary files a/d20 SRD Spell Lists Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/d20 SRD Spell Lists Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/d20 SRD Spell Lists Tests/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/d20 SRD Spell Lists Tests/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 264477c..6bbff2e 100644 Binary files a/d20 SRD Spell Lists Tests/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/d20 SRD Spell Lists Tests/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/d20 SRD Spell Lists.suo b/d20 SRD Spell Lists.suo index 34ba1c0..a0d8ea8 100644 Binary files a/d20 SRD Spell Lists.suo and b/d20 SRD Spell Lists.suo differ diff --git a/d20 SRD Spell Lists/FrmMain.Designer.cs b/d20 SRD Spell Lists/FrmMain.Designer.cs index ef8712d..0860d83 100644 --- a/d20 SRD Spell Lists/FrmMain.Designer.cs +++ b/d20 SRD Spell Lists/FrmMain.Designer.cs @@ -1,322 +1,324 @@ -namespace d20_SRD_Spell_Lists { - partial class FrmMain { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - 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() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); - this.mainTabControl = new System.Windows.Forms.TabControl(); - this.spellListTab = new System.Windows.Forms.TabPage(); - this.spellsDataGridView = new System.Windows.Forms.DataGridView(); - this.classComboBox = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); - this.characterTab = new System.Windows.Forms.TabPage(); - this.mainToolStrip = new System.Windows.Forms.ToolStrip(); - this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.printToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); - this.cutToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.copyToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.pasteToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.helpToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.prepColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.spellNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.componentColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.descColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.customColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.charCustomColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.mainTabControl.SuspendLayout(); - this.spellListTab.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.spellsDataGridView)).BeginInit(); - this.mainToolStrip.SuspendLayout(); - this.SuspendLayout(); - // - // mainTabControl - // - this.mainTabControl.Controls.Add(this.spellListTab); - this.mainTabControl.Controls.Add(this.characterTab); - this.mainTabControl.Dock = System.Windows.Forms.DockStyle.Bottom; - this.mainTabControl.Location = new System.Drawing.Point(0, 30); - this.mainTabControl.Multiline = true; - this.mainTabControl.Name = "mainTabControl"; - this.mainTabControl.SelectedIndex = 0; - this.mainTabControl.Size = new System.Drawing.Size(571, 375); - this.mainTabControl.TabIndex = 0; - // - // spellListTab - // - this.spellListTab.Controls.Add(this.spellsDataGridView); - this.spellListTab.Controls.Add(this.classComboBox); - this.spellListTab.Controls.Add(this.label1); - this.spellListTab.Location = new System.Drawing.Point(4, 22); - this.spellListTab.Name = "spellListTab"; - this.spellListTab.Padding = new System.Windows.Forms.Padding(3); - this.spellListTab.Size = new System.Drawing.Size(563, 349); - this.spellListTab.TabIndex = 0; - this.spellListTab.Text = "Spell List"; - this.spellListTab.UseVisualStyleBackColor = true; - // - // spellsDataGridView - // - this.spellsDataGridView.AllowUserToOrderColumns = true; - this.spellsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.spellsDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.prepColumn, - this.spellNameColumn, - this.componentColumn, - this.descColumn, - this.customColumn, - this.charCustomColumn}); - this.spellsDataGridView.Dock = System.Windows.Forms.DockStyle.Bottom; - this.spellsDataGridView.Location = new System.Drawing.Point(3, 44); - this.spellsDataGridView.Name = "spellsDataGridView"; - this.spellsDataGridView.Size = new System.Drawing.Size(557, 302); - this.spellsDataGridView.TabIndex = 2; - // - // classComboBox - // - this.classComboBox.FormattingEnabled = true; - this.classComboBox.Location = new System.Drawing.Point(49, 6); - this.classComboBox.Name = "classComboBox"; - this.classComboBox.Size = new System.Drawing.Size(121, 21); - this.classComboBox.TabIndex = 1; - this.classComboBox.Text = "Choose a class:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(6, 9); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(35, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Class:"; - // - // characterTab - // - this.characterTab.Location = new System.Drawing.Point(4, 22); - this.characterTab.Name = "characterTab"; - this.characterTab.Padding = new System.Windows.Forms.Padding(3); - this.characterTab.Size = new System.Drawing.Size(563, 349); - this.characterTab.TabIndex = 1; - this.characterTab.Text = "Character"; - this.characterTab.UseVisualStyleBackColor = true; - // - // mainToolStrip - // - this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newToolStripButton, - this.openToolStripButton, - this.saveToolStripButton, - this.printToolStripButton, - this.toolStripSeparator, - this.cutToolStripButton, - this.copyToolStripButton, - this.pasteToolStripButton, - this.toolStripSeparator1, - this.helpToolStripButton}); - this.mainToolStrip.Location = new System.Drawing.Point(0, 0); - this.mainToolStrip.Name = "mainToolStrip"; - this.mainToolStrip.Size = new System.Drawing.Size(571, 25); - this.mainToolStrip.TabIndex = 1; - // - // newToolStripButton - // - this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image"))); - this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.newToolStripButton.Name = "newToolStripButton"; - this.newToolStripButton.Size = new System.Drawing.Size(23, 22); - this.newToolStripButton.Text = "&New"; - // - // openToolStripButton - // - this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image"))); - this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.openToolStripButton.Name = "openToolStripButton"; - this.openToolStripButton.Size = new System.Drawing.Size(23, 22); - this.openToolStripButton.Text = "&Open"; - // - // saveToolStripButton - // - this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image"))); - this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveToolStripButton.Name = "saveToolStripButton"; - this.saveToolStripButton.Size = new System.Drawing.Size(23, 22); - this.saveToolStripButton.Text = "&Save"; - // - // printToolStripButton - // - this.printToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.printToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripButton.Image"))); - this.printToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.printToolStripButton.Name = "printToolStripButton"; - this.printToolStripButton.Size = new System.Drawing.Size(23, 22); - this.printToolStripButton.Text = "&Print"; - // - // toolStripSeparator - // - this.toolStripSeparator.Name = "toolStripSeparator"; - this.toolStripSeparator.Size = new System.Drawing.Size(6, 25); - // - // cutToolStripButton - // - this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image"))); - this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.cutToolStripButton.Name = "cutToolStripButton"; - this.cutToolStripButton.Size = new System.Drawing.Size(23, 22); - this.cutToolStripButton.Text = "C&ut"; - // - // copyToolStripButton - // - this.copyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image"))); - this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.copyToolStripButton.Name = "copyToolStripButton"; - this.copyToolStripButton.Size = new System.Drawing.Size(23, 22); - this.copyToolStripButton.Text = "&Copy"; - // - // pasteToolStripButton - // - this.pasteToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.pasteToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image"))); - this.pasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.pasteToolStripButton.Name = "pasteToolStripButton"; - this.pasteToolStripButton.Size = new System.Drawing.Size(23, 22); - this.pasteToolStripButton.Text = "&Paste"; - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // helpToolStripButton - // - this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.helpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image"))); - this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.helpToolStripButton.Name = "helpToolStripButton"; - this.helpToolStripButton.Size = new System.Drawing.Size(23, 22); - this.helpToolStripButton.Text = "He&lp"; - // - // prepColumn - // - this.prepColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - this.prepColumn.DataPropertyName = "IsPrepped"; - this.prepColumn.HeaderText = "Prep?"; - this.prepColumn.Name = "prepColumn"; - this.prepColumn.Width = 41; - // - // spellNameColumn - // - this.spellNameColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.spellNameColumn.DataPropertyName = "Name"; - this.spellNameColumn.HeaderText = "Name"; - this.spellNameColumn.Name = "spellNameColumn"; - this.spellNameColumn.Width = 60; - // - // componentColumn - // - this.componentColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.componentColumn.DataPropertyName = "Components"; - this.componentColumn.HeaderText = "Comp"; - this.componentColumn.Name = "componentColumn"; - this.componentColumn.Width = 59; - // - // descColumn - // - this.descColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.descColumn.DataPropertyName = "ShortDescription"; - this.descColumn.HeaderText = "Description"; - this.descColumn.Name = "descColumn"; - // - // customColumn - // - this.customColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - this.customColumn.DataPropertyName = "IsCustom"; - this.customColumn.HeaderText = "A?"; - this.customColumn.Name = "customColumn"; - this.customColumn.ReadOnly = true; - this.customColumn.Width = 26; - // - // charCustomColumn - // - this.charCustomColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - this.charCustomColumn.DataPropertyName = "IsCharCustom"; - this.charCustomColumn.HeaderText = "C"; - this.charCustomColumn.Name = "charCustomColumn"; - this.charCustomColumn.ReadOnly = true; - this.charCustomColumn.Width = 20; - // - // FrmMain - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(571, 405); - this.Controls.Add(this.mainToolStrip); - this.Controls.Add(this.mainTabControl); - this.Name = "FrmMain"; - this.Text = "D&D 3.5 SRD Spell Lists"; - this.mainTabControl.ResumeLayout(false); - this.spellListTab.ResumeLayout(false); - this.spellListTab.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.spellsDataGridView)).EndInit(); - this.mainToolStrip.ResumeLayout(false); - this.mainToolStrip.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TabControl mainTabControl; - private System.Windows.Forms.TabPage spellListTab; - private System.Windows.Forms.TabPage characterTab; - private System.Windows.Forms.ToolStrip mainToolStrip; - private System.Windows.Forms.ToolStripButton newToolStripButton; - private System.Windows.Forms.ToolStripButton openToolStripButton; - private System.Windows.Forms.ToolStripButton saveToolStripButton; - private System.Windows.Forms.ToolStripButton printToolStripButton; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator; - private System.Windows.Forms.ToolStripButton cutToolStripButton; - private System.Windows.Forms.ToolStripButton copyToolStripButton; - private System.Windows.Forms.ToolStripButton pasteToolStripButton; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripButton helpToolStripButton; - private System.Windows.Forms.ComboBox classComboBox; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.DataGridView spellsDataGridView; - private System.Windows.Forms.DataGridViewCheckBoxColumn prepColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn spellNameColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn componentColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn descColumn; - private System.Windows.Forms.DataGridViewCheckBoxColumn customColumn; - private System.Windows.Forms.DataGridViewCheckBoxColumn charCustomColumn; - } -} - +namespace d20_SRD_Spell_Lists { + partial class FrmMain { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + 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() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); + this.mainTabControl = new System.Windows.Forms.TabControl(); + this.spellListTab = new System.Windows.Forms.TabPage(); + this.spellsDataGridView = new System.Windows.Forms.DataGridView(); + this.classComboBox = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.characterTab = new System.Windows.Forms.TabPage(); + this.mainToolStrip = new System.Windows.Forms.ToolStrip(); + this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.printToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.cutToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.copyToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.pasteToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.helpToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.prepColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.spellNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.componentColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.descColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.customColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.charCustomColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.mainTabControl.SuspendLayout(); + this.spellListTab.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.spellsDataGridView)).BeginInit(); + this.mainToolStrip.SuspendLayout(); + this.SuspendLayout(); + // + // mainTabControl + // + this.mainTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.mainTabControl.Controls.Add(this.spellListTab); + this.mainTabControl.Controls.Add(this.characterTab); + this.mainTabControl.Location = new System.Drawing.Point(0, 30); + this.mainTabControl.Multiline = true; + this.mainTabControl.Name = "mainTabControl"; + this.mainTabControl.SelectedIndex = 0; + this.mainTabControl.Size = new System.Drawing.Size(784, 534); + this.mainTabControl.TabIndex = 0; + // + // spellListTab + // + this.spellListTab.Controls.Add(this.spellsDataGridView); + this.spellListTab.Controls.Add(this.classComboBox); + this.spellListTab.Controls.Add(this.label1); + this.spellListTab.Location = new System.Drawing.Point(4, 22); + this.spellListTab.Name = "spellListTab"; + this.spellListTab.Padding = new System.Windows.Forms.Padding(3); + this.spellListTab.Size = new System.Drawing.Size(776, 508); + this.spellListTab.TabIndex = 0; + this.spellListTab.Text = "Spell List"; + this.spellListTab.UseVisualStyleBackColor = true; + // + // spellsDataGridView + // + this.spellsDataGridView.AllowUserToOrderColumns = true; + this.spellsDataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.spellsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.spellsDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.prepColumn, + this.spellNameColumn, + this.componentColumn, + this.descColumn, + this.customColumn, + this.charCustomColumn}); + this.spellsDataGridView.Location = new System.Drawing.Point(3, 44); + this.spellsDataGridView.Name = "spellsDataGridView"; + this.spellsDataGridView.Size = new System.Drawing.Size(770, 461); + this.spellsDataGridView.TabIndex = 2; + // + // classComboBox + // + this.classComboBox.FormattingEnabled = true; + this.classComboBox.Location = new System.Drawing.Point(49, 6); + this.classComboBox.Name = "classComboBox"; + this.classComboBox.Size = new System.Drawing.Size(121, 21); + this.classComboBox.TabIndex = 1; + this.classComboBox.Text = "Choose a class:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(35, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Class:"; + // + // characterTab + // + this.characterTab.Location = new System.Drawing.Point(4, 22); + this.characterTab.Name = "characterTab"; + this.characterTab.Padding = new System.Windows.Forms.Padding(3); + this.characterTab.Size = new System.Drawing.Size(563, 349); + this.characterTab.TabIndex = 1; + this.characterTab.Text = "Character"; + this.characterTab.UseVisualStyleBackColor = true; + // + // mainToolStrip + // + this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripButton, + this.openToolStripButton, + this.saveToolStripButton, + this.printToolStripButton, + this.toolStripSeparator, + this.cutToolStripButton, + this.copyToolStripButton, + this.pasteToolStripButton, + this.toolStripSeparator1, + this.helpToolStripButton}); + this.mainToolStrip.Location = new System.Drawing.Point(0, 0); + this.mainToolStrip.Name = "mainToolStrip"; + this.mainToolStrip.Size = new System.Drawing.Size(784, 25); + this.mainToolStrip.TabIndex = 1; + // + // newToolStripButton + // + this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image"))); + this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.newToolStripButton.Name = "newToolStripButton"; + this.newToolStripButton.Size = new System.Drawing.Size(23, 22); + this.newToolStripButton.Text = "&New"; + // + // openToolStripButton + // + this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image"))); + this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.openToolStripButton.Name = "openToolStripButton"; + this.openToolStripButton.Size = new System.Drawing.Size(23, 22); + this.openToolStripButton.Text = "&Open"; + // + // saveToolStripButton + // + this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image"))); + this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveToolStripButton.Name = "saveToolStripButton"; + this.saveToolStripButton.Size = new System.Drawing.Size(23, 22); + this.saveToolStripButton.Text = "&Save"; + // + // printToolStripButton + // + this.printToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.printToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripButton.Image"))); + this.printToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.printToolStripButton.Name = "printToolStripButton"; + this.printToolStripButton.Size = new System.Drawing.Size(23, 22); + this.printToolStripButton.Text = "&Print"; + // + // toolStripSeparator + // + this.toolStripSeparator.Name = "toolStripSeparator"; + this.toolStripSeparator.Size = new System.Drawing.Size(6, 25); + // + // cutToolStripButton + // + this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image"))); + this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.cutToolStripButton.Name = "cutToolStripButton"; + this.cutToolStripButton.Size = new System.Drawing.Size(23, 22); + this.cutToolStripButton.Text = "C&ut"; + // + // copyToolStripButton + // + this.copyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image"))); + this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.copyToolStripButton.Name = "copyToolStripButton"; + this.copyToolStripButton.Size = new System.Drawing.Size(23, 22); + this.copyToolStripButton.Text = "&Copy"; + // + // pasteToolStripButton + // + this.pasteToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.pasteToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image"))); + this.pasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.pasteToolStripButton.Name = "pasteToolStripButton"; + this.pasteToolStripButton.Size = new System.Drawing.Size(23, 22); + this.pasteToolStripButton.Text = "&Paste"; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // + // helpToolStripButton + // + this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.helpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image"))); + this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.helpToolStripButton.Name = "helpToolStripButton"; + this.helpToolStripButton.Size = new System.Drawing.Size(23, 22); + this.helpToolStripButton.Text = "He&lp"; + // + // prepColumn + // + this.prepColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; + this.prepColumn.DataPropertyName = "IsPrepped"; + this.prepColumn.HeaderText = "Prep?"; + this.prepColumn.Name = "prepColumn"; + this.prepColumn.Width = 41; + // + // spellNameColumn + // + this.spellNameColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.spellNameColumn.DataPropertyName = "Name"; + this.spellNameColumn.HeaderText = "Name"; + this.spellNameColumn.Name = "spellNameColumn"; + this.spellNameColumn.Width = 60; + // + // componentColumn + // + this.componentColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; + this.componentColumn.DataPropertyName = "Components"; + this.componentColumn.HeaderText = "Comp"; + this.componentColumn.Name = "componentColumn"; + this.componentColumn.Width = 59; + // + // descColumn + // + this.descColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.descColumn.DataPropertyName = "ShortDescription"; + this.descColumn.HeaderText = "Description"; + this.descColumn.Name = "descColumn"; + // + // customColumn + // + this.customColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; + this.customColumn.DataPropertyName = "IsCustom"; + this.customColumn.HeaderText = "Custom?"; + this.customColumn.Name = "customColumn"; + this.customColumn.ReadOnly = true; + this.customColumn.Width = 54; + // + // charCustomColumn + // + this.charCustomColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; + this.charCustomColumn.DataPropertyName = "IsCharCustom"; + this.charCustomColumn.HeaderText = "Char?"; + this.charCustomColumn.Name = "charCustomColumn"; + this.charCustomColumn.ReadOnly = true; + this.charCustomColumn.Width = 41; + // + // FrmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(784, 562); + this.Controls.Add(this.mainToolStrip); + this.Controls.Add(this.mainTabControl); + this.Name = "FrmMain"; + this.Text = "D&D 3.5 SRD Spell Lists"; + this.mainTabControl.ResumeLayout(false); + this.spellListTab.ResumeLayout(false); + this.spellListTab.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.spellsDataGridView)).EndInit(); + this.mainToolStrip.ResumeLayout(false); + this.mainToolStrip.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TabControl mainTabControl; + private System.Windows.Forms.TabPage spellListTab; + private System.Windows.Forms.TabPage characterTab; + private System.Windows.Forms.ToolStrip mainToolStrip; + private System.Windows.Forms.ToolStripButton newToolStripButton; + private System.Windows.Forms.ToolStripButton openToolStripButton; + private System.Windows.Forms.ToolStripButton saveToolStripButton; + private System.Windows.Forms.ToolStripButton printToolStripButton; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator; + private System.Windows.Forms.ToolStripButton cutToolStripButton; + private System.Windows.Forms.ToolStripButton copyToolStripButton; + private System.Windows.Forms.ToolStripButton pasteToolStripButton; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton helpToolStripButton; + private System.Windows.Forms.ComboBox classComboBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DataGridView spellsDataGridView; + private System.Windows.Forms.DataGridViewCheckBoxColumn prepColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn spellNameColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn componentColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn descColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn customColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn charCustomColumn; + } +} + diff --git a/d20 SRD Spell Lists/FrmMain.cs b/d20 SRD Spell Lists/FrmMain.cs index 926a9ca..0ceaee0 100644 --- a/d20 SRD Spell Lists/FrmMain.cs +++ b/d20 SRD Spell Lists/FrmMain.cs @@ -1,40 +1,40 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using d20_SRD_Spell_Lists.Models; - -namespace d20_SRD_Spell_Lists { - public partial class FrmMain : Form { - private SpellSet spells; - private Character character; - - public FrmMain() { - InitializeComponent(); - - character = new Character(); - spells = new SpellSet(); - spellsDataGridView.AutoGenerateColumns = false; - - setupClassList(); - } - - private void setupClassList() { - classComboBox.DataSource = Character.ClassNames; - classComboBox.DropDownStyle = ComboBoxStyle.DropDownList; - classComboBox.SelectedIndexChanged += new System.EventHandler(classComboBox_SelectedIndexChanged); - classComboBox_SelectedIndexChanged(classComboBox, new EventArgs()); - } - - private void classComboBox_SelectedIndexChanged(object sender, EventArgs e) { - ComboBox classList = (ComboBox)sender; - - string charClass = classList.SelectedItem.ToString(); - this.spellsDataGridView.DataSource = spells.byClass((Character.SpellCastingClasses)Enum.Parse(typeof(Character.SpellCastingClasses), charClass, true)); - } - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using d20_SRD_Spell_Lists.Models; + +namespace d20_SRD_Spell_Lists { + public partial class FrmMain : Form { + private SpellSet spells; + private Character character; + + public FrmMain() { + InitializeComponent(); + + character = new Character(); + spells = new SpellSet(); + spellsDataGridView.AutoGenerateColumns = false; + + setupClassList(); + } + + private void setupClassList() { + classComboBox.DataSource = Character.ClassNames; + classComboBox.DropDownStyle = ComboBoxStyle.DropDownList; + classComboBox.SelectedIndexChanged += new System.EventHandler(classComboBox_SelectedIndexChanged); + classComboBox_SelectedIndexChanged(classComboBox, new EventArgs()); + } + + private void classComboBox_SelectedIndexChanged(object sender, EventArgs e) { + ComboBox classList = (ComboBox)sender; + + string charClass = classList.SelectedItem.ToString(); + this.spellsDataGridView.DataSource = spells.byClass((Character.SpellCastingClasses)Enum.Parse(typeof(Character.SpellCastingClasses), charClass, true)); + } + } +} diff --git a/d20 SRD Spell Lists/FrmMain.resx b/d20 SRD Spell Lists/FrmMain.resx index 425efed..eb7cf15 100644 --- a/d20 SRD Spell Lists/FrmMain.resx +++ b/d20 SRD Spell Lists/FrmMain.resx @@ -1,263 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - True - - - True - - - True - - - True - - - True - - - True - - - 17, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAQ9JREFUOE+t09lq - wkAUBmBfyr5DfY32jaReSOmFCyKCgkKLFrVUBZeKiEbshqRuaNw1xiXmLxMJBJ0Zc+GBw9zMfDPnHMZm - u1ZE35s4zXCqjmC8Al+sgHLjD9y7yGFWPIbecOO45yORtMAEHnxxJHL1IyKI9JeEXqtMwOl50Q8bSS0l - 8PzBBPbqAQQxICrgjeapgKZpkJUdBmNZB+y3d/QSnsIZKrDdqZjMFYj9OR9wB1NngHrQsJC36EkrfIkT - PuDyJ84AZbOHNF2j1Z2h9i3xAVKfOUjjZssN2oMFmq0xSkLfOmBu3E97iurnENlKxzpgbpzwO0Kh1kOy - KFoDjHmzVuYYjRmTDZfyWh9Yd/4B2Mz2w1z7EGUAAAAASUVORK5CYII= - - - - - iVBORw0KG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- - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAhhJREFUOE+1U09r - E0EU70fIR9iPUBQ8eMrR46IN5JhCDz2oBA8SBHEpCMFgG5GiwdJdq2Ijqe6ldo3Wrmhri0gXazW2YbMt - UdNmm45ulf7R/HwzU1hLIzn54LFvhvn9eW9nOjr+R0wvBLhTXEf6bgV9w0sYLJQx/uoz2mq9c7eRn2pA - L67Bq+/i29YeWLBL9Q6u5ktI6w6Kr1dbE3HwA3sT/o8mbAfQRgE1LZPXtsPgbjZxaXAG4y/Kh0m48sbP - JgwbiKYAwwLYNkR4DEje5HsMFSI5l3l2kGD6/RYezzeEMgfzwzzMWSCRlV9OFk0xqhl06wNy+Tchyb2n - dXxhv4TVaFLazppAJ9VKL0MySxYoVI0hkXaw5AbovjAWEmTur4qBqZoEdfbKVCgTBObqdolBUW0ocRs1 - P8Cx2PWQ4PJtl6a9J+xLIB1OMHIilU2b1gSMqCZ9TdTq33FEHQgJcg8rWPF3qHcJVOKeyOyoJIioDqUk - UFM2SuUqus4YIcHEzFdYji8GxIGROAc41JJHc6E1B58wRRqWhzFrEVduTR78E5mRBSz7v0l1H0AgXgsH - +2DNcPBp3cep0/rhezA5V0Vfbg5ug+4CqaiaI/rmyWu+t1zdQIysDxdmW9/GiZcVnO+fgvHkI+YXV7BG - 067VA9Ezt91Fyvq/wH8/lKHCW/RcfITj8Rs4evIaYmdHkBl63v4xtX1tLQ78AZ3a8qxOv4hDAAAAAElF - TkSuQmCC - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + True + + + True + + + True + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEPSURBVDhPrdPZasJAFAZgX8q+Q32N9o2kXkjphQsigoJC + ixa1VAWXiohG7IakbmjcNcYl5i8TCQSdGXPhgcPczHwz5xzGZrtWRN+bOM1wqo5gvAJfrIBy4w/cu8hh + VjyG3nDjuOcjkbTABB58cSRy9SMiiPSXhF6rTMDpedEPG0ktJfD8wQT26gEEMSAq4I3mqYCmaZCVHQZj + WQfst3f0Ep7CGSqw3amYzBWI/TkfcAdTZ4B60LCQt+hJK3yJEz7g8ifOAGWzhzRdo9WdofYt8QFSnzlI + 42bLDdqDBZqtMUpC3zpgbtxPe4rq5xDZSsc6YG6c8DtCodZDsihaA4x5s1bmGI0Zkw2X8lofWHf+AdjM + 9sNc+xBlAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJQSURBVDhPlZNdSNNRGMb/F110ZZEVhVBgeeHNICiiuggp + olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdPKMgr7kApFItTUkWZqVhSVYmao5Nev/xyoQ4k88Nyc + 8z6/93nP4QjCfy6lwc4ltZVso4P/tMyXRcmMHqZ0EeY6jZQVInzuf0e1Tb9Ina3P/tkpLD6XkNg8BJe5 + u93C+HDVrP4M2ZkcMOOw5tLZ9nxJyJE4HSExBoKkBQhVpTrGhso9zNPfiph0JlB+U01ZcRbmwnRMeWlc + 08opUCV6QissGsZ+WOY6z4hmuuXglC6pRYBbJSp+fzXNxnaZ66o1s3r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SBkTgH + ONSSR3OhNQefMEUalocxaxFXbk0e/BOZkQUs+79JdR9AIF4LB/tgzXDwad3HqdP64XswOVdFX24OboPu + AqmomiP65slrvrdc3UCMrA8XZlvfxomXFZzvn4Lx5CPmF1ewRtOu1QPRM7fdRcr6v8B/P5Shwlv0XHyE + 4/EbOHryGmJnR5AZet7+MbV9bS0O/AGd2vKsTr+IQwAAAABJRU5ErkJggg== + + \ No newline at end of file diff --git a/d20 SRD Spell Lists/Models/Spell.cs b/d20 SRD Spell Lists/Models/Spell.cs index 8a42c47..1b7772e 100644 --- a/d20 SRD Spell Lists/Models/Spell.cs +++ b/d20 SRD Spell Lists/Models/Spell.cs @@ -1,27 +1,27 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace d20_SRD_Spell_Lists.Models { - public class Spell { - public bool IsPrepped { get; set; } - public string Name { get; set; } - public int Level { get; set; } - public string Component { get; set; } - public string ShortDescription { get; set; } - public bool IsCustom { get; set; } - public bool IsCharCustom { get; set; } - - } - - public class SpellComparer : IEqualityComparer { - public bool Equals(Spell x, Spell y) { - return x.Name == y.Name; - } - - public int GetHashCode(Spell obj) { - return obj.Name.GetHashCode(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace d20_SRD_Spell_Lists.Models { + public class Spell { + public bool IsPrepped { get; set; } + public string Name { get; set; } + public int Level { get; set; } + public string Components { get; set; } + public string ShortDescription { get; set; } + public bool IsCustom { get; set; } + public bool IsCharCustom { get; set; } + + } + + public class SpellComparer : IEqualityComparer { + public bool Equals(Spell x, Spell y) { + return x.Name == y.Name; + } + + public int GetHashCode(Spell obj) { + return obj.Name.GetHashCode(); + } + } +} diff --git a/d20 SRD Spell Lists/Models/SpellSet.cs b/d20 SRD Spell Lists/Models/SpellSet.cs index 83bd8d5..17a0617 100644 --- a/d20 SRD Spell Lists/Models/SpellSet.cs +++ b/d20 SRD Spell Lists/Models/SpellSet.cs @@ -1,240 +1,240 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml; -using System.Xml.Linq; -using d20_SRD_Spell_Lists.Exceptions; -using System.Text.RegularExpressions; - -namespace d20_SRD_Spell_Lists.Models { - public class SpellSet { - private XElement masterSpellList; - private XElement userSpellList; - private XElement charSpellList; - private string userXmlFile; - private Character character; - - public SpellSet(string _masterXmlFile = null, string _userXmlFile = null, Character _character = null) { - userXmlFile = _userXmlFile; - character = _character; - loadXML(ref _masterXmlFile); - } - - private void loadXML(ref string _masterXmlFile) { - // Load the XML file. - if (_masterXmlFile == null) { - _masterXmlFile = Properties.Settings.Default.MasterSpells; - } - if (userXmlFile == null) { - userXmlFile = Properties.Settings.Default.UserSpells; - } - masterSpellList = XElement.Load(_masterXmlFile); - userSpellList = XElement.Load(userXmlFile); - - if (character != null) { - charSpellList = character.spells(); - } - } - - /// - /// Adds a spell to the application's list of custom spells. - /// - /// The XML details of the new spell. - public void addUserSpell(XElement xElement) { - userSpellList.Add(xElement); - } - - public IEnumerable byClass(Character.SpellCastingClasses spellCastingClass) { - List spells = new List(); - - filterMasterSpellsByClass(spellCastingClass, spells); - filterUserSpellsByClass(spellCastingClass, spells); - filterCharacterSpellsByClass(spellCastingClass, spells); - - removeHiddenSpells(spells); - - return spells; - } - - private void filterMasterSpellsByClass(Character.SpellCastingClasses spellCastingClass, List spells) { - spells.AddRange(querySpellsByClass(masterSpellList, spellCastingClass, false, false).ToList()); - } - - private void filterCharacterSpellsByClass(Character.SpellCastingClasses spellCastingClass, List spells) { - if (characterSpellCount() > 0) { - spells.AddRange(querySpellsByClass(charSpellList, spellCastingClass, false, true)); - } - } - - private void filterUserSpellsByClass(Character.SpellCastingClasses spellCastingClass, List spells) { - if (userSpellCount() > 0) { - spells.AddRange(querySpellsByClass(userSpellList, spellCastingClass, true, false).ToList()); - } - } - - private void removeHiddenSpells(List spells) { - if (hiddenSpellCount() > 0) { - foreach (string hiddenSpellName in (from hp in userSpellList.Elements("hidden_spell").Elements("spell") - select (string)hp.Element("name"))) { - spells.RemoveAll(sp => sp.Name == hiddenSpellName); - } - } - - if (hiddenCharacterSpellCount() > 0) { - foreach (string hiddenSpellName in (from hp in charSpellList.Elements("hidden_spell").Elements("spell") - select (string)hp.Element("name"))) { - spells.RemoveAll(sp => sp.Name == hiddenSpellName); - } - } - } - - public IEnumerable byClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level) { - List spells = new List(); - - filterMasterSpellsByClassAndLevel(spellCastingClass, level, spells); - filterUserSpellsByClassAndLevel(spellCastingClass, level, spells); - filterCharacterSpellsByClassAndLevel(spellCastingClass, level, spells); - - removeHiddenSpells(spells); - - return spells; - } - - private void filterCharacterSpellsByClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level, List spells) { - if (characterSpellCount() > 0) { - spells.AddRange(querySpellsByClassAndLevel(charSpellList, spellCastingClass, level, false, true)); - } - } - - private void filterUserSpellsByClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level, List spells) { - if (userSpellCount() > 0) { - spells.AddRange(querySpellsByClassAndLevel(userSpellList, spellCastingClass, level, true, false).ToList()); - } - } - - private IEnumerable querySpellsByClassAndLevel(XElement list, Character.SpellCastingClasses spellCastingClass, int level, bool isCustom, bool isCharCustom) { - string c = Character.getClassName(spellCastingClass); - Regex levelReg = new Regex(@" (\d+)?"); - return (from sp in list.Elements("spell") - let xmlLevel = (string)sp.Element("level") - let xmlComp = (string)sp.Element("components") - let xmlDesc = (string)sp.Element("short_description") - where xmlLevel != null && xmlLevel.Contains(c + " " + level.ToString()) - orderby levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value - select new Spell { - IsPrepped = false, - Name = sp.Element("name").Value, - Level = int.Parse(levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value), - Component = (xmlComp != null ? xmlComp : ""), - ShortDescription = (xmlDesc != null ? xmlDesc : ""), - IsCustom = isCustom, - IsCharCustom = isCharCustom - }); - } - - private IEnumerable querySpellsByClass(XElement list, Character.SpellCastingClasses spellCastingClass, bool isCustom, bool isCharCustom) { - string c = Character.getClassName(spellCastingClass); - Regex levelReg = new Regex(@" (\d+),?"); - return (from sp in list.Elements("spell") - let xmlLevel = (string)sp.Element("level") - let xmlComp = (string)sp.Element("components") - let xmlDesc = (string)sp.Element("short_description") - where xmlLevel != null && xmlLevel.Contains(c) - orderby levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value - select new Spell { - IsPrepped = false, - Name = sp.Element("name").Value, - Level = int.Parse(levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value), - Component = (xmlComp != null ? xmlComp : ""), - ShortDescription = (xmlDesc != null ? xmlDesc : ""), - IsCustom = isCustom, - IsCharCustom = isCharCustom - }); - } - - private void filterMasterSpellsByClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level, List spells) { - spells.AddRange(querySpellsByClassAndLevel(masterSpellList, spellCastingClass, level, false, false).ToList()); - } - - /// - /// Saves all XML files to the system. - /// - public void save() { - userSpellList.Save(userXmlFile); - if (character != null) { - character.save(); - } - } - - /// - /// Remove a node from the application's custom spell list. - /// - /// The name of the node to be searched on. Could be "name", "school", etc. - /// The value of the node matching the nodeName. - public void removeUserSpell(string nodeName, string nodeValue) { - (from sp in userSpellList.Elements("spell") - where (string)sp.Element(nodeName) == nodeValue - select sp).Remove(); - } - - public void hideMasterSpell(string nodeName, string nodeValue) { - userSpellList.Add(new XElement("hidden_spell", (from msp in masterSpellList.Elements("spell") - where (string)msp.Element(nodeName) == nodeValue - select msp))); - } - - public void hideMasterSpellForCharacter(string nodeName, string nodeValue) { - charSpellList.Add(new XElement("hidden_spell", (from msp in masterSpellList.Elements("spell") - where (string)msp.Element(nodeName) == nodeValue - select msp))); - } - - public void showMasterSpell(string nodeName, string nodeValue) { - (from hsp in userSpellList.Elements("hidden_spell") - where (string)hsp.Element("spell").Element(nodeName) == nodeValue - select hsp).Remove(); - } - - public void showMasterSpellForCharacter(string nodeName, string nodeValue) { - (from hsp in charSpellList.Elements("hidden_spell") - where (string)hsp.Element("spell").Element(nodeName) == nodeValue - select hsp).Remove(); - } - - public int hiddenSpellCount() { - return userSpellList.Descendants("hidden_spell").Count(); - } - - public int hiddenCharacterSpellCount() { - if (charSpellList != null) { - return charSpellList.Descendants("hidden_spell").Count(); - } - return 0; - } - - public int totalCount() { - int total = masterSpellList.Elements("spell").Count() + userSpellList.Elements("spell").Count(); - if (charSpellList != null) { - total += charSpellList.Elements("spell").Count(); - } - return total; - } - - public int masterSpellCount() { - return masterSpellList.Elements("spell").Count(); - } - - public int userSpellCount() { - return userSpellList.Elements("spell").Count(); - } - - public int characterSpellCount() { - if (character != null) { - return character.spells().Elements("spell").Count(); - } - - return 0; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml; +using System.Xml.Linq; +using d20_SRD_Spell_Lists.Exceptions; +using System.Text.RegularExpressions; + +namespace d20_SRD_Spell_Lists.Models { + public class SpellSet { + private XElement masterSpellList; + private XElement userSpellList; + private XElement charSpellList; + private string userXmlFile; + private Character character; + + public SpellSet(string _masterXmlFile = null, string _userXmlFile = null, Character _character = null) { + userXmlFile = _userXmlFile; + character = _character; + loadXML(ref _masterXmlFile); + } + + private void loadXML(ref string _masterXmlFile) { + // Load the XML file. + if (_masterXmlFile == null) { + _masterXmlFile = Properties.Settings.Default.MasterSpells; + } + if (userXmlFile == null) { + userXmlFile = Properties.Settings.Default.UserSpells; + } + masterSpellList = XElement.Load(_masterXmlFile); + userSpellList = XElement.Load(userXmlFile); + + if (character != null) { + charSpellList = character.spells(); + } + } + + /// + /// Adds a spell to the application's list of custom spells. + /// + /// The XML details of the new spell. + public void addUserSpell(XElement xElement) { + userSpellList.Add(xElement); + } + + public IEnumerable byClass(Character.SpellCastingClasses spellCastingClass) { + List spells = new List(); + + filterMasterSpellsByClass(spellCastingClass, spells); + filterUserSpellsByClass(spellCastingClass, spells); + filterCharacterSpellsByClass(spellCastingClass, spells); + + removeHiddenSpells(spells); + + return spells; + } + + private void filterMasterSpellsByClass(Character.SpellCastingClasses spellCastingClass, List spells) { + spells.AddRange(querySpellsByClass(masterSpellList, spellCastingClass, false, false).ToList()); + } + + private void filterCharacterSpellsByClass(Character.SpellCastingClasses spellCastingClass, List spells) { + if (characterSpellCount() > 0) { + spells.AddRange(querySpellsByClass(charSpellList, spellCastingClass, false, true)); + } + } + + private void filterUserSpellsByClass(Character.SpellCastingClasses spellCastingClass, List spells) { + if (userSpellCount() > 0) { + spells.AddRange(querySpellsByClass(userSpellList, spellCastingClass, true, false).ToList()); + } + } + + private void removeHiddenSpells(List spells) { + if (hiddenSpellCount() > 0) { + foreach (string hiddenSpellName in (from hp in userSpellList.Elements("hidden_spell").Elements("spell") + select (string)hp.Element("name"))) { + spells.RemoveAll(sp => sp.Name == hiddenSpellName); + } + } + + if (hiddenCharacterSpellCount() > 0) { + foreach (string hiddenSpellName in (from hp in charSpellList.Elements("hidden_spell").Elements("spell") + select (string)hp.Element("name"))) { + spells.RemoveAll(sp => sp.Name == hiddenSpellName); + } + } + } + + public IEnumerable byClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level) { + List spells = new List(); + + filterMasterSpellsByClassAndLevel(spellCastingClass, level, spells); + filterUserSpellsByClassAndLevel(spellCastingClass, level, spells); + filterCharacterSpellsByClassAndLevel(spellCastingClass, level, spells); + + removeHiddenSpells(spells); + + return spells; + } + + private void filterCharacterSpellsByClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level, List spells) { + if (characterSpellCount() > 0) { + spells.AddRange(querySpellsByClassAndLevel(charSpellList, spellCastingClass, level, false, true)); + } + } + + private void filterUserSpellsByClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level, List spells) { + if (userSpellCount() > 0) { + spells.AddRange(querySpellsByClassAndLevel(userSpellList, spellCastingClass, level, true, false).ToList()); + } + } + + private IEnumerable querySpellsByClassAndLevel(XElement list, Character.SpellCastingClasses spellCastingClass, int level, bool isCustom, bool isCharCustom) { + string c = Character.getClassName(spellCastingClass); + Regex levelReg = new Regex(@" (\d+)?"); + return (from sp in list.Elements("spell") + let xmlLevel = (string)sp.Element("level") + let xmlComp = (string)sp.Element("components") + let xmlDesc = (string)sp.Element("short_description") + where xmlLevel != null && xmlLevel.Contains(c + " " + level.ToString()) + orderby levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value + select new Spell { + IsPrepped = false, + Name = sp.Element("name").Value, + Level = int.Parse(levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value), + Components = (xmlComp != null ? xmlComp : ""), + ShortDescription = (xmlDesc != null ? xmlDesc : ""), + IsCustom = isCustom, + IsCharCustom = isCharCustom + }); + } + + private IEnumerable querySpellsByClass(XElement list, Character.SpellCastingClasses spellCastingClass, bool isCustom, bool isCharCustom) { + string c = Character.getClassName(spellCastingClass); + Regex levelReg = new Regex(@" (\d+),?"); + return (from sp in list.Elements("spell") + let xmlLevel = (string)sp.Element("level") + let xmlComp = (string)sp.Element("components") + let xmlDesc = (string)sp.Element("short_description") + where xmlLevel != null && xmlLevel.Contains(c) + orderby levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value + select new Spell { + IsPrepped = false, + Name = sp.Element("name").Value, + Level = int.Parse(levelReg.Match(xmlLevel, xmlLevel.IndexOf(c)).Groups[1].Value), + Components = (xmlComp != null ? xmlComp : ""), + ShortDescription = (xmlDesc != null ? xmlDesc : ""), + IsCustom = isCustom, + IsCharCustom = isCharCustom + }); + } + + private void filterMasterSpellsByClassAndLevel(Character.SpellCastingClasses spellCastingClass, int level, List spells) { + spells.AddRange(querySpellsByClassAndLevel(masterSpellList, spellCastingClass, level, false, false).ToList()); + } + + /// + /// Saves all XML files to the system. + /// + public void save() { + userSpellList.Save(userXmlFile); + if (character != null) { + character.save(); + } + } + + /// + /// Remove a node from the application's custom spell list. + /// + /// The name of the node to be searched on. Could be "name", "school", etc. + /// The value of the node matching the nodeName. + public void removeUserSpell(string nodeName, string nodeValue) { + (from sp in userSpellList.Elements("spell") + where (string)sp.Element(nodeName) == nodeValue + select sp).Remove(); + } + + public void hideMasterSpell(string nodeName, string nodeValue) { + userSpellList.Add(new XElement("hidden_spell", (from msp in masterSpellList.Elements("spell") + where (string)msp.Element(nodeName) == nodeValue + select msp))); + } + + public void hideMasterSpellForCharacter(string nodeName, string nodeValue) { + charSpellList.Add(new XElement("hidden_spell", (from msp in masterSpellList.Elements("spell") + where (string)msp.Element(nodeName) == nodeValue + select msp))); + } + + public void showMasterSpell(string nodeName, string nodeValue) { + (from hsp in userSpellList.Elements("hidden_spell") + where (string)hsp.Element("spell").Element(nodeName) == nodeValue + select hsp).Remove(); + } + + public void showMasterSpellForCharacter(string nodeName, string nodeValue) { + (from hsp in charSpellList.Elements("hidden_spell") + where (string)hsp.Element("spell").Element(nodeName) == nodeValue + select hsp).Remove(); + } + + public int hiddenSpellCount() { + return userSpellList.Descendants("hidden_spell").Count(); + } + + public int hiddenCharacterSpellCount() { + if (charSpellList != null) { + return charSpellList.Descendants("hidden_spell").Count(); + } + return 0; + } + + public int totalCount() { + int total = masterSpellList.Elements("spell").Count() + userSpellList.Elements("spell").Count(); + if (charSpellList != null) { + total += charSpellList.Elements("spell").Count(); + } + return total; + } + + public int masterSpellCount() { + return masterSpellList.Elements("spell").Count(); + } + + public int userSpellCount() { + return userSpellList.Elements("spell").Count(); + } + + public int characterSpellCount() { + if (character != null) { + return character.spells().Elements("spell").Count(); + } + + return 0; + } + } +} diff --git a/d20 SRD Spell Lists/bin/Debug/d20 SRD Spell Lists.vshost.exe.manifest b/d20 SRD Spell Lists/bin/Debug/d20 SRD Spell Lists.vshost.exe.manifest deleted file mode 100644 index 061c9ca..0000000 --- a/d20 SRD Spell Lists/bin/Debug/d20 SRD Spell Lists.vshost.exe.manifest +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/d20 SRD Spell Lists/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/d20 SRD Spell Lists/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index a1abad1..4bd0ab6 100644 Binary files a/d20 SRD Spell Lists/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/d20 SRD Spell Lists/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferences.cache b/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferences.cache index 255ee4b..bdf753a 100644 Binary files a/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferences.cache and b/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache b/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache index c121792..181f05d 100644 Binary files a/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/d20 SRD Spell Lists/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/d20 SRD Spell Lists/obj/x86/Release/d20SRDSpellLists.csproj.FileListAbsolute.txt b/d20 SRD Spell Lists/obj/x86/Release/d20SRDSpellLists.csproj.FileListAbsolute.txt index 1616577..ead582a 100644 --- a/d20 SRD Spell Lists/obj/x86/Release/d20SRDSpellLists.csproj.FileListAbsolute.txt +++ b/d20 SRD Spell Lists/obj/x86/Release/d20SRDSpellLists.csproj.FileListAbsolute.txt @@ -1,13 +1,13 @@ -F:\spelllists\d20 SRD Spell Lists\bin\Release\d20 SRD Spell Lists.exe -F:\spelllists\d20 SRD Spell Lists\bin\Release\d20 SRD Spell Lists.pdb -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\ResolveAssemblyReference.cache -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20_SRD_Spell_Lists.Properties.Resources.resources -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\GenerateResource.read.1.tlog -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\GenerateResource.write.1.tlog -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20 SRD Spell Lists.exe -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20 SRD Spell Lists.pdb -F:\spelllists\d20 SRD Spell Lists\bin\Release\d20 SRD Spell Lists.exe.config -F:\spelllists\d20 SRD Spell Lists\bin\Release\AppData\MasterSpellList.xml -F:\spelllists\d20 SRD Spell Lists\bin\Release\AppData\UserSpellList.xml -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20_SRD_Spell_Lists.FrmCredits.resources -F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20_SRD_Spell_Lists.FrmMain.resources +F:\spelllists\d20 SRD Spell Lists\bin\Release\d20 SRD Spell Lists.exe +F:\spelllists\d20 SRD Spell Lists\bin\Release\d20 SRD Spell Lists.pdb +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\ResolveAssemblyReference.cache +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20_SRD_Spell_Lists.Properties.Resources.resources +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\GenerateResource.read.1.tlog +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\GenerateResource.write.1.tlog +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20 SRD Spell Lists.exe +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20 SRD Spell Lists.pdb +F:\spelllists\d20 SRD Spell Lists\bin\Release\d20 SRD Spell Lists.exe.config +F:\spelllists\d20 SRD Spell Lists\bin\Release\AppData\MasterSpellList.xml +F:\spelllists\d20 SRD Spell Lists\bin\Release\AppData\UserSpellList.xml +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20_SRD_Spell_Lists.FrmCredits.resources +F:\spelllists\d20 SRD Spell Lists\obj\x86\Release\d20_SRD_Spell_Lists.FrmMain.resources