Exemplo n.º 1
0
        private void buttonSourceAdvanced_Click(object sender, EventArgs e)
        {
            // treeBrowerForm requires ignoredFiles and ignoredFolders to have absolute paths to avoid confusion
            // we use this.ignoredFilesFoldersBase
            // However, SOURCE-RELATIVE paths are returned, relative to treeBrowserForm.Source. We set ignoredFilesFoldersBase to this
            IEnumerable <string> ignoredFilesAbs   = this.ignoredFiles.Select(x => Path.Combine(this.ignoredFilesFoldersBase, x));
            IEnumerable <string> ignoredFoldersAbs = this.ignoredFolders.Select(x => Path.Combine(this.ignoredFilesFoldersBase, x));

            TreeBrowserForm treeBrowserForm = new TreeBrowserForm(this.textBoxSource.Text, this.textBoxIgnorePattern.Text, ignoredFilesAbs, ignoredFoldersAbs);

            treeBrowserForm.ShowDialog();
            if (treeBrowserForm.Saved)
            {
                this.textBoxSource.Text        = treeBrowserForm.Source;
                this.ignoredFilesFoldersBase   = treeBrowserForm.Source;
                this.textBoxIgnorePattern.Text = treeBrowserForm.IgnorePattern;
                this.ignoredFiles   = treeBrowserForm.IgnoredFiles;
                this.ignoredFolders = treeBrowserForm.IgnoredFolders;
            }
            treeBrowserForm.Close();
        }
Exemplo n.º 2
0
        private void buttonSourceAdvanced_Click(object sender, EventArgs e) {
            // treeBrowerForm requires ignoredFiles and ignoredFolders to have absolute paths to avoid confusion
            // we use this.ignoredFilesFoldersBase
            // However, SOURCE-RELATIVE paths are returned, relative to treeBrowserForm.Source. We set ignoredFilesFoldersBase to this
            IEnumerable<string> ignoredFilesAbs = this.ignoredFiles.Select(x => Path.Combine(this.ignoredFilesFoldersBase, x));
            IEnumerable<string> ignoredFoldersAbs = this.ignoredFolders.Select(x => Path.Combine(this.ignoredFilesFoldersBase, x));

            TreeBrowserForm treeBrowserForm = new TreeBrowserForm(this.textBoxSource.Text, this.textBoxIgnorePattern.Text, ignoredFilesAbs, ignoredFoldersAbs);
            treeBrowserForm.ShowDialog();
            if (treeBrowserForm.Saved) {
                this.textBoxSource.Text = treeBrowserForm.Source;
                this.ignoredFilesFoldersBase = treeBrowserForm.Source;
                this.textBoxIgnorePattern.Text = treeBrowserForm.IgnorePattern;
                this.ignoredFiles = treeBrowserForm.IgnoredFiles;
                this.ignoredFolders = treeBrowserForm.IgnoredFolders;
            }
            treeBrowserForm.Close();
        }