private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem; if (selectedVidDir != null) { VideoData vd = fileConversionManager.GetVideoDataFromDirectory(selectedVidDir.FullPath); UpdateVideoDataDetails(vd); } }
private void TBTestName_TextChanged(object sender, EventArgs e) { VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem; if (selectedVidDir != null) { fileConversionManager.UpdateTestName(selectedVidDir.FullPath, TBTestName.Text); GenerateOutputFileName(); } }
private void GenerateOutputFileName() { if (AcceptingInput()) { VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem; if (selectedVidDir != null) { tbOutputFileName.Text = fileConversionManager.UpdateOutputVideoFileName(selectedVidDir.FullPath); UpdateOutputFileName(); } } }
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(); } } }
private void UpdatePatiantName() { if (AcceptingInput()) { VideoDirectory selectedVidDir = (VideoDirectory)lBDirectories.SelectedItem; if (selectedVidDir != null && !String.IsNullOrEmpty(tbPatientName.Text)) { fileConversionManager.UpdatePatientName(selectedVidDir.FullPath, tbPatientName.Text); GenerateOutputFileName(); } } }
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(); } }
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(); } } } }
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); } } }