Can edit and delete spells.

Signed-off-by: Melissa Avery-Weir <melissa.avery@wellsfargo.com>
This commit is contained in:
Melissa Avery-Weir
2011-09-22 14:17:36 -04:00
parent 0c3c021a85
commit afdd8d0b17
14 changed files with 237 additions and 146 deletions

View File

@@ -24,6 +24,7 @@ namespace d20_SRD_Spell_Lists {
if (_spell != null) { if (_spell != null) {
spell = _spell; spell = _spell;
loadSpell();
} else { } else {
spell = new Spell(); spell = new Spell();
} }
@@ -32,6 +33,13 @@ namespace d20_SRD_Spell_Lists {
txtName.LostFocus += new EventHandler(txtName_LostFocus); txtName.LostFocus += new EventHandler(txtName_LostFocus);
} }
private void loadSpell() {
txtName.Text = spell.Name;
txtLevel.Value = spell.Level;
txtComponents.Text = spell.Components;
txtDescription.Text = spell.ShortDescription;
}
void txtName_LostFocus(object sender, EventArgs e) { void txtName_LostFocus(object sender, EventArgs e) {
if (txtName.Text != "") { if (txtName.Text != "") {
baseSpellComboBox.SelectedValue = "--"; baseSpellComboBox.SelectedValue = "--";

View File

@@ -24,6 +24,7 @@
/// </summary> /// </summary>
private void InitializeComponent() { private void InitializeComponent() {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lblExtra9 = new System.Windows.Forms.Label(); this.lblExtra9 = new System.Windows.Forms.Label();
@@ -70,26 +71,28 @@
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.lblDirections = new System.Windows.Forms.Label(); this.lblDirections = new System.Windows.Forms.Label();
this.mainToolStrip = new System.Windows.Forms.ToolStrip(); this.mainToolStrip = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.spellsDataGridView = new System.Windows.Forms.DataGridView();
this.btnAdd = new System.Windows.Forms.Button();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); this.openToolStripButton = new System.Windows.Forms.ToolStripButton();
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
this.printToolStripButton = 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.cutToolStripButton = new System.Windows.Forms.ToolStripButton();
this.copyToolStripButton = new System.Windows.Forms.ToolStripButton(); this.copyToolStripButton = new System.Windows.Forms.ToolStripButton();
this.pasteToolStripButton = 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.helpToolStripButton = new System.Windows.Forms.ToolStripButton();
this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.spellsDataGridView = new System.Windows.Forms.DataGridView();
this.prepColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.prepColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.levelColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.levelColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.spellNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.spellNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.componentColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.componentColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.descColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.descColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.editColumn = new System.Windows.Forms.DataGridViewButtonColumn(); this.editColumn = new System.Windows.Forms.DataGridViewImageColumn();
this.deleteColumn = new System.Windows.Forms.DataGridViewButtonColumn(); this.deleteColumn = new System.Windows.Forms.DataGridViewImageColumn();
this.btnAdd = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.mainToolStrip.SuspendLayout(); this.mainToolStrip.SuspendLayout();
@@ -601,6 +604,69 @@
this.mainToolStrip.Size = new System.Drawing.Size(784, 25); this.mainToolStrip.Size = new System.Drawing.Size(784, 25);
this.mainToolStrip.TabIndex = 1; this.mainToolStrip.TabIndex = 1;
// //
// toolStripSeparator
//
this.toolStripSeparator.Name = "toolStripSeparator";
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// errorProvider
//
this.errorProvider.ContainerControl = this;
//
// spellsDataGridView
//
this.spellsDataGridView.AllowUserToAddRows = false;
this.spellsDataGridView.AllowUserToDeleteRows = false;
this.spellsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.spellsDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.prepColumn,
this.levelColumn,
this.spellNameColumn,
this.componentColumn,
this.descColumn,
this.editColumn,
this.deleteColumn});
this.spellsDataGridView.Dock = System.Windows.Forms.DockStyle.Bottom;
this.spellsDataGridView.Location = new System.Drawing.Point(0, 194);
this.spellsDataGridView.Name = "spellsDataGridView";
this.spellsDataGridView.ReadOnly = true;
this.spellsDataGridView.Size = new System.Drawing.Size(784, 368);
this.spellsDataGridView.TabIndex = 24;
this.spellsDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.spellsDataGridView_CellContentClick);
//
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(697, 165);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(75, 23);
this.btnAdd.TabIndex = 25;
this.btnAdd.Text = "Add Spell";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// dataGridViewImageColumn1
//
this.dataGridViewImageColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.dataGridViewImageColumn1.HeaderText = "";
this.dataGridViewImageColumn1.Image = global::d20_SRD_Spell_Lists.Properties.Resources.edit_16;
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
this.dataGridViewImageColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewImageColumn1.Width = 5;
//
// dataGridViewImageColumn2
//
this.dataGridViewImageColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.dataGridViewImageColumn2.HeaderText = "";
this.dataGridViewImageColumn2.Image = global::d20_SRD_Spell_Lists.Properties.Resources.editdelete_16;
this.dataGridViewImageColumn2.Name = "dataGridViewImageColumn2";
this.dataGridViewImageColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewImageColumn2.Width = 5;
//
// newToolStripButton // newToolStripButton
// //
this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@@ -639,11 +705,6 @@
this.printToolStripButton.Size = new System.Drawing.Size(23, 22); this.printToolStripButton.Size = new System.Drawing.Size(23, 22);
this.printToolStripButton.Text = "&Print"; this.printToolStripButton.Text = "&Print";
// //
// toolStripSeparator
//
this.toolStripSeparator.Name = "toolStripSeparator";
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
//
// cutToolStripButton // cutToolStripButton
// //
this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@@ -671,11 +732,6 @@
this.pasteToolStripButton.Size = new System.Drawing.Size(23, 22); this.pasteToolStripButton.Size = new System.Drawing.Size(23, 22);
this.pasteToolStripButton.Text = "&Paste"; this.pasteToolStripButton.Text = "&Paste";
// //
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// helpToolStripButton // helpToolStripButton
// //
this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@@ -685,31 +741,6 @@
this.helpToolStripButton.Size = new System.Drawing.Size(23, 22); this.helpToolStripButton.Size = new System.Drawing.Size(23, 22);
this.helpToolStripButton.Text = "He&lp"; this.helpToolStripButton.Text = "He&lp";
// //
// errorProvider
//
this.errorProvider.ContainerControl = this;
//
// spellsDataGridView
//
this.spellsDataGridView.AllowUserToAddRows = false;
this.spellsDataGridView.AllowUserToDeleteRows = false;
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.levelColumn,
this.spellNameColumn,
this.componentColumn,
this.descColumn,
this.editColumn,
this.deleteColumn});
this.spellsDataGridView.Location = new System.Drawing.Point(12, 221);
this.spellsDataGridView.Name = "spellsDataGridView";
this.spellsDataGridView.ReadOnly = true;
this.spellsDataGridView.Size = new System.Drawing.Size(760, 329);
this.spellsDataGridView.TabIndex = 24;
//
// prepColumn // prepColumn
// //
this.prepColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.prepColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
@@ -759,31 +790,28 @@
// editColumn // editColumn
// //
this.editColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; this.editColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.Gray;
dataGridViewCellStyle5.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle5.NullValue")));
this.editColumn.DefaultCellStyle = dataGridViewCellStyle5;
this.editColumn.HeaderText = ""; this.editColumn.HeaderText = "";
this.editColumn.Image = global::d20_SRD_Spell_Lists.Properties.Resources.edit_16;
this.editColumn.Name = "editColumn"; this.editColumn.Name = "editColumn";
this.editColumn.ReadOnly = true; this.editColumn.ReadOnly = true;
this.editColumn.Text = "Edit"; this.editColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.editColumn.ToolTipText = "Edit spell";
this.editColumn.Width = 5; this.editColumn.Width = 5;
// //
// deleteColumn // deleteColumn
// //
this.deleteColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; this.deleteColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.deleteColumn.HeaderText = ""; this.deleteColumn.HeaderText = "";
this.deleteColumn.Image = global::d20_SRD_Spell_Lists.Properties.Resources.editdelete_16;
this.deleteColumn.Name = "deleteColumn"; this.deleteColumn.Name = "deleteColumn";
this.deleteColumn.ReadOnly = true; this.deleteColumn.ReadOnly = true;
this.deleteColumn.Text = "Delete"; this.deleteColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.deleteColumn.Width = 5; this.deleteColumn.Width = 5;
// //
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(697, 192);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(75, 23);
this.btnAdd.TabIndex = 25;
this.btnAdd.Text = "Add Spell";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -873,14 +901,16 @@
private System.Windows.Forms.Label lblDC1; private System.Windows.Forms.Label lblDC1;
private System.Windows.Forms.Label lblDC0; private System.Windows.Forms.Label lblDC0;
private System.Windows.Forms.DataGridView spellsDataGridView; private System.Windows.Forms.DataGridView spellsDataGridView;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.DataGridViewTextBoxColumn prepColumn; private System.Windows.Forms.DataGridViewTextBoxColumn prepColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn levelColumn; private System.Windows.Forms.DataGridViewTextBoxColumn levelColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn spellNameColumn; private System.Windows.Forms.DataGridViewTextBoxColumn spellNameColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn componentColumn; private System.Windows.Forms.DataGridViewTextBoxColumn componentColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn descColumn; private System.Windows.Forms.DataGridViewTextBoxColumn descColumn;
private System.Windows.Forms.DataGridViewButtonColumn editColumn; private System.Windows.Forms.DataGridViewImageColumn editColumn;
private System.Windows.Forms.DataGridViewButtonColumn deleteColumn; private System.Windows.Forms.DataGridViewImageColumn deleteColumn;
private System.Windows.Forms.Button btnAdd; private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn2;
} }
} }

