コード例 #1
0
        private void DeleteBtn_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection sel = EntrySelector.SelectedItems;

            foreach (ListViewItem item in sel)
            {
                try
                {
                    _source.RemoveEntry(item.SubItems[0].Text, true, true);
                }
                catch (ArgumentOutOfRangeException)
                {
                    MessageBox.Show("Attempted to remove a non-existent element from a list");
                    Console.WriteLine("Attempted to remove a non-existent element from a list");
                }
            }
            _paintList(_source.GetList());
        }
コード例 #2
0
 public EntryCollectionEditor(EntryRecord source)
 {
     _source = source;
     name    = source.Filename;
     InitializeComponent();
     Text = source.Filename;
     _paintList(source.GetList());
     EntrySelector.SelectedIndexChanged += EntrySelector_SelectedIndexChanged;
     //EntrySelector;
 }