public FormDetails() { InitializeComponent(); if (FormDetails.itemManager == null) itemManager = new ItemDataManager(); if (FormDetails.entityDataManager == null) entityDataManager = new EntityDataManager(); if (FormDetails.skillManager == null) skillManager = new SkillDataManager(); this.FormClosing += new FormClosingEventHandler(FormDetails_FormClosing); }
public FormDetails() { InitializeComponent(); if (FormDetails.entityDataManager == null) { entityDataManager = new EntityDataManager(); } if (FormDetails.itemDataManager == null) { itemDataManager = new ItemDataManager(); } this.FormClosing += new FormClosingEventHandler(DetailsForm_Close); }
public static void ReadEntityData() { if (Directory.Exists(FormMain.classPath)) { entityDataManager = new EntityDataManager(); string[] fileNames = Directory.GetFiles(FormMain.classPath); if (fileNames.Length != 0) { foreach (string s in fileNames) { EntityData entityData = XnaSerializer.Deserialize<EntityData>(s); entityDataManager.EntityData.Add(entityData.EntityName, entityData); } } } }
public static void ReadEntityData() { entityDataManager = new EntityDataManager(); string[] fileNames = Directory.GetFiles(FormMain.ClassPath, "*.xml"); foreach (string s in fileNames) { EntityData entityData = XnaSerializer.Deserialize<EntityData>(s); entityDataManager.EntityData.Add(entityData.EntityName, entityData); } }