Exemplo n.º 1
0
 //复制文件
 public void MoveFile(object sender, EventArgs e)
 {
     try
     {
         FileEx     fe;
         PathConfig fc;
         if (sender is ToolStripMenuItem)
         {
             fc = (sender as ToolStripMenuItem).Tag as PathConfig;
         }
         else
         {
             fc = (sender as Button).Tag as PathConfig;
         }
         fe            = new FileEx(fc);
         fe.FileMoved += new FileEx.Moved(fe_FileMoved);
         fe.MessageFg += new FileEx.FgMessage(fe_MessageFg);
         fe.Copy();
     }
     catch (Exception ex)
     {
         Message = "复制文件错误:" + ex.Message;
         MessageBox.Show(ex.Message, "复制文件错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
 //复制文件
 public void MoveFile(object sender, EventArgs e)
 {
     try
     {
         FileEx fe = new FileEx((sender as Button).Tag as PathConfig);
         fe.FileMoved += new FileEx.Moved(fe_FileMoved);
         fe.MessageFg += new FileEx.FgMessage(fe_MessageFg);
         fe.Copy();
     }
     catch (Exception ex)
     {
         Message = "复制文件错误:" + ex.Message;
     }
 }