private void button2_Click(object sender, RoutedEventArgs e) { try { if (tbSkillURL.Text.Contains("poezone.ru")) { SkillTreeImporter.LoadBuildFromPoezone(Tree, tbSkillURL.Text); tbSkillURL.Text = Tree.SaveToURL(); } else if (tbSkillURL.Text.Contains("poebuilder.com/")) { string poebuilderTree = "https://poebuilder.com/character/"; string poebuilderTreeO = "http://poebuilder.com/character/"; string urlString = tbSkillURL.Text; if (urlString.StartsWith("https")) { urlString = urlString.Replace(poebuilderTree, TreeAddress); tbSkillURL.Text = urlString; Tree.LoadFromURL(urlString); } else { urlString = urlString.Replace(poebuilderTreeO, TreeAddress); tbSkillURL.Text = urlString; Tree.LoadFromURL(urlString); } } else { Tree.LoadFromURL(tbSkillURL.Text); } justLoaded = true; cbCharType.SelectedIndex = Tree.Chartype; UpdateAllAttributeList(); } catch (Exception) { MessageBox.Show("The Build you tried to load, is invalid"); } }
private void button2_Click(object sender, RoutedEventArgs e) { try { if (tbSkillURL.Text.Contains("poezone.ru")) { SkillTreeImporter.LoadBuildFromPoezone(Tree, tbSkillURL.Text); tbSkillURL.Text = Tree.SaveToURL(); } else { Tree.LoadFromURL(tbSkillURL.Text); } justLoaded = true; cbCharType.SelectedIndex = Tree.Chartype; UpdateAllAttributeList(); } catch (Exception) { MessageBox.Show("The Build you tried to load, is invalid"); } }