public FilterEdit()
        {
            InitializeComponent();

            Filter f = new Filter();
            edtExt.Text = f.Extensions;
            //edtDirectory.Text = f.TargetDir;
            edtFilename.Text = f.FileNameMask;
        }
 private void button1_Click(object sender, EventArgs e)
 {
     filter = new Filter();
     filter.Extensions = edtExt.Text;
     filter.FileNameMask = edtFilename.Text;
     filter.TargetDir = edtDirectory.Text;
     if (rbCopy.Checked)
         filter.Action = RuleAction.Copy;
     else
         filter.Action = RuleAction.Move;
     Close();
 }