示例#1
0
        private void btnDeleteStorage_Click(object sender, EventArgs e)
        {
            if (StorageBox.SelectedIndex != -1)
            {
                controler.ListOfStorage.Remove((StorageUnit)StorageBox.SelectedItem);
                controler.Delete((StorageUnit)StorageBox.SelectedItem);
                StorageBox.Items.Remove(StorageBox.SelectedItem);

                StorageBox.SelectedItem = -1;
                StorageBox.Text         = String.Empty;
                dgwProducts.DataSource  = null;
                dgwProducts.Refresh();
            }
        }
示例#2
0
 private void DeleteEvent(long identifier)
 {
     _ctrl.Delete(identifier);
     _container.Bind(_ctrl.DirectoryMirrorList);
     save_button.Enabled = true;
 }