private void GenerateTimecodes() { String videoFile = txtVideoFile.Text; Stopwatch actime = new Stopwatch(); using (Kienzan kienz = new Kienzan()) { //Create the thread Thread genTcThread = new Thread(new ParameterizedThreadStart(kienz.GenerateTimecodesThreaded)); //Start timing actime.Start(); //Start the thread genTcThread.Start(videoFile); //Wait for the thread to finish while keeping UI responsive while (genTcThread.ThreadState != System.Threading.ThreadState.Stopped) { Application.DoEvents(); } //Stop timing actime.Stop(); //Set the timecodes file txtTimecodesFile.Text = kienz.TimecodesFile; if (!kienz.Failed) { ShowSuccessMessage("Successfully generated timecodes!"); } } }
private void ResetAll() { _Kienzan.Dispose(); _Kienzan = new Kienzan(); txtDuplicatesFile.Text = ""; txtSectionsFile.Text = ""; txtTimecodesFile.Text = ""; txtVideoFile.Text = ""; fillComboFramerate(); }
private void CreateMeGUIScript() { using (Kienzan kienz = new Kienzan()) { //Check prerequisites //Select filename String filename = txtMeguiCutsFile.Text; Stopwatch actime = new Stopwatch(); kienz.LoadTimecodes(txtTimecodesFile.Text); kienz.LoadSections(txtSectionsFile.Text); if (filename != null) { if (filename.Length > 0) { //Create the thread Thread createMeGUIThread = new Thread(new ParameterizedThreadStart(kienz.CreateMeGUIScriptThreaded)); kienz.TargetFramerate = AcHelper.DecimalParse(Convert.ToString(cmbFrameRate.SelectedItem)); //Start timing actime.Start(); //Start the thread createMeGUIThread.Start(filename); //Wait for the thread to finish while keeping UI responsive while (createMeGUIThread.ThreadState != System.Threading.ThreadState.Stopped) { Application.DoEvents(); } //End timing actime.Stop(); if (!kienz.Failed) { ShowSuccessMessage("Successfully created MeGUI Cut File!"); } } } } }