public ItemModel(IDomainModelAdapter domain, ItemLoadType loadType) { this.refMVCDomain = domain; switch (loadType) { case ItemLoadType.Door: { Code.CreateLPCFromScratch(DeadSoulsObjectType.Door); break; } case ItemLoadType.Armor: { Code.CreateLPCFromScratch(DeadSoulsObjectType.Armor); break; } case ItemLoadType.Npc: { Code.CreateLPCFromScratch(DeadSoulsObjectType.Npc); break; } default: { Code.CreateLPCFromScratch(DeadSoulsObjectType.Item); break; } } }
public ItemViewManager(Form parentForm, IDomainModelAdapter domain, EventHandler functionUpdate, ItemLoadType loadType) { if (parentForm == null) { throw new NullReferenceException("Invalid parent form passed to ItemViewManager."); } if (domain == null) { throw new NullReferenceException("Invalid domain passed to ItemViewManager."); } if (functionUpdate == null) { throw new NullReferenceException("Invalid update event handler passed to ItemViewManager."); } this.refParentForm = parentForm; this.Item = new ItemModel(domain, loadType); this.WireEvents(parentForm, functionUpdate); }