示例#1
0
 public void NewPieceCmdExecute()
 {
     EditPieceDialog dlg = new EditPieceDialog();
     EditPieceVM vm = new EditPieceVM();
     dlg.DataContext = vm;
     dlg.Show();
 }
示例#2
0
 public void MouseDoubleClickCmdExecute(MouseButtonEventArgs args)
 {
     if (selectedPiece != null && (args == null || args.ChangedButton == MouseButton.Left))
     {
         EditPieceDialog dlg = new EditPieceDialog();
         EditPieceVM vm = new EditPieceVM(selectedPiece.ID);
         dlg.DataContext = vm;
         dlg.Show();
     }
 }