예제 #1
0
 public EditCommand()
 {
     ExcuteHandler = () =>
     {
         IEntityIndex entity = GetArgument();
         if (entity == null)
         {
             return;
         }
         if (entity is FolderEntityIndex)
         {
             using (FolderEditView view = new FolderEditView())
             {
                 view.FormFolderEntity = ((FolderEntityIndex)entity).Folder;
                 view.ShowDialog();
             }
         }
         else if (entity is WindowEntityIndex)
         {
             WindowEntityIndex windowEntityIndex = (WindowEntityIndex)entity;
             ServiceUnity.WindowDesignService.OpenDesigner(windowEntityIndex.Window);
         }
         else
         {
             Debug.Assert(false, "未处理的 IEntityIndex 类型");
         }
     };
 }
예제 #2
0
 public AddFolderCommand()
 {
     ExcuteHandler = () =>
     {
         WindowFolderEntity folder   = GetArgument();
         string             folderId = String.Empty;
         if (folder != null)
         {
             folderId = folder.Id;
         }
         using (FolderEditView view = new FolderEditView(folderId))
         {
             view.ShowDialog();
         }
     };
 }
예제 #3
0
 public EditFolderCommand()
 {
     ExcuteHandler = () =>
     {
         WindowFolderEntity entity = GetArgument();
         if (entity == null)
         {
             Debug.Assert(false, "entity 为 null");
             return;
         }
         using (FolderEditView view = new FolderEditView())
         {
             view.FormFolderEntity = entity;
             view.ShowDialog();
         }
     };
 }