Example #1
0
 /// <summary>
 /// Show a custom insert link dialog, and create the link.
 /// </summary>
 public void SelectLink()
 {
     using (LinkDialog dlg = new LinkDialog())
     {
         dlg.ShowDialog(this.ParentForm);
         if (!dlg.Accepted)
         {
             return;
         }
         string link = dlg.URI;
         if (link == null || link.Length == 0)
         {
             MessageBox.Show(this.ParentForm, "Invalid URL");
             return;
         }
         InsertLink(dlg.URL);
     }
 }
Example #2
0
 /// <summary>
 /// Show a custom insert link dialog, and create the link.
 /// </summary>
 public void SelectLink()
 {
     using (LinkDialog dlg = new LinkDialog())
     {
         dlg.ShowDialog(this.ParentForm);
         if (!dlg.Accepted) return;
         string link = dlg.URI;
         if (link == null || link.Length == 0)
         {
             MessageBox.Show(this.ParentForm, "Invalid URL");
             return;
         }
         InsertLink(dlg.URL);
     }
 }