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; } }
public void addBuild(Build newBuild) { BuildName.Items.Add(newBuild.BuildName); checkBuildsCount(false); }
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; }
public void updateBuildName(Build d, string newName) { var build = mBuilds.First(x => x["name"].ToString() == d.BuildName); build["name"] = newName; d.BuildName = newName; }
public void removeBuild(Build d) { mBuilds.First(x => x["name"].ToString() == d.BuildName).Remove(); }
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); }
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(); }