Esempio n. 1
0
        private void UpdateHeroInfo(HeroSummary value)
        {
            guiHeroName.Text = value.Name;

            guiHeroClass.Text = value.HeroClass.ToString();

            guiHeroLevel.Text = String.Format("{0}", value.Level);
            guiHeroParangonLevel.Text = String.Format("+{0}", value.ParagonLevel);

            guiHeroHardcore.Visible = value.Hardcore;
        }
Esempio n. 2
0
 private static void UpdateNodeText(TreeNode node, HeroSummary d3Object)
 {
     node.Text += $" >> L:{d3Object.Level:D2} P:{d3Object.ParagonLevel:D2} - {d3Object.Name}";
 }
Esempio n. 3
0
 private void InsertContextMenu(TreeNode node, HeroSummary d3Object)
 {
     node.Tag = new BNetContext<HeroSummary>(D3Api.Host, new BattleTag(guiBattleTag.Text), d3Object);
     node.ContextMenuStrip = guiHeroSummaryContextMenu;
     node.NodeFont = defaultNodeFont;
 }
 public HeroSummariesListAdapter(Context context, HeroSummary[] heroes)
 {
     this.context = context;
     this.heroes = heroes;
 }
        private static Hero FetchHero(HeroSummary heroSummary, BattleTag battleTag, Host host)
        {
            D3Api.Host = host.Url;

            Hero hero;
            try
            {
                hero = heroSummary.GetHeroFromBattleTag(battleTag);
            }
            catch (FileNotInCacheException)
            {
                MessageBox.Show("Hero was not found in cache: go online to retrieve it.");
                return null;
            }
            catch (BNetResponseFailedException)
            {
                MessageBox.Show("Battle.net sent an http error: try again later.");
                return null;
            }
            catch (BNetFailureObjectReturnedException)
            {
                MessageBox.Show("Battle.net sent an error: verify the battle tag.");
                return null;
            }

            return hero;
        }
Esempio n. 6
0
 public D3HeroControl(HeroSummary heroSummary)
     : this()
 {
     HeroSummary = heroSummary;
 }
 private static void UpdateNodeText(TreeNode node, HeroSummary d3Object)
 {
     node.Text += String.Format(" >> L:{1:D2} P:{2:D2} - {0}", d3Object.name, d3Object.level, d3Object.paragonLevel);
 }
Esempio n. 8
0
 public D3HeroContainer(HeroSummary heroSummary, BattleTag battleTag, Host host)
 {
     HeroSummary = heroSummary;
     BattleTag = battleTag;
     Host = host;
 }