當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。