private ClassJobInfo GetAllClassData(string url, int classId) { url += classId; ClassJobInfo classInfo = JsonConvert.DeserializeObject <ClassJobInfo>(MakeRequest(url)); return(classInfo); }
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); }
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(); } }