Ejemplo n.º 1
0
 /// <summary>
 /// Method to invoke when the OpenProject command is executed.
 /// </summary>
 private async Task OnOpenProjectExecuteAsync()
 {
     if (await _selectDirectoryService.DetermineDirectoryAsync())
     {
         await _messageService.ShowAsync("You have chosen " + _selectDirectoryService.DirectoryName);
     }
 }
Ejemplo n.º 2
0
 private async Task OnAddFolderExecute()
 {
     if (await _selectDirectoryService.DetermineDirectoryAsync())
     {
         VstDirectories.Add(new VstDirectory()
         {
             Path = _selectDirectoryService.DirectoryName
         });
     }
 }
        private async void DepotPathBtn_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            var result = await _selectDirectoryService.DetermineDirectoryAsync(
                new DetermineDirectoryContext()
                );

            if (result.Result)
            {
                _settingsManager.DepotPath = result.DirectoryName;
            }
        }
        private async void ProjectPathBtn_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            var result = await _selectDirectoryService.DetermineDirectoryAsync(
                new DetermineDirectoryContext()
                );

            if (result.Result)
            {
                (ViewModel as ProjectConfigurationViewModel).ProjectWizardModel.ProjectPath = result.DirectoryName;
            }
        }
Ejemplo n.º 5
0
        private async void ExecuteOpenProjectPath()
        {
            var result = await _selectDirectoryService.DetermineDirectoryAsync(
                new DetermineDirectoryContext()
                );

            if (result.Result)
            {
                ProjectPath = result.DirectoryName;
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Method to invoke when the OpenProject command is executed.
        /// </summary>
        private async Task OnOpenProjectExecuteAsync()
        {
            var result = await _selectDirectoryService.DetermineDirectoryAsync(new DetermineDirectoryContext
            {
                Title = "Select a project directory"
            });

            if (result.Result)
            {
                await _messageService.ShowAsync("You have chosen " + result.DirectoryName);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Method to invoke when the SelectOutputDirectory command is executed.
        /// </summary>
        private async Task OnSelectDirectoryExecuteAsync()
        {
            if (!string.IsNullOrEmpty(SelectedDirectory))
            {
                _selectDirectoryService.InitialDirectory = Path.GetFullPath(SelectedDirectory);
            }

            if (await _selectDirectoryService.DetermineDirectoryAsync())
            {
                SelectedDirectory = _selectDirectoryService.DirectoryName;
            }
        }
        /// <summary>
        /// Method to invoke when the SelectOutputDirectory command is executed.
        /// </summary>
        private async Task OnSelectDirectoryExecuteAsync()
        {
            string initialDirectory = null;

            if (!string.IsNullOrEmpty(SelectedDirectory))
            {
                initialDirectory = Path.GetFullPath(SelectedDirectory);
            }

            var result = await _selectDirectoryService.DetermineDirectoryAsync(new DetermineDirectoryContext
            {
                InitialDirectory = initialDirectory
            });

            if (result.Result)
            {
                SelectedDirectory = result.DirectoryName;
            }
        }
Ejemplo n.º 9
0
        private async Task OnAddAdditionalPresetFolderExecute()
        {
            try
            {
                if (await _selectDirectoryService.DetermineDirectoryAsync())
                {
                    var files = GetFxbFxpFiles(_selectDirectoryService.DirectoryName,
                                               new List <string> {
                        "*.fxp", "*.fxb"
                    });

                    await AddFxbFxpFiles(files);

                    ReanalyzePluginOnClose = true;
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex, "Failed to open file");
            }
        }
Ejemplo n.º 10
0
        private async Task OnAddFolderExecuteAsync()
        {
            var rootAppDataDir = _appDataService.GetRootAppDataFolder();

            _selectDirectoryService.Title            = "Select FolderNode's application data folder";
            _selectDirectoryService.InitialDirectory = rootAppDataDir;

            if (await _selectDirectoryService.DetermineDirectoryAsync())
            {
                var folder = _selectDirectoryService.DirectoryName;

                if (FileBrowser.RootDirectories.Any(x => string.Equals(x.FullName, folder)))
                {
                    await _messageService.ShowErrorAsync(string.Format("The directory {0} is already added", folder));

                    return;
                }

                _fileBrowserConfigurationService.AddFolder(folder);
            }
        }