View File

@@ -37,36 +37,6 @@ namespace d20_SRD_Spell_Lists {
this.spellsDataGridView.DataSource = character.Spells; this.spellsDataGridView.DataSource = character.Spells;
} }
//private void spellsDataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e) {
// string question = "Should this update apply to just this character's spell list?";
// string title = "Spell Update";
// var result = MessageBox.Show(question, title, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
// if (result == DialogResult.Yes) {
// string newValue = spellsDataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].FormattedValue.ToString();
// Spell newSpell = spellsDataGridView.Rows[e.RowIndex].DataBoundItem as Spell;
// // If it's a custom app spell already, hide that one for the character, then add the character spell.
// if (newSpell.IsCustom) {
// if (spellsDataGridView.Columns[e.ColumnIndex].HeaderText != "Name") {
// spells.hideMasterSpellForCharacter("name", newSpell.Name);
// } else {
// spells.hideMasterSpellForCharacter("short_description", newSpell.ShortDescription);
// }
// spells.addCharacterSpell(newSpell, Character.getSpellcastingClass(charClassComboBox.SelectedItem.ToString()));
// newSpell.IsCharCustom = true;
// } else if (newSpell.IsCharCustom) {
// // But what if it's already a character-specific spell?! ...then I just need to save it.
// // ...so... does that mean do nothing?
// }
// } else if (result == DialogResult.No) {
// Spell newSpell = spellsDataGridView.Rows[e.RowIndex].DataBoundItem as Spell;
// if (newSpell.IsCharCustom) {
// // It's a custom character spell, which means I should hide the chara
// }
// }
//}
private void setupAttributes() { private void setupAttributes() {
txtSpellCastingAttribute.LostFocus += new EventHandler(txtSpellCastingAttribute_LostFocus); txtSpellCastingAttribute.LostFocus += new EventHandler(txtSpellCastingAttribute_LostFocus);
txtSpellCastingAttribute_TextChanged(txtSpellCastingAttribute, new EventArgs()); txtSpellCastingAttribute_TextChanged(txtSpellCastingAttribute, new EventArgs());
@@ -221,5 +191,40 @@ namespace d20_SRD_Spell_Lists {
refreshSpellList(); refreshSpellList();
} }
} }
private void spellsDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) {
if (isEditButtonCell(e)) {
Spell editItem = (Spell)spellsDataGridView.Rows[e.RowIndex].DataBoundItem;
FrmAddEdit editForm = new FrmAddEdit(true, character, editItem);
var result = editForm.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK) {
character.Spells[character.Spells.IndexOf(editItem)] = editForm.spell;
refreshSpellList();
}
} else if (isDeleteButtonCell(e)) {
Spell deleteItem = (Spell)spellsDataGridView.Rows[e.RowIndex].DataBoundItem;
string msg = "Are you sure you want to delete this spell from your character?";
string title = "Confirm";
var result = MessageBox.Show(msg, title, MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == System.Windows.Forms.DialogResult.Yes) {
character.Spells.Remove(deleteItem);
refreshSpellList();
}
}
}
private bool isDeleteButtonCell(DataGridViewCellEventArgs e) {
if (spellsDataGridView.Columns[e.ColumnIndex] is DataGridViewImageColumn && e.ColumnIndex == 6) {
return true;
}
return false;
}
private bool isEditButtonCell(DataGridViewCellEventArgs e) {
if (spellsDataGridView.Columns[e.ColumnIndex] is DataGridViewImageColumn && e.ColumnIndex == 5) {
return true;
}
return false;
}
} }
} }

