Пример #1
0
 private void CommandBinding_Delete(object sender, RoutedEventArgs e)
 {
     if (!(datas.SelectedItem is BibaObject obj))
     {
         return;
     }
     if (!Current.CanWrite(obj))
     {
         MessageBox.Show("没有权限删除!");
         return;
     }
     objects.Remove(obj);
     ConfigUtil.DeleteObject(MainWindow.Data, obj);
     datas.Items.Refresh();
     MessageBox.Show("删除成功!");
 }