示例#1
0
        private string GetDownloadFolderPath(string parentFolderPath)
        {
            var downloadFolderPath = _ioService.PathCombine(parentFolderPath, "Downloads");

            if (!_ioService.DirectoryExists(downloadFolderPath))
            {
                _ioService.CreateDirectory(downloadFolderPath);
            }
            return(downloadFolderPath);
        }
示例#2
0
        /// <inheritdoc />
        protected override void Execute(ApplicationDialogModel?viewModel, object?parameter)
        {
            if (!(viewModel?.Name is string applicationName))
            {
                return;
            }

            var directoryName = GetLogFolderPath(applicationName);

            if (!_ioService.DirectoryExists(directoryName))
            {
                _ioService.CreateDirectory(directoryName);
            }
            _uriService.OpenUri(directoryName);
        }
示例#3
0
 /// <inheritdoc />
 protected override bool CanExecute(InstallationResultDialogModel?viewModel, object?parameter)
 {
     return(viewModel != null && !String.IsNullOrEmpty(viewModel.LogFolderPath) && _ioService.DirectoryExists(viewModel.LogFolderPath));
 }