No Opinions...just code

'PASTE' action from clipboard

    1         private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
    2         {
    3             CurrentClipOp op = GetCutOrCopy();
    4             System.Collections.Specialized.StringCollection fileDropStrings;
    5             String currentlySelectedLocation = cboCurrentPath.Text;
    6             if (Clipboard.ContainsFileDropList())
    7             {
    8                 fileDropStrings = Clipboard.GetFileDropList();
    9             }
   10             else
   11             {
   12                 return;
   13             }
   14 
   15             if (op == CurrentClipOp.copy)
   16             {
   17                 //copy the file
   18 
   19                 for (Int32 x = 0; x <= fileDropStrings.Count - 1; x++)
   20                 {
   21                     CopyItem(fileDropStrings[x].ToString(), currentlySelectedLocation);
   22                 }
   23 
   24             }
   25             else if (op == CurrentClipOp.cut)
   26             {
MoveItem(fileDropStrings[x].ToString(), currentlySelectedLocation);
   27             }
   28             else
   29             {
   30             }
   31         }

0 comments: