private void Playbtn_Click(object sender, EventArgs e) { int i = 0; //Display frame 0 for (i = 0; i <= this.TotalFrameNo; i++) { ObtCImagePro.DisplayFrame(i); } }
// Play Shot/SubShot button private void PlayShotbtn_Click(object sender, EventArgs e) { int i = 0; //Play Shot/SubShot for (i = TempSelectedStartFrame; i <= TempSelectedEndFrame; i++) { ObtCImagePro.DisplayFrame(i); } }
// Go to next frame private void NextFramebtn_Click(object sender, EventArgs e) { this.FrameNo += 1; string test; test = Convert.ToString(FrameNo); this.label3.Text = test; // display frame no this.label4.Text = test; //Display frame 0 ObtCImagePro.DisplayFrame(FrameNo); }
// Load Video Frames private void LoadVideobtn_Click(object sender, EventArgs e) { if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { this.Text = folderBrowserDialog1.SelectedPath; //CImageProcessing ObtCImagePro = new CImageProcessing(); int iFilesNumber = 0; // Pass folder name to ImageSequenceProcessing ObtCImagePro.SetFolder(folderBrowserDialog1.SelectedPath); // Process the list of files found in the directory and pass to ImageSequenceProcessing string[] fileEntries = Directory.GetFiles(folderBrowserDialog1.SelectedPath); string allFiles = ""; iFilesNumber = (int)fileEntries.LongLength; this.TotalFrameNo = iFilesNumber; foreach (string fileName in fileEntries) { // retrieve file names //string[] filename = fileName.Split('\\'); allFiles += fileName + ";"; Console.WriteLine(fileName); } ObtCImagePro.SetFileList(allFiles, iFilesNumber); // Set current frame no as 0 this.FrameNo = 0; // Display file name string test; test = Convert.ToString(FrameNo); this.label3.Text = test; // display frame no this.label4.Text = test; //Display frame 0 ObtCImagePro.DisplayFrame(FrameNo); Load_FrametoViewTree(fileEntries); Load_FrametoShotTreeViw(fileEntries); } }
private void JumpFramebtn_Click(object sender, EventArgs e) { string sFrameNo = textBox1.Text; this.FrameNo = Convert.ToInt32(sFrameNo); string test; test = Convert.ToString(FrameNo); this.label3.Text = test; // display frame no this.label4.Text = test; //Display frame X ObtCImagePro.DisplayFrame(FrameNo); }
// Back to previous frame private void PreFramebtn_Click(object sender, EventArgs e) { string Message = ""; string test; test = Convert.ToString(FrameNo); this.label3.Text = test; // display frame no this.label4.Text = test; if (this.FrameNo == 0) { Message = "It's currently display beginning frame"; } else { this.FrameNo -= 1; //Display frame 0 ObtCImagePro.DisplayFrame(FrameNo); } }
private void ShottreeView_AfterSelect_1(object sender, TreeViewEventArgs e) { //Display frame X ObtCImagePro.DisplayFrame(CompleteTreeView.Nodes[ShottreeView.SelectedNode.Index + TempSelectedStartFrame].Index); }
private void ShotTreeView_AfterSelect(object sender, TreeViewEventArgs e) { //Display frame X ObtCImagePro.DisplayFrame(CompleteTreeView.SelectedNode.Index); }