public void RemoveChampion(Model.Champion champion_) { if (!loaded) { return; } if (!ChampionList.Contains(champion_)) { return; } App.Server.Request( HTTPMethods.Delete, "champion/" + champion_.Json["_id"], (JSONNode json_) => { ChampionList.Remove(champion_); foreach (var almostJson in Json["champions"].AsArray) { if (almostJson.Value["_id"] == champion_.Json["_id"]) { Json["champions"].AsArray.Remove(almostJson.Value); break; } } ChampionRemoved(champion_); }).Send(); }
private void txtNewChampion_TextChanged(object sender, TextChangedEventArgs e) { if (_allChamps.Contains(txtNewChampionName.Text)) { btnAddChampion.IsEnabled = false; } else { btnAddChampion.IsEnabled = true; } }
public void ActivateChampion(Model.Champion champion_) { if (!loaded) { return; } if (champion_ == null || !ChampionList.Contains(champion_)) { return; } if (ActiveChampion != null) { ActiveChampion.Detach(); } ActiveChampion = champion_; ActiveChampionChanged(); }