Exemplo n.º 1
0
        /// <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);
            }
        }
Exemplo n.º 2
0
 /// <summary>Clear Tags</summary>
 public void Clear()
 {
     ZuneCard = null;
     ZuneCards.Clear();
     Delete();
     NotifyPropertyChanged(PROP_ZUNECARD);
     NotifyPropertyChanged(PROP_ZUNECARDS);
 }
Exemplo n.º 3
0
 /// <summary>Remove Tag</summary>
 /// <param name="card">Zune Card</param>
 public void Remove(ZuneCard card)
 {
     ZuneCards.Remove(card);
     NotifyPropertyChanged(PROP_ZUNECARD);
     NotifyPropertyChanged(PROP_ZUNECARDS);
 }