Пример #1
0
 public CreateDoor(IDomainModelAdapter domain)
 {
     InitializeComponent();
     refDomain = domain;
     CenterToParent();
     this.Manager = new ItemViewManager(this, domain, this.OnFunctionControlUpdate, ItemLoadType.Door);
 }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }