private static void listItemFly_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { var dropitems = ((string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop)); if (dropitems.IsEmptyStrings()) return; foreach (var dropitem in dropitems) { var dropinfo = new System.IO.FileInfo(dropitem); if (dropinfo.Extension.ToLower() != ".torrent") continue; var listitem = new App.Style.ShareItemBarPal(); var listitemcell = new App.Style.ShareItemBarBase(dropinfo.Name); listitem.Controls.Add(listitemcell); Load.ShareItemFly.Controls.Add(listitem); listitemcell.MouseClick += listitemcell_MouseClick; } }
private static void listItemFly_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { var dropitems = ((string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop)); if (dropitems.IsEmptyStrings()) { return; } foreach (var dropitem in dropitems) { var dropinfo = new System.IO.FileInfo(dropitem); if (dropinfo.Extension.ToLower() != ".torrent") { continue; } var listitem = new App.Style.ShareItemBarPal(); var listitemcell = new App.Style.ShareItemBarBase(dropinfo.Name); listitem.Controls.Add(listitemcell); Load.ShareItemFly.Controls.Add(listitem); listitemcell.MouseClick += listitemcell_MouseClick; } }