コード例 #1
0
ファイル: ViewModelService.cs プロジェクト: nkristek/Stein
        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));
 }