Esempio n. 1
0
 public void updateProperty(Build build, object control) {
   switch (mProp) {
     case Prop.Champion:
       build.Champion = (string)((ComboBox)control).SelectedItem;
       break;
     case Prop.ItemSet:
       build.ItemSet = (string)((ComboBox)control).SelectedItem;
       break;
     case Prop.RunePage:
       build.RunePage = (string)((ComboBox)control).SelectedItem;
       break;
     case Prop.MasteryPage:
       build.MasteryPage = (string)((ComboBox)control).SelectedItem;
       break;
     case Prop.StartAbilities:
       build.StartAbilities = ((TextBox)control).Text;
       break;
     case Prop.MaxOrder:
       build.MaxOrder = ((TextBox)control).Text;
       break;
   }
 }
Esempio n. 2
0
 public void addBuild(Build newBuild) {
   BuildName.Items.Add(newBuild.BuildName);
   checkBuildsCount(false);
 }
Esempio n. 3
0
 public void populateBuild(Build build) {
   mCurrentBuild = build;
   Champion.SelectedItem = build.Champion;
   ItemSet.SelectedItem = build.ItemSet;
   RunePage.SelectedItem = build.RunePage;
   MasteryPage.SelectedItem = build.MasteryPage;
   StartAbilities.Text = build.StartAbilities;
   MaxOrder.Text = build.MaxOrder;
 }
Esempio n. 4
0
 public void updateBuildName(Build d, string newName) {
   var build = mBuilds.First(x => x["name"].ToString() == d.BuildName);
   build["name"] = newName;
   d.BuildName = newName;
 }
Esempio n. 5
0
 public void removeBuild(Build d) {
   mBuilds.First(x => x["name"].ToString() == d.BuildName).Remove();
 }
Esempio n. 6
0
 public void addBuild(Build d) {
   var build = new JObject();
   build["name"] = d.BuildName;
   build["runePage"] = d.RunePage;
   build["masteryPage"] = d.MasteryPage;
   build["itemSet"] = d.ItemSet;
   build["startAbilities"] = d.StartAbilities;
   build["maxOrder"] = d.MaxOrder;
   build["champion"] = ChampionsData.Where(i => i.Name == d.Champion).Select(i => i.ID).First();
   mBuilds.Add(build);
 }
Esempio n. 7
0
 public void updateBuild(Build d) {
   var build = mBuilds.First(x => x["name"].ToString() == d.BuildName);
   build["runePage"] = d.RunePage;
   build["masteryPage"] = d.MasteryPage;
   build["itemSet"] = d.ItemSet;
   build["startAbilities"] = d.StartAbilities;
   build["maxOrder"] = d.MaxOrder;
   build["champion"] = ChampionsData.Where(i => i.Name == d.Champion).Select(i => i.ID).First();
 }