当前位置: 首页>>代码示例>>C#>>正文


C# AgilityPackHelper类代码示例

本文整理汇总了C#中AgilityPackHelper的典型用法代码示例。如果您正苦于以下问题:C# AgilityPackHelper类的具体用法?C# AgilityPackHelper怎么用?C# AgilityPackHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AgilityPackHelper类属于命名空间,在下文中一共展示了AgilityPackHelper类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HeroDataConverter

        public HeroDataConverter()
        {
            agilityPackHelper = new AgilityPackHelper();
            HtmlDocument doc = new HtmlDocument();

            heroesName = GetHeroesName();

            foreach (var heroName in heroesName)
            {
                doc = LoadHeroHtmlPage(heroName);

                skillImages = GetSkillPortraits(doc);
                skillNames = GetSkillNames(doc);
                skillDescriptions = GetSkillDescriptions(doc);
                primaryStatsImages = GetPrimaryStatsImages(doc);
                primaryStatsValues = GetPrimaryStatsValues(doc);
                biography = GetBiography(doc).Trim() ;
                manaCostDictionary = GetManaCost(doc);
                coolDownList = GetCoolDown(doc);
                abilityCastType = GetAbilityCastType(doc);
                skillTargetAffectedType = GetSkillTargetAffectedType(doc);
                skillDamageType = GetSkillDamageType(doc);
                skillVideo = GetSkillVideo(doc);
                skillRemainingValues = GetSkillRemainingValues(doc);

                heroCreator.createHero(heroName, biography);                

                for (int i = 0; i < skillNames.Count; i++)
                {
                    heroCreator.createHeroSkill(skillNames[i], skillDescriptions[i], manaCostDictionary, coolDownList, abilityCastType[i],
                        skillTargetAffectedType[i], skillDamageType[i], skillVideo);
                }
            }
        }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:34,代码来源:1392068905$HeroDataConverter.cs

示例2: HeroDataConverter

        public HeroDataConverter()
        {
            heroesName = new List<string>();
            heroesUrl = new List<string>();
            skillImages = new List<string>();
            skillNames = new List<string>();
            skillDescriptions = new List<string>();
            
            primaryStatsImages = new List<string>();
            primaryStatsValues = new Dictionary<string, string>();
            manaCostDictionary = new List<KeyValuePair<string, string>>();
            coolDownList = new List<KeyValuePair<string, string>>();
            abilityCastType = new List<KeyValuePair<string, string>>();
            skillTargetAffectedType = new List<KeyValuePair<string, string>>();
            skillDamageType = new List<KeyValuePair<string, string>>();
            skillRemainingValues = new Dictionary<string, Dictionary<string, string>>();
            heroCreator = new HeroCreator();
            skillCreator = new SkillCreator();
            agilityPackHelper = new AgilityPackHelper();

            heroesName = GetHeroesName();

            foreach (var heroName in heroesName)
            {
                getDataFromHtml(heroName);                
                createSkillEffectName(heroName);
                //heroCreator.createHero(heroName, biography);
                //createSkill();
                //createPrimaryAttributes();
            }
        }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:31,代码来源:1392758075$HeroDataConverter.cs

示例3: HeroesRepository

 public HeroesRepository()
 {
     var skillImages = new List<string>();
     var skillNames = new List<string>();
     var skillDescriptions = new List<string>();
     var primaryStatsImages = new List<string>();
     var primaryStatsValues = new List<string>();
     string biography;
     var manaCosts = new List<string>();
     var coolDowns = new List<string>();
     var skillBehaviours = new List<string>();
     var skillDamageType = new List<string>();
     var skillVideos = new List<string>();
     //TODO Armazenar quantidade de skills que o heroi tem
     agilityPackHelper = new AgilityPackHelper();
     // load snippet
     HtmlDocument doc = new HtmlDocument();
     doc = LoadHtmlSnippetFromFile();
    
     skillImages = GetSkillPortraits(doc);
     skillNames = GetSkillNames(doc);
     skillDescriptions = GetSkillDescriptions(doc);
     primaryStatsImages = GetPrimaryStatsImages(doc);
     primaryStatsValues = GetPrimaryStatsValues(doc);
     biography = GetBiography(doc);
     //TODO Stats(Atributos)
     manaCosts = GetManaCost(doc);
     coolDowns = GetCoolDown(doc);
     skillBehaviours = GetSkillBehaviour(doc);
     skillDamageType = GetSkillDamageType(doc);
     skillVideos = GetSkillVideo(doc);
 }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:32,代码来源:1391803328$HeroesRepository.cs

示例4: HeroDataConverter

        public HeroDataConverter()
        {
            agilityPackHelper = new AgilityPackHelper();
            HtmlDocument doc = new HtmlDocument();
            heroesName = GetHeroesName();

            foreach (var heroName in heroesName)
            {
                doc = LoadHeroHtmlPage(heroName);

                
                skillImages = GetSkillPortraits(doc);
                skillNames = GetSkillNames(doc);
                skillDescriptions = GetSkillDescriptions(doc);
                primaryStatsImages = GetPrimaryStatsImages(doc);
                primaryStatsValues = GetPrimaryStatsValues(doc);
                biography = GetBiography(doc).Trim() ;
                manaCostList = GetManaCost(doc);
                coolDownList = GetCoolDown(doc);
                abilityCastType = GetAbilityCastType(doc);
                skillTargetAffectedType = GetSkillTargetAffectedType(doc);
                skillDamageType = GetSkillDamageType(doc);
                skillVideo = GetSkillVideo(doc);
                skillRemainingValues = GetSkillRemainingValues(doc);


                heroCreator.createHero(heroName, biography);                
                sCretor.createSkill(heroId, name, description, manaCostList, coolDownList, abilityCastType, targetAffectedType, damageType, videoUrl);
                )
            }


        }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:33,代码来源:1392067077$HeroDataConverter.cs

示例5: HeroesRepository

        public HeroesRepository()
        {
            var skillImages = new List<string>();
            var skillNames = new List<string>();
            var skillDescriptions = new List<string>();
            var primaryStatsImages = new List<string>();
            var primaryStatsValues = new List<string>();
            string biography;
            var manaCosts = new List<string>();
            var coolDowns = new List<string>();
            var isSkillPassiveList = new List<bool>();

            agilityPackHelper = new AgilityPackHelper();
            // load snippet
            HtmlDocument doc = new HtmlDocument();
            doc = LoadHtmlSnippetFromFile();
           
            skillImages = GetSkillPortraits(doc);
            skillNames = GetSkillNames(doc);
            skillDescriptions = GetSkillDescriptions(doc);
            primaryStatsImages = GetPrimaryStatsImages(doc);
            primaryStatsValues = GetPrimaryStatsValues(doc);
            biography = GetBiography(doc);
            //TODO Stats(Atributos)
            manaCosts = GetManaCost(doc);
            coolDowns = GetCoolDown(doc);
            checkPassiveSkills(doc);
        }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:28,代码来源:1391798801$HeroesRepository.cs

示例6: HeroDataConverter

        public HeroDataConverter()
        {
            agilityPackHelper = new AgilityPackHelper();
            HtmlDocument doc = new HtmlDocument();

            doc = LoadHtmlSnippetFromFile();

            skillImages = GetSkillPortraits(doc);
            skillNames = GetSkillNames(doc);
            skillDescriptions = GetSkillDescriptions(doc);
            primaryStatsImages = GetPrimaryStatsImages(doc);
            primaryStatsValues = GetPrimaryStatsValues(doc);
            biography = GetBiography(doc);            
            manaCostList = GetManaCost(doc);
            coolDownList = GetCoolDown(doc);
            abilityCastType = GetAbilityCastType(doc);
            skillTargetAffectedType = GetSkillTargetAffectedType(doc);
            skillDamageType = GetSkillDamageType(doc);            
            skillVideos = GetSkillVideo(doc);
            skillRemainingValues = GetSkillRemainingValues(doc);

            for (int i = 0; i < skillNames.Count; i++)
            {
                createSkill(skillNames[i], skillDescriptions[i], manaCostList, coolDownList, abilityCastType[i], skillTargetAffectedType[i], skillDamageType[i], skillVideos.First());
            }
        }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:26,代码来源:1392058121$HeroDataConverter.cs

示例7: HeroDataConverter

        public HeroDataConverter()
        {
            BaseRepositoryApi baseApi = new BaseRepositoryApi();
            baseApi.getHeroes();

            agilityPackHelper = new AgilityPackHelper();
            HtmlDocument doc = new HtmlDocument();

            doc = LoadHtmlSnippetFromFile();

            skillImages = GetSkillPortraits(doc);
            skillNames = GetSkillNames(doc);
            skillDescriptions = GetSkillDescriptions(doc);
            primaryStatsImages = GetPrimaryStatsImages(doc);
            primaryStatsValues = GetPrimaryStatsValues(doc);
            biography = GetBiography(doc);            
            manaCostList = GetManaCost(doc);
            coolDownList = GetCoolDown(doc);
            abilityCastType = GetAbilityCastType(doc);
            skillTargetAffectedType = GetSkillTargetAffectedType(doc);
            skillDamageType = GetSkillDamageType(doc);            
            skillVideo = GetSkillVideo(doc);
            skillRemainingValues = GetSkillRemainingValues(doc);

            heroCreator.createHero(name, biography);
            for (int i = 0; i < skillNames.Count; i++)
            {
                heroCreator.createHeroSkill(skillNames[i], skillDescriptions[i], manaCostList, coolDownList, abilityCastType[i],
                    skillTargetAffectedType[i], skillDamageType[i], skillVideo);
            }
        }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:31,代码来源:1392059869$HeroDataConverter.cs

示例8: HeroDataConverter

		public HeroDataConverter()
		{
			heroesNames = new List<string>();
			heroesUrl = new List<string>();
			skillImages = new List<string>();
			skillNames = new List<string>();
			skillDescriptions = new List<string>();
			skillRemainingValuesDescriptions = new List<string>();
			primaryStatsImages = new List<string>();
			primaryStatsValues = new Dictionary<string, string>();
			manaCostDictionary = new List<KeyValuePair<string, string>>();
			coolDownList = new List<KeyValuePair<string, string>>();
			abilityCastType = new List<KeyValuePair<string, string>>();
			skillTargetAffectedType = new List<KeyValuePair<string, string>>();
			skillDamageType = new List<KeyValuePair<string, string>>();
			skillRemainingValues = new Dictionary<Skill, Dictionary<string, string>>();
			heroCreator = new HeroCreator();
			skillCreator = new SkillCreator();
			agilityPackHelper = new AgilityPackHelper();

			heroesNames = GetHeroesName();

            for (int i = 0; i < heroesNames.Count; i++)
            {
                if (!isInsert)
                    currentHero = heroCreator.getHeroByName(heroesNames[i]);
                else
                    heroCreator.createHero(heroName, biography);



                getDataFromHtml(heroName);


                //createSkillEffectName(heroName);

                //createSkill();
                //createPrimaryAttributes();
            }

			foreach (var heroName in heroesNames)
			{
				
			}
		}
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:45,代码来源:1393512061$HeroDataConverter.cs

示例9: HeroDataConverter

 public HeroDataConverter()
 {
     heroesName = new List<string>();
     heroesUrl = new List<string>();
     skillImages = new List<string>();
     skillNames = new List<string>();
     skillDescriptions = new List<string>();
     primaryStatsImages = new List<string>();
     primaryStatsValues = new Dictionary<string, string>();
     manaCostDictionary = new List<KeyValuePair<string, string>>();
     coolDownList = new List<KeyValuePair<string, string>>();
     abilityCastType = new List<KeyValuePair<string, string>>();
     skillTargetAffectedType = new List<KeyValuePair<string, string>>();
     skillDamageType = new List<KeyValuePair<string, string>>();
     skillRemainingValues = new List<List<string>>();
     heroCreator = new HeroCreator();
     skillCreator = new SkillCreator();
     agilityPackHelper = new AgilityPackHelper();            
 }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:19,代码来源:1392148247$HeroDataConverter.cs

示例10: HeroDataConverter

        public HeroDataConverter()
        {
            var skillImages = new List<string>();
            var skillNames = new List<string>();
            var skillDescriptions = new List<string>();
            var primaryStatsImages = new List<string>();
            var primaryStatsValues = new List<string>();
            string biography;
            var manaCostList = new List<string>();
            var coolDownList = new List<string>();
            var abilityCastType = new List<string>();
            var skillTargetAffectedType = new List<string>();
            var skillDamageType = new List<string>();
            var skillVideos = new List<string>();
            var skillRemainingValues = new List<List<string>>();
            //TODO Armazenar quantidade de skills que o heroi tem
            agilityPackHelper = new AgilityPackHelper();
            // load snippet
            HtmlDocument doc = new HtmlDocument();
            doc = LoadHtmlSnippetFromFile();

            skillImages = GetSkillPortraits(doc);
            skillNames = GetSkillNames(doc);
            skillDescriptions = GetSkillDescriptions(doc);
            primaryStatsImages = GetPrimaryStatsImages(doc);
            primaryStatsValues = GetPrimaryStatsValues(doc);
            biography = GetBiography(doc);
            //TODO Stats(Atributos)
            manaCostList = GetManaCost(doc);
            coolDownList = GetCoolDown(doc);
            abilityCastType = GetAbilityCastType(doc);
            skillDamageType = GetSkillDamageType(doc);
            skillTargetAffectedType = GetSkillTargetAffectedType(doc);
            skillVideos = GetSkillVideo(doc);
            skillRemainingValues = GetSkillRemainingValues(doc);

            //for (int i = 0; i < skillNames.Count; i++)
            //{
            //    createSkill(skillNames[i], skillDescriptions[i], manaCostList, coolDownList, abilityCastType, )
            //}
        }
开发者ID:GibranLyra,项目名称:GLyra.Dota2Project,代码行数:41,代码来源:1392047859$HeroDataConverter.cs


注:本文中的AgilityPackHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。