Exemplo n.º 1
0
        private void btnCopyZip_Click(object sender, EventArgs e)
        {
            lblFileCopyInformation.Text = "";
            string startPath   = txtSource.Text;
            string extractPath = txtDestination.Text;

            CopyDirectory.FileCopyFacility cf = new CopyDirectory.FileCopyFacility();
            int result = cf.ZipCopyFolder(startPath, extractPath);

            if (result == 0)
            {
                lblFileCopyInformation.Text += "File Copy successfull ..";
            }
            else
            {
                lblFileCopyInformation.Text += cf.message;
            }
        }
Exemplo n.º 2
0
        private void btnXCopy_Click(object sender, EventArgs e)
        {
            lblFileCopyInformation.Text = "";
            string source      = txtSource.Text;
            string destination = txtDestination.Text;

            CopyDirectory.FileCopyFacility cf = new CopyDirectory.FileCopyFacility();
            int result = cf.XCopyFolder(source, destination);

            if (result == 0)
            {
                lblFileCopyInformation.Text += "File Copy successfull ..";
            }
            else
            {
                lblFileCopyInformation.Text += cf.message;
            }
        }
Exemplo n.º 3
0
        private void btnCopy_Click(object sender, EventArgs e)
        {
            lblFileCopyInformation.Text = "";
            string source      = txtSource.Text;
            string destination = txtDestination.Text;

            CopyDirectory.FileCopyFacility cf = new CopyDirectory.FileCopyFacility();
            int result = cf.DirectoryCopy(@source, @destination, true);

            if (result == 0)
            {
                lblFileCopyInformation.Text += "File Copy successfull ..";

                lsbFileInfo.Items.Clear();
                lsbFileInfo.DataSource = cf._listFiles;
            }
            else
            {
                lblFileCopyInformation.Text += cf.message;
            }
        }