Exemple #1
0
 /// <summary>
 /// Handles the Click event of the ExcludeFolderButton control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void ExcludeFolderButton_Click(object sender, EventArgs e)
 {
     folderBrowserDialog.Description = Strings.FilterEditor.ExcludeFolderBrowseTitle;
     if (folderBrowserDialog.ShowDialog(this) == DialogResult.OK)
     {
         string path = Duplicati.Library.Utility.Utility.AppendDirSeparator(folderBrowserDialog.SelectedPath);
         FilterDialog.FilterEntry fe = new FilterDialog.FilterEntry(false, Duplicati.Library.Utility.FilenameFilter.ConvertGlobbingToRegExp(path), path);
         listView.Items.Add(fe.CreateListViewItem());
         FilenameTester_TextChanged(sender, e);
     }
 }
Exemple #2
0
 /// <summary>
 /// Handles the Click event of the IncludeFolderButton control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void IncludeFolderButton_Click(object sender, EventArgs e)
 {
     folderBrowserDialog.Description = Strings.FilterEditor.IncludeFolderBrowseTitle;
     if (folderBrowserDialog.ShowDialog(this) == DialogResult.OK)
     {
         string path = Duplicati.Library.Utility.Utility.AppendDirSeparator(folderBrowserDialog.SelectedPath);
         FilterDialog.FilterEntry fe = new FilterDialog.FilterEntry(true, Duplicati.Library.Utility.FilenameFilter.ConvertGlobbingToRegExp(path), path);
         listView.Items.Add(fe.CreateListViewItem());
         FilenameTester_TextChanged(sender, e);
     }
 }
 void AddFilter(bool include, string filter)
 {
     FilterDialog.FilterEntry fe = new FilterDialog.FilterEntry(include, FilenameFilter.ConvertGlobbingToRegExp(filter), filter);
     lvFilters.Items.Add(fe.CreateListViewItem());
 }