private void btnAdd_Click(object sender, EventArgs e)
 {
     FileFilterFrame dlg = new FileFilterFrame();
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         AddFileFilter(new FileFilter(
             dlg.FileFilterName, dlg.FileFilterFilter, dlg.FileFilterDefaultExt));
     }
 }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FileFilterFrame dlg = new FileFilterFrame();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                AddFileFilter(new FileFilter(
                                  dlg.FileFilterName, dlg.FileFilterFilter, dlg.FileFilterDefaultExt));
            }
        }
        private void btnEdit_Click(object sender, EventArgs e)
        {
            FileFilterFrame dlg = new FileFilterFrame();
            ListViewItem lvi = lvFilters.SelectedItems[0];
            FileFilter ff = lvi.Tag as FileFilter;

            dlg.FileFilterDefaultExt = ff.DefaultExt;
            dlg.FileFilterFilter = ff.Filter;
            dlg.FileFilterName = ff.Name;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                lvFilters.Items.Remove(lvi);
                AddFileFilter(new FileFilter(
                    dlg.FileFilterName, dlg.FileFilterFilter, dlg.FileFilterDefaultExt));
            }
        }
        private void btnEdit_Click(object sender, EventArgs e)
        {
            FileFilterFrame dlg = new FileFilterFrame();
            ListViewItem    lvi = lvFilters.SelectedItems[0];
            FileFilter      ff  = lvi.Tag as FileFilter;

            dlg.FileFilterDefaultExt = ff.DefaultExt;
            dlg.FileFilterFilter     = ff.Filter;
            dlg.FileFilterName       = ff.Name;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                lvFilters.Items.Remove(lvi);
                AddFileFilter(new FileFilter(
                                  dlg.FileFilterName, dlg.FileFilterFilter, dlg.FileFilterDefaultExt));
            }
        }