Exemplo n.º 1
0
        private void btnSetItem_Click(object sender, EventArgs e)
        {
            string typedesc;
            nwItem item = bs_nwItem.Current as nwItem;

            if (item.ItemType == null)
            {
                typedesc = "NULL";
            }
            else
            {
                typedesc = item.ItemType.Path("\\");
            }

            SetMessage("Calling Set Item for item:" + item.Name + " Current: Type" + typedesc);
            sysTreeItemType selected = stm.Select <sysTreeItemType>(sess, item.ItemType) as sysTreeItemType;

            if (selected != item.ItemType)
            {
                item.ItemType = selected;
            }
            UpdateItemPath();
        }
        private void bs_sysTreeItemType_CurrentChanged(object sender, EventArgs e)
        {
            sysTreeItemType n = bs_sysTreeItemType.Current as sysTreeItemType;

            bs_sysItemType.DataSource = n.Items;
        }
Exemplo n.º 3
0
        public virtual void CreateLibRuleset()
        {
            //Creates initial data for the Ruleset


            //SysDamageRolls
            IList <sysDamageRoll> dmgrolls = new List <sysDamageRoll>();

            sysDamageRoll.SeedListData(dmgrolls);
            foreach (sysDamageRoll sd in dmgrolls)
            {
                this.Add(sd);
            }

            //sysLanguages
            IList <sysLanguage> currList = new List <sysLanguage>();

            sysLanguage.SeedListData(currList);
            foreach (sysLanguage l in currList)
            {
                this.Add(l);
            }


            //sysTreeItemType
            sysTreeItemType sysItemTree = sysTreeItemType.SeedTreeData(dmgrolls);

            i.SaveOrUpdate(sysItemTree);

            //sysDevelopment & sysTreeDevelopment
            IList <sysDevelopment> sysDev     = new List <sysDevelopment>();
            sysTreeDevelopment     sysdevTree = sysTreeDevelopment.SeedTreeData(sysDev);

            i.SaveOrUpdate(sysdevTree);
            foreach (sysDevelopment sdev in sysDev)
            {
                this.Add(sdev);
            }

            //Remap children
            i.Flush();

            //Statistics
            IList <sysBaseStatistic> stats    = new List <sysBaseStatistic>();
            sysTreeStatistic         statTree = sysTreeStatistic.SeedTreeData(stats);

            i.SaveOrUpdate(statTree);
            foreach (sysBaseStatistic st in stats)
            {
                this.Add(st);
            }

            //sysAOETypes
            IList <sysAOEType> aoetypes = new List <sysAOEType>();

            sysAOEType.SeedListData(aoetypes);
            foreach (sysAOEType aoe in aoetypes)
            {
                this.Add(aoe);
            }

            //sysDurations
            IList <sysBaseDurationType> sdtypes = new List <sysBaseDurationType>();

            sysBaseDurationType.SeedListData(sdtypes);
            foreach (sysBaseDurationType sd in sdtypes)
            {
                this.Add(sd);
            }

            //sysAlignments
            IList <sysBaseAlignment> altypes = new List <sysBaseAlignment>();

            sysBaseAlignment.SeedListData(altypes);
            foreach (sysBaseAlignment a in altypes)
            {
                this.Add(a);
            }

            //sysDmgTypes
            IList <sysBaseDamageType> dmgtypes = new List <sysBaseDamageType>();

            sysBaseDamageType.SeedListData(dmgtypes);
            foreach (sysBaseDamageType d in dmgtypes)
            {
                this.Add(d);
            }

            //sysFactionRanks
            IList <sysFactionRanking> facranks = new List <sysFactionRanking>();

            sysFactionRanking.SeedListData(facranks);
            foreach (sysFactionRanking fr in facranks)
            {
                this.Add(fr);
            }

            //sysMilestoneTypes
            IList <sysMilestoneType> smiletypes = new List <sysMilestoneType>();

            sysMilestoneType.SeedListData(smiletypes);
            foreach (sysMilestoneType smt in smiletypes)
            {
                this.Add(smt);
            }
        }