Inheritance: ViewModelBase
示例#1
0
        public WIDExportVM(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 == true || Tools.CurrentTeamProject != null) &&
                                                    (IsAllWorkItemTypes == true || Tools.CurrentWorkItemType != null) &&
                                                    !string.IsNullOrEmpty(Path)
                                                    )
                                                );

            #endregion
        }
        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 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
        }
        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
        }
示例#5
0
        public MainVM(ITfsServerService tfServerService, ToolsVM firstTools, ToolsVM secondTools)
        {
            this.FirstTools = firstTools;
            string firstToolsUrl = tfServerService.GetFirstServerUrl();
            this.FirstTools.Address = firstToolsUrl;
            this.FirstTools.SetAddressCommand.Execute(this);

            this.SecondTools = secondTools;
            string secondToolsUrl = tfServerService.GetSecondServerUrl();
            this.SecondTools.Address = secondToolsUrl;
            this.SecondTools.SetAddressCommand.Execute(this);
        }
示例#6
0
 public WIDViewerVM(ToolsVM tools)
     : base(tools)
 {
     ShowCommand = new DelegateCommand(async() =>
     {
         await Show();
     },
                                       () => (
                                           Tools.CurrentProjectCollection != null && Tools.CurrentTeamProject != null &&
                                           Tools.CurrentWorkItemType != null
                                           )
                                       );
 }
 public WIDViewerVM(ToolsVM tools)
     : base(tools)
 {
     ShowCommand = new DelegateCommand(async () =>
     {
         await Show();
     },
     () => (
         Tools.CurrentProjectCollection != null && Tools.CurrentTeamProject != null &&
         Tools.CurrentWorkItemType != null
         )
     );
 }
示例#8
0
 public ProcessConfigViewerVM(ToolsVM tools)
     : base(tools)
 {
     ShowCommand = new DelegateCommand(async() =>
     {
         await Show();
     },
                                       () =>
                                       (
                                           Tools.CurrentProjectCollection != null &&
                                           Tools.CurrentTeamProject != null
                                       )
                                       );
 }
示例#9
0
        public MainVM(ITfsServerService tfServerService, ToolsVM firstTools, ToolsVM secondTools)
        {
            this.FirstTools = firstTools;
            string firstToolsUrl = tfServerService.GetFirstServerUrl();

            this.FirstTools.Address = firstToolsUrl;
            this.FirstTools.SetAddressCommand.Execute(this);

            this.SecondTools = secondTools;
            string secondToolsUrl = tfServerService.GetSecondServerUrl();

            this.SecondTools.Address = secondToolsUrl;
            this.SecondTools.SetAddressCommand.Execute(this);
        }
 public ProcessConfigViewerVM(ToolsVM tools)
     : base(tools)
 {
     ShowCommand = new DelegateCommand(async () =>
     {
         await Show();
     },
     () =>
         (
         Tools.CurrentProjectCollection != null &&
         Tools.CurrentTeamProject != null
         )
     );
 }
示例#11
0
 public WIDDestroyVM(ToolsVM tools)
     : base(tools)
 {
     DestroyCommand = new DelegateCommand(async() =>
     {
         await Destroy();
     },
                                          () => (
                                              Tools.CurrentProjectCollection != null &&
                                              (IsAllTeamProjects == true || Tools.CurrentTeamProject != null) &&
                                              Tools.CurrentWorkItemType != null
                                              )
                                          );
 }
示例#12
0
 public WIDDestroyVM(ToolsVM tools)
     : base(tools)
 {
     DestroyCommand = new DelegateCommand(async () =>
     {
         await Destroy();
     },
     () => (
         Tools.CurrentProjectCollection != null &&
         (IsAllTeamProjects == true || Tools.CurrentTeamProject != null) &&
         Tools.CurrentWorkItemType != null
         )
     );
 }
示例#13
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)
                                             )
                                         );
 }
示例#14
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)
         )
     );
 }
示例#15
0
 public ToolsChildVM(ToolsVM tools)
 {
     this.Tools = tools;
 }
示例#16
0
 public ToolsChildVM(ToolsVM tools)
 {
     this.Tools = tools;
 }
示例#17
0
 public ProgressVM(ToolsVM tools)
     : base(tools)
 {
     _progressService = DiManager.Current.Resolve <IProgressService>();
 }
示例#18
0
 public ProgressVM(ToolsVM tools)
     : base(tools)
 {
     _progressService = DiManager.Current.Resolve<IProgressService>();
 }