private void btnAddClipboardFormat_Click(object sender, EventArgs e)
 {
     using (ClipboardFormatForm form = new ClipboardFormatForm())
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             ClipboardFormat cf = form.ClipboardFormat;
             Program.Settings.ClipboardContentFormats.Add(cf);
             AddClipboardFormat(cf);
         }
     }
 }
 private void btnAddClipboardFormat_Click(object sender, EventArgs e)
 {
     using (ClipboardFormatForm form = new ClipboardFormatForm())
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             ClipboardFormat cf = form.ClipboardFormat;
             Program.Settings.ClipboardContentFormats.Add(cf);
             AddClipboardFormat(cf);
         }
     }
 }
 private void ClipboardFormatsEditSelected()
 {
     if (lvClipboardFormats.SelectedItems.Count > 0)
     {
         ListViewItem    lvi = lvClipboardFormats.SelectedItems[0];
         ClipboardFormat cf  = lvi.Tag as ClipboardFormat;
         using (ClipboardFormatForm form = new ClipboardFormatForm(cf))
         {
             if (form.ShowDialog() == DialogResult.OK)
             {
                 lvi.Text             = form.ClipboardFormat.Description ?? "";
                 lvi.Tag              = form.ClipboardFormat;
                 lvi.SubItems[1].Text = form.ClipboardFormat.Format ?? "";
             }
         }
     }
 }
 private void ClipboardFormatsEditSelected()
 {
     if (lvClipboardFormats.SelectedItems.Count > 0)
     {
         ListViewItem lvi = lvClipboardFormats.SelectedItems[0];
         ClipboardFormat cf = lvi.Tag as ClipboardFormat;
         using (ClipboardFormatForm form = new ClipboardFormatForm(cf))
         {
             if (form.ShowDialog() == DialogResult.OK)
             {
                 lvi.Text = form.ClipboardFormat.Description ?? "";
                 lvi.Tag = form.ClipboardFormat;
                 lvi.SubItems[1].Text = form.ClipboardFormat.Format ?? "";
             }
         }
     }
 }