Example #1
0
 private void lvwList_DragDrop(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(DataFormats.Text))
     {
         string text = e.Data.GetData(DataFormats.Text).ToString();
         if (LiquipediaClient.IsValidLiquipediaLink(text))
         {
             NewSource(text, true);
         }
     }
 }
Example #2
0
 private void lvwList_DragEnter(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(DataFormats.Text))
     {
         string text = e.Data.GetData(DataFormats.Text).ToString();
         if (LiquipediaClient.IsValidLiquipediaLink(text))
         {
             e.Effect = DragDropEffects.Link;
         }
         else
         {
             e.Effect = DragDropEffects.None;
         }
     }
     else
     {
         e.Effect = DragDropEffects.None;
     }
 }