示例#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;
   }
 }
示例#2
0
 public void addBuild(Build newBuild) {
   BuildName.Items.Add(newBuild.BuildName);
   checkBuildsCount(false);
 }
示例#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;
 }
示例#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;
 }
示例#5
0
 public void removeBuild(Build d) {
   mBuilds.First(x => x["name"].ToString() == d.BuildName).Remove();
 }
示例#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);
 }
示例#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();
 }