Beispiel #1
0
 private void HandleAddEvent(object sender, SongEventArgs e)
 {
     if (filter(e.Song))
     {
         AddSongItem(e.Song);
     }
 }
Beispiel #2
0
        private void HandleDeleteEvent(object sender, SongEventArgs e)
        {
            ListViewItem item = FindListViewItem(e.Song);

            if (item != null)
            {
                this.listViewBase.Items.Remove(item);
                this.ElementCountLabel.Text = this.listViewBase.Items.Count.ToString();
            }
        }
Beispiel #3
0
        private void HandleEditEvent(object sender, SongEventArgs e)
        {
            ListViewItem item = FindListViewItem(e.Song);

            if (filter(e.Song))
            {
                if (item != null)
                {
                    UpdateItem(item);
                }
                else
                {
                    AddSongItem(e.Song);
                }
            }
            else
            {
                if (item != null)
                {
                    this.listViewBase.Items.Remove(item);
                }
            }
        }