/// <summary>Parse</summary> /// <param name="tag">Zune Tag</param> private void Parse(string tag) { ZuneCard card = Parser.Card(tag); if (card != null) { if (Exists(tag)) { int position; ZuneCard previous = new ZuneCard(); previous = Get(tag); position = ZuneCards.IndexOf(previous); Remove(previous); ZuneCards.Insert(position, card); } else { ZuneCards.Add(card); } NotifyPropertyChanged(PROP_ZUNECARDS); NotifyPropertyChanged(PROP_ZUNECARD); Completed(this, EventArgs.Empty); } else { Failed(this, EventArgs.Empty); } }
/// <summary>Clear Tags</summary> public void Clear() { ZuneCard = null; ZuneCards.Clear(); Delete(); NotifyPropertyChanged(PROP_ZUNECARD); NotifyPropertyChanged(PROP_ZUNECARDS); }
/// <summary>Remove Tag</summary> /// <param name="card">Zune Card</param> public void Remove(ZuneCard card) { ZuneCards.Remove(card); NotifyPropertyChanged(PROP_ZUNECARD); NotifyPropertyChanged(PROP_ZUNECARDS); }