示例#1
0
 private void getIcon(TalentItem ti, Character.CharacterClass charclass)
 {
     if (_icon == null)
     {
         WebRequestWrapper wrw      = new WebRequestWrapper();
         string            filePath = wrw.DownloadTalentIcon(charclass, ti.Tree.Replace(" ", ""), ti.Name.Replace(" ", "").Replace(":", ""));
         if (!String.IsNullOrEmpty(filePath))
         {
             _icon = new Bitmap(filePath);
         }
     }
 }
示例#2
0
        private void getIcon(TalentItem ti, Character.CharacterClass charclass)
        {
            string filePath = "";

            if (_icon == null)
            {
                WebRequestWrapper wrw = new WebRequestWrapper();
                try {
                    filePath = wrw.DownloadTalentIcon(charclass, ti.Tree.Replace(" ", ""), ti.Name.Replace(" ", ""));
                }
                catch (Exception e) {
                    MessageBox.Show("Error downloading talent icon for " + ti.Name + ": " + e.ToString());
                }
                if (!String.IsNullOrEmpty(filePath))
                {
                    _icon = new Bitmap(filePath);
                }
            }
        }