public CreateDoor(IDomainModelAdapter domain) { InitializeComponent(); refDomain = domain; CenterToParent(); this.Manager = new ItemViewManager(this, domain, this.OnFunctionControlUpdate, ItemLoadType.Door); }
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 ImportExternalDomainForm(IDomainModelAdapter domain) { InitializeComponent(); refDomain = domain; Utility.ConfirmRequiredDirectories(); List <string> files = RemoveIncludedDomainsFromList(BuildListOfAllExternalDomains()); this.checkedListDomains.Items.AddRange(files.ToArray()); }
public CreateArmorForm(ItemsConfig ic, string itemClass, IDomainModelAdapter domain) { InitializeComponent(); #if STELLARMASS this.SetWearLevel.Visible = true; this.SetWearLevel.Enabled = true; #endif this.SetVendorType.CheckListStrings = DeadSouls.Globals.DefinedLists.GetList("vendorTypes").ToArray(); this.SetRestrictLimbs.EntryCollection = DeadSouls.Globals.DefinedLists.GetList("limbs").ToArray(); this.SetProtections.KeyCollection = DeadSouls.Globals.DefinedLists.GetList("damageTypes").ToArray(); this.SetArmorType.ListTextCollection = DeadSouls.Globals.DefinedLists.GetList("armorTypes").ToArray(); CenterToParent(); refDomain = domain; this.Manager = new ItemViewManager(this, domain, this.OnFunctionControlUpdate, ItemLoadType.Armor); DynamicControlsSetup(ic, itemClass); ic.DisableListedFunctionControls(this, itemClass); }
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); }
public CreateItemForm(ItemsConfig ic, string itemClass, IDomainModelAdapter domain) { InitializeComponent(); #if STELLARMASS this.SetWieldLevel.Visible = true; this.SetWieldLevel.Enabled = true; #endif CenterToParent(); //this.SetDamageType.CheckListStrings = DeadSouls.Globals.DefinedLists.GetList("damageTypes").ToArray(); this.SetInventory.KeyCollection = domain.Inventory.ToArray(); this.SetDamageType.CheckListStrings = DeadSouls.Globals.DefinedLists.GetList("damageTypes").ToArray(); this.SetWeaponType.ListTextCollection = DeadSouls.Globals.DefinedLists.GetList("weaponTypes").ToArray(); this.SetVendorType.CheckListStrings = DeadSouls.Globals.DefinedLists.GetList("vendorTypes").ToArray(); refDomain = domain; this.Manager = new ItemViewManager(this, domain, this.OnFunctionControlUpdate, ItemLoadType.Item); DynamicControlsSetup(ic, itemClass); ic.DisableListedFunctionControls(this, itemClass); }
public CreateNpcForm(ItemsConfig ic, string itemClass, IDomainModelAdapter domain) { InitializeComponent(); //this.SetNativeLanguage.SelectedIndex = 0; this.comboStatRemove.DropDownStyle = ComboBoxStyle.DropDownList; this.comboSkillRemove.DropDownStyle = ComboBoxStyle.DropDownList; this.comboStatAdd.DropDownStyle = ComboBoxStyle.DropDownList; this.comboSkillAdd.DropDownStyle = ComboBoxStyle.DropDownList; this.SetInventory.KeyCollection = domain.Inventory.ToArray(); this.SetRace.ListTextCollection = DeadSouls.Globals.DefinedLists.GetList("races").ToArray(); this.SetClass.ListTextCollection = DeadSouls.Globals.DefinedLists.GetList("classes").ToArray(); this.SetGender.ListTextCollection = DeadSouls.Globals.DefinedLists.GetList("genders").ToArray(); this.SetCurrency.KeyCollection = DeadSouls.Globals.DefinedLists.GetList("currencies").ToArray(); this.SetDefaultLanguage.ListTextCollection = DeadSouls.Globals.DefinedLists.GetList("languages").ToArray(); this.SetNativeLanguage.ListTextCollection = DeadSouls.Globals.DefinedLists.GetList("languages").ToArray(); this.comboSkillAdd.Items.AddRange((object[])DeadSouls.Globals.DefinedLists.GetList("skills").ToArray()); this.comboStatAdd.Items.AddRange((object[])DeadSouls.Globals.DefinedLists.GetList("stats").ToArray()); this.comboLanguageAdd.Items.AddRange((object[])DeadSouls.Globals.DefinedLists.GetList("languages").ToArray()); this.SetItemDropRates.KeyCollection = domain.Inventory.ToArray(); #if STELLARMASS this.groupInventoryDrops.Visible = true; this.SetItemDropRates.Enabled = true; this.SetDropInventoryOnDeath.Enabled = true; #endif CenterToParent(); refDomain = domain; this.Manager = new ItemViewManager(this, domain, this.OnFunctionControlUpdate, ItemLoadType.Npc); DynamicControlsSetup(ic, itemClass); ic.DisableListedFunctionControls(this, itemClass); AddAction(FunctionCallId.SetAction, "SetAction", this.flowActions); AddAction(FunctionCallId.SetCombatAction, "SetCombatAction", this.flowCombatActions); }