Ready for first release111onewon.

Signed-off-by: Melissa Avery-Weir <melissa.avery@wellsfargo.com>
This commit is contained in:
Melissa Avery-Weir
2011-09-27 14:59:13 -04:00
parent 66cc12356a
commit be8f6d8cc5
9 changed files with 135 additions and 562 deletions

View File

@@ -11,6 +11,7 @@ using d20_SRD_Spell_Lists.Exceptions;
using System.Xml.Serialization;
using System.IO;
using Printing.DataGridViewPrint.Tools;
using System.Reflection;
namespace d20_SRD_Spell_Lists {
public partial class FrmMain : Form {
@@ -24,6 +25,8 @@ namespace d20_SRD_Spell_Lists {
public FrmMain() {
InitializeComponent();
this.Text = AssemblyTitle;
character = new Character();
spells = new MasterSpellSet();
spellsDataGridView.AutoGenerateColumns = false;
@@ -339,6 +342,7 @@ namespace d20_SRD_Spell_Lists {
character.SpellCastingAttribute = 10;
loadValues();
charClassComboBox.SelectedIndex = 0;
dirtyCharacter = false;
loadingCharacter = false;
}
}
@@ -348,5 +352,18 @@ namespace d20_SRD_Spell_Lists {
e.Cancel = true;
}
}
public string AssemblyTitle {
get {
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if (attributes.Length > 0) {
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
if (titleAttribute.Title != "") {
return titleAttribute.Title;
}
}
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
}
}
}
}