Ejemplo n.º 1
0
        // Save Shot configuration to config file
        private void SaveShotbtn_Click(object sender, EventArgs e)
        {
            //Stream myStream;
            saveFileDialog1.Filter           = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
            saveFileDialog1.FilterIndex      = 2;
            saveFileDialog1.RestoreDirectory = true;

            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                /*
                 * if ((myStream = saveFileDialog1.OpenFile()) != null)
                 * {
                 *  StreamWriter wText = new StreamWriter(myStream);
                 *
                 *  wText.Write(" your text");
                 *
                 *  myStream.Close();
                 * }
                 */
            }

            //Test();

            // Pass Shot Info Object
            ObtCImagePro.PassShotInfoToCPlusManaged(ObjShotInfo);

            ObtCImagePro.SaveShotToFileName(saveFileDialog1.FileName);
        }
Ejemplo n.º 2
0
        // 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);
            }
        }
Ejemplo n.º 3
0
        private void Playbtn_Click(object sender, EventArgs e)
        {
            int i = 0;

            //Display frame 0
            for (i = 0; i <= this.TotalFrameNo; i++)
            {
                ObtCImagePro.DisplayFrame(i);
            }
        }
Ejemplo n.º 4
0
        // Load Shot from config file
        private void LoadShotbtn_Click(object sender, EventArgs e)
        {
            // Init ObjShotInfo
            InitObjShotInfo();

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                ObtCImagePro.LoadShotFromFileName(openFileDialog1.FileName);
            }

            ObjShotInfo = ObtCImagePro.GetShotInfoToCSharp();

            // Update StructureTreeView
            UpdateStructureTreeView();
        }
Ejemplo n.º 5
0
        // 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);
        }
Ejemplo n.º 6
0
        // 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);
            }
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        // 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);
            }
        }
Ejemplo n.º 9
0
 private void ShottreeView_AfterSelect_1(object sender, TreeViewEventArgs e)
 {
     //Display frame X
     ObtCImagePro.DisplayFrame(CompleteTreeView.Nodes[ShottreeView.SelectedNode.Index + TempSelectedStartFrame].Index);
 }
Ejemplo n.º 10
0
 private void ShotTreeView_AfterSelect(object sender, TreeViewEventArgs e)
 {
     //Display frame X
     ObtCImagePro.DisplayFrame(CompleteTreeView.SelectedNode.Index);
 }