コード例 #1
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;

            if (selectedVidDir != null)
            {
                VideoData vd = fileConversionManager.GetVideoDataFromDirectory(selectedVidDir.FullPath);
                UpdateVideoDataDetails(vd);
            }
        }
コード例 #2
0
        private void TBTestName_TextChanged(object sender, EventArgs e)
        {
            VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;

            if (selectedVidDir != null)
            {
                fileConversionManager.UpdateTestName(selectedVidDir.FullPath, TBTestName.Text);
                GenerateOutputFileName();
            }
        }
コード例 #3
0
 private void GenerateOutputFileName()
 {
     if (AcceptingInput())
     {
         VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;
         if (selectedVidDir != null)
         {
             tbOutputFileName.Text = fileConversionManager.UpdateOutputVideoFileName(selectedVidDir.FullPath);
             UpdateOutputFileName();
         }
     }
 }
コード例 #4
0
 private void datePicker_ValueChanged(object sender, EventArgs e)
 {
     if (AcceptingInput())
     {
         VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;
         if (selectedVidDir != null)
         {
             fileConversionManager.UpdateVidieoDate(selectedVidDir.FullPath, datePicker.Value);
             GenerateOutputFileName();
         }
     }
 }
コード例 #5
0
 private void UpdatePatiantName()
 {
     if (AcceptingInput())
     {
         VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;
         if (selectedVidDir != null && !String.IsNullOrEmpty(tbPatientName.Text))
         {
             fileConversionManager.UpdatePatientName(selectedVidDir.FullPath, tbPatientName.Text);
             GenerateOutputFileName();
         }
     }
 }
コード例 #6
0
 private void AddNewDirectoryAndFilesToLists(string dirName)
 {
     if (AcceptingInput())
     {
         VideoDirectory newVidDir = new VideoDirectory(dirName);
         lBDirectories.Items.Add(newVidDir);
         lBDirectories.SelectedItem = newVidDir;
         // We will get an update for each major conversion step completed for each output video
         progressBar.Maximum = fileConversionManager.GetTotalNumberOfConversionSteps();
         GenerateOutputFileName();
     }
 }
コード例 #7
0
 private void btnRemoveDir_Click(object sender, EventArgs e)
 {
     if (AcceptingInput())
     {
         VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;
         if (selectedVidDir != null)
         {
             if (fileConversionManager.DeleteFileConverter(selectedVidDir.FullPath))
             {
                 lBDirectories.Items.Remove(selectedVidDir);
                 progressBar.Maximum = fileConversionManager.GetTotalNumberOfConversionSteps();
             }
         }
     }
 }
コード例 #8
0
 private void UpdateOutputFileName()
 {
     if (AcceptingInput())
     {
         Regex regex = new Regex(@".+\.avi");
         Match match = regex.Match(tbOutputFileName.Text);
         if (!String.IsNullOrEmpty(tbOutputFileName.Text))
         {
             if (!match.Success)
             {
                 tbOutputFileName.Text = tbOutputFileName.Text + ".avi";
             }
         }
         VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;
         if (selectedVidDir != null)
         {
             fileConversionManager.UpdateOutputVideoFileName(selectedVidDir.FullPath, tbOutputFileName.Text);
         }
     }
 }