void ExecuteLoadArmasCommand() { if (IsBusy) { return; } IsBusy = true; try { Armas.Clear(); foreach (var item in (new ArmaService()).GetArmas()) { Armas.Add(new Tuple <int, string>(item.Key, item.Value)); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
public void getArma(Arma arma) { Armas.Add(arma); ArmaActiva = arma; //recupera un arma }