Exemplo n.º 1
0
        private void btnCopyServer_Click(object sender, EventArgs e)
        {
            string   copyFilePath            = this.lvwVideos.SelectedItems[0].Tag.ToString();
            FileInfo fi                      = new FileInfo(copyFilePath);
            long     copyFileSize            = fi.Length;
            string   copyFileName            = fi.Name;
            string   copyFileDestinationPath = @"\\Videoserver\vs3 kids (f)\kids\";

            //MessageBox.Show(fileSize.ToString());
            //string strCFFilePathName = this.lvwVideos.SelectedItems[0].Tag.ToString();
            //string strCFFileName = this.lvwVideos.SelectedItems[0].Text.ToString();
            //string strExt = FileManipulation.GetFileExtension(strCFFilePathName, 0);

            if (File.Exists(@"\\Videoserver\vs3 kids (f)\kids\" + copyFileName))
            {
                MessageBox.Show("This File Already Exists", "File Copy Error");
            }
            else
            {
                frmProgressBar pg = new frmProgressBar(copyFileSize, copyFilePath, copyFileName, copyFileDestinationPath);
                pg.Show();

                pg.LoadVideos += new frmProgressBar.FillVideosRoot(FillVideos);
            }
        }
Exemplo n.º 2
0
        private void btnCopyFile_Click(object sender, EventArgs e)
        {
            string   copyFilePath            = this.lvwVideos.SelectedItems[0].Tag.ToString();
            FileInfo fi                      = new FileInfo(copyFilePath);
            long     copyFileSize            = fi.Length;
            string   copyFileName            = fi.Name;
            string   copyFileDestinationPath = @"c:\vm_videos\";

            //  MessageBox.Show(fi.Length.ToString() + " --- " + fileSize.ToString());
            //  string strCFFileName = this.lvwVideos.SelectedItems[0].Text.ToString();
            //  string strExt = FileManipulation.GetFileExtension(copyFilePath, 0);

            if (File.Exists(copyFileDestinationPath + copyFileName))
            {
                MessageBox.Show("This File Already Exists", "File Copy Error");
            }
            else
            {
                this.WriteDirectoryText(copyFileDestinationPath);

                frmProgressBar pg = new frmProgressBar(copyFileSize, copyFilePath, copyFileName, copyFileDestinationPath);
                pg.Show();

                pg.LoadVideos += new frmProgressBar.FillVideosRoot(FillVideos);
            }
        }