예제 #1
0
        private ClassJobInfo GetAllClassData(string url, int classId)
        {
            url += classId;
            ClassJobInfo classInfo = JsonConvert.DeserializeObject <ClassJobInfo>(MakeRequest(url));

            return(classInfo);
        }
예제 #2
0
        private void PopulateCurrentClassInfo(Character character)
        {
            ClassJobInfo classInfo = GetClassData(Class_Url, character.ActiveClassJob.JobId);

            PopulateCurrentClassIcon(Base_Url, classInfo.Icon);
            PopulateCurrentClassAbbreviation(classInfo.Abbreviation);
            PopulateCurrentClassName(classInfo.Name);
            PopulateCurrentClassLevel(character.ActiveClassJob.Level);
        }
예제 #3
0
        private void PopulateAllClassIcons(Dictionary <string, ClassJob> characterClasses)
        {
            foreach (var classJob in characterClasses)
            {
                bool         job                = classJob.Value.Level <= 30 ? false : true;
                string[]     classJobValues     = classJob.Key.Split('_');
                string       classJobValue      = job ? classJobValues[0] : classJobValues[1];
                ClassJobInfo classInfo          = GetClassData(Class_Url, job ? classJob.Value.JobId : classJob.Value.ClassId);
                string       formattedClassName = classInfo.Name.Replace(" ", "");

                PictureBoxDictionary[classJobValue].Load(ClassIconAlt_Url + formattedClassName + ".png");
                LabelDictionary[classJobValue].Text = classJob.Value.Level.ToString();
            }
        }