View File

@@ -120,7 +120,48 @@
<metadata name="mainToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="mainToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>137, 17</value>
</metadata>
<metadata name="prepColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="levelColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="spellNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="componentColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="descColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="editColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="dataGridViewCellStyle5.NullValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Qk32AgAAAAAAADYAAAAoAAAADgAAABAAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGEgoTGw8bGw8bGw8bGw8bGw8bGw8bG
w8bGw8bGw8bGw8bGw8bGw8YAAAABgYSChP///////////////////////////////////////////8bD
xgAAAAGBhIKE////////////////////////////////////////////xsPGAAAAAYGEgoT/////////
///////////////////////////////////Gw8YAAAABgYSChP//////////////////////////////
/////////////8bDxgAAAAGBhIKE////////////AAD/AAD/////////AAD/AAD/////////xsPGAAAA
AYGEgoT///////////////8AAP8AAP8AAP8AAP/////////////Gw8YAAAABgYSChP//////////////
/////wAA/wAA/////////////////8bDxgAAAAGBhIKE////////////////AAD/AAD/AAD/AAD/////
////////xsPGAAAAAYGEgoT///////////8AAP8AAP////////8AAP8AAP/////////Gw8YAAAABgYSC
hP///////////////////////////////////////////8bDxgAAAAGBhIKE////////////////////
////////////////////////xsPGAAAAAYGEgoT/////////////////////////////////////////
///Gw8YAAAABgYSChP///////////////////////////////////////////8bDxgAAAAGBhIKEhIKE
hIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEAYE=
</value>
</data>
<metadata name="deleteColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="newToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="newToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -242,49 +283,4 @@
TkSuQmCC TkSuQmCC
</value> </value>
</data> </data>
<metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>137, 17</value>
</metadata>
<metadata name="prepColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="levelColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="spellNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="componentColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="descColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="editColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="deleteColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="prepColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="levelColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="spellNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="componentColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="descColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="editColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="deleteColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

