コード例 #1
0
        public CategoriesExportVM(ToolsVM tools, IDialogProvider dialogProvider)
            : base(tools)
        {
            this._dialogProvider = dialogProvider;

            #region Commands

            BrowseCommand = new DelegateCommand(() =>
            {
                string path = dialogProvider.OpenBrowseDialog();
                Path = path;
            });

            ExportCommand = new DelegateCommand(async () =>
            {
                await Export();
            },
            () => (
                Tools.CurrentProjectCollection != null &&
                (IsAllTeamProjects || Tools.CurrentTeamProject != null) &&
                !string.IsNullOrEmpty(Path)
                )
            );

            #endregion
        }
コード例 #2
0
        public WIDImportVM(ToolsVM tools, IDialogProvider dialogProvider)
            : base(tools)
        {
            this._dialogProvider = dialogProvider;

            #region Commands

            BrowseCommand = new DelegateCommand(() =>
            {
                string fileName = _dialogProvider.OpenFileDialog();
                FileName = fileName;
            });

            ImportCommand = new DelegateCommand(async () =>
            {
                await Import();
            },
            () => (
                Tools.CurrentProjectCollection != null &&
                (IsAllTeamProjects == true || Tools.CurrentTeamProject != null) &&
                !string.IsNullOrEmpty(FileName)
                )
            );

            #endregion
        }
コード例 #3
0
 public WIDViewerVM(ToolsVM tools)
     : base(tools)
 {
     ShowCommand = new DelegateCommand(async () =>
     {
         await Show();
     },
     () => (
         Tools.CurrentProjectCollection != null && Tools.CurrentTeamProject != null &&
         Tools.CurrentWorkItemType != null
         )
     );
 }
コード例 #4
0
 public WIDRenameVM(ToolsVM tools)
     : base(tools)
 {
     RenameCommand = new DelegateCommand(async () =>
     {
         await Rename();
     },
     () => (
         Tools.CurrentProjectCollection != null &&
         (IsAllTeamProjects == true || Tools.CurrentTeamProject != null) &&
         Tools.CurrentWorkItemType != null &&
         !string.IsNullOrEmpty(NewName)
         )
     );
 }