Exemplo n.º 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);
            }
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 3
0
 private void GenerateOutputFileName()
 {
     if (AcceptingInput())
     {
         VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem;
         if (selectedVidDir != null)
         {
             tbOutputFileName.Text = fileConversionManager.UpdateOutputVideoFileName(selectedVidDir.FullPath);
             UpdateOutputFileName();
         }
     }
 }
Exemplo n.º 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();
         }
     }
 }
Exemplo n.º 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();
         }
     }
 }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
             }
         }
     }
 }
Exemplo n.º 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);
         }
     }
 }