View File

@@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
namespace d20_SRD_Spell_Lists.Models { namespace d20_SRD_Spell_Lists.Models {
public class Spell { public class Spell {
public bool IsPrepped { get; set; } public string IsPrepped { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string AltName { get; set; } public string AltName { get; set; }
public string School { get; set; } public string School { get; set; }

View File

@@ -9,8 +9,9 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace d20_SRD_Spell_Lists.Properties { namespace d20_SRD_Spell_Lists.Properties {
using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
@@ -22,29 +23,29 @@ namespace d20_SRD_Spell_Lists.Properties {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() { internal Resources() {
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if ((resourceMan == null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("d20_SRD_Spell_Lists.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("d20_SRD_Spell_Lists.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
} }
} }
/// <summary> /// <summary>
/// Overrides the current thread's CurrentUICulture property for all /// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
@@ -58,5 +59,33 @@ namespace d20_SRD_Spell_Lists.Properties {
resourceCulture = value; resourceCulture = value;
} }
} }
internal static System.Drawing.Bitmap edit_16 {
get {
object obj = ResourceManager.GetObject("edit-16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap edit_32 {
get {
object obj = ResourceManager.GetObject("edit_32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap editdelete_16 {
get {
object obj = ResourceManager.GetObject("editdelete-16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap editdelete_32 {
get {
object obj = ResourceManager.GetObject("editdelete_32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
} }
} }

View File

@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding. : 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: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:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <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:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> <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="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
@@ -109,9 +112,22 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="editdelete_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\editdelete-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="edit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="edit-16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="editdelete-16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\editdelete-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -102,6 +102,7 @@
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="app.config" /> <None Include="app.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
@@ -122,6 +123,12 @@
<Content Include="AppData\UserSpellList.xml"> <Content Include="AppData\UserSpellList.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<None Include="Resources\editdelete-16.png" />
<None Include="Resources\edit-16.png" />
<None Include="Resources\editdelete-32.png" />
<None Include="Resources\edit-32.png" />
<None Include="Resources\editdelete-256.png" />
<None Include="Resources\edit-256.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client"> <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">