示例#1
0
        private void AddSubShotBtn_Click(object sender, EventArgs e)
        {
            // Add the subShot
            AddSubShot(ShotCbox.SelectedIndex, 0, Convert.ToInt32(StartSubShotFramebtn.Text), Convert.ToInt32(EndSubShotFramebtn.Text));

            // Update the message
            string message = "Shot ";

            message += ShotCbox.SelectedIndex.ToString();
            message += " SubShot ";
            message += SubShotCBox.Items.Count.ToString();
            message += " from Frame ";
            message += StartSubShotFramebtn.Text;
            message += " to ";
            message += EndSubShotFramebtn.Text;
            message += " added";

            MessageBox.Show(message, "Shot Created Information",
                            MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            TempShot.subShotList = new ArrayList();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotCbox.SelectedIndex]);

            SubShotCBox.Items.Add(TempShot.subShotList.Count - 1);

            // Update StructureTreeView
            UpdateStructureTreeView();
        }
示例#2
0
        // Add SubShot
        private void AddSubShot(int ShotNo, int shotType, int start, int end)
        {
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            // Create a temp SubShot and assign value
            SubShotManaged TempSubShot = new SubShotManaged();

            TempSubShot.shotType = shotType;
            TempSubShot.start    = start;
            TempSubShot.end      = end;

            // Retrive current shot parameter and copy to temp shot object
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);


            // Remove first dummy shot if subshot count = 0
            if (TempShot.subShotCount == 0)
            {
                TempShot.subShotList.RemoveAt(TempShot.subShotList.Count - 1);
            }

            // Add temp subshot to temp shot object
            TempShot.subShotList.Add(TempSubShot);

            TempShot.subShotCount = TempShot.subShotList.Count;

            ObjShotInfo.shotList[ShotNo] = TempShot;
        }
示例#3
0
        // Add SubShot
        private void AddSubShot(int ShotNo, int shotType, int start, int end)
        {
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            // Create a temp SubShot and assign value
            SubShotManaged TempSubShot = new SubShotManaged();

            TempSubShot.shotType = shotType;
            TempSubShot.start = start;
            TempSubShot.end = end;

            // Retrive current shot parameter and copy to temp shot object
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

            // Remove first dummy shot if subshot count = 0
            if (TempShot.subShotCount == 0)
                TempShot.subShotList.RemoveAt(TempShot.subShotList.Count-1);

            // Add temp subshot to temp shot object
            TempShot.subShotList.Add(TempSubShot);

            TempShot.subShotCount = TempShot.subShotList.Count;

            ObjShotInfo.shotList[ShotNo] = TempShot;
        }
示例#4
0
        // Remove Last SubShot
        private void RemoveSubShot(int ShotNo)
        {
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            // Retrive current shot parameter and copy to temp shot object
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

            TempShot.subShotList.RemoveAt(TempShot.subShotList.Count - 1);
            TempShot.subShotCount = TempShot.subShotList.Count;

            ObjShotInfo.shotList[ShotNo] = TempShot;
        }
示例#5
0
        private void UpdateShottreeView(int ShotNo, int SubShotNo)
        {
            int FrameNo = 0;

            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            TempShot.subShotList = new ArrayList();

            // Create a temp SubShot and assign value
            SubShotManaged TempSubShot = new SubShotManaged();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

            if (SubShotNo != -99)
            {
                // Retrive current sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[SubShotNo];

                // Update Temp start frame
                TempSelectedStartFrame = TempSubShot.start;
                TempSelectedEndFrame   = TempSubShot.end;
            }
            else
            {
                // Retrive 0 sub shot information, start frame
                TempSubShot = (SubShotManaged)TempShot.subShotList[0];

                TempSelectedStartFrame = TempSubShot.start;

                // Retrive last sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[TempShot.subShotList.Count - 1];

                TempSelectedEndFrame = TempSubShot.end;
            }


            // Clear up
            ShottreeView.Nodes.Clear();

            //Display frame 0
            for (FrameNo = TempSelectedStartFrame; FrameNo <= TempSelectedEndFrame; FrameNo++)
            {
                ShottreeView.Nodes.Add(CompleteTreeView.Nodes[FrameNo].Text);
            }
        }
示例#6
0
        // Update StructureTreeView
        private void UpdateStructureTreeView()
        {
            string sShot     = "Shot";
            string sSubShot  = "SubShot";
            int    ShotNo    = 0;
            int    SubShotNo = 0;

            //Clear Up
            StructureTreeView.Nodes.Clear();

            // Get Shot , SubShot and Iterate on each

            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            TempShot.subShotList = new ArrayList();

            // Iterate Shot and uppdate to tree view
            for (ShotNo = 0; ShotNo < ObjShotInfo.shotList.Count; ShotNo++)
            {
                // Tree Node
                TreeNode ShotTreeNode = new TreeNode(sShot += ShotNo.ToString());

                // Get Shot Object
                TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

                // Iterate SubShot and uppdate to tree view
                for (SubShotNo = 0; SubShotNo < TempShot.subShotList.Count; SubShotNo++)
                {
                    // Add subShot Tree Node
                    ShotTreeNode.Nodes.Add(sSubShot += SubShotNo.ToString());

                    // init sSubShot
                    sSubShot = "SubShot";
                }


                StructureTreeView.Nodes.Add(ShotTreeNode);

                // Init sShot
                sShot = "Shot";
            }
        }
示例#7
0
        // Add Shot
        private void AddShot()
        {
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            // Create Shotlist array
            ObjShotInfo.shotList.Add(new ShotManaged());

            ObjShotInfo.shotCount = ObjShotInfo.shotList.Count;

            // Add Dummy SubShot for initialization purpose
            // Initialize SubShotList, it's important
            TempShot.subShotList = new ArrayList();

            // Add temp subshot to temp shot object
            TempShot.subShotList.Add(new SubShotManaged());

            // Store back to Shotlist
            ObjShotInfo.shotList[ObjShotInfo.shotList.Count - 1] = TempShot;
        }
示例#8
0
        // Add Shot
        private void AddShot()
        {
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            // Create Shotlist array
            ObjShotInfo.shotList.Add(new ShotManaged());

            ObjShotInfo.shotCount = ObjShotInfo.shotList.Count;

            // Add Dummy SubShot for initialization purpose
            // Initialize SubShotList, it's important
            TempShot.subShotList = new ArrayList();

            // Add temp subshot to temp shot object
            TempShot.subShotList.Add(new SubShotManaged());

            // Store back to Shotlist
            ObjShotInfo.shotList[ObjShotInfo.shotList.Count-1] = TempShot;
        }
示例#9
0
        // Change display of shot\subshot item number
        private void ShotCbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            int i = 0;

            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            TempShot.subShotList = new ArrayList();
            SubShotManaged TempSubShot = new SubShotManaged();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotCbox.SelectedIndex]);

            // Clean up old data
            SubShotCBox.Items.Clear();

            // Update SubShot Combo box
            for (i = 0; i < TempShot.subShotCount; i++)
            {
                SubShotCBox.Items.Add(i);
            }
        }
示例#10
0
        // Update Type, Start & Frame
        private void UpdateStartEndFrameText(int ShotNo, int SubShotNo)
        {
            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            TempShot.subShotList = new ArrayList();

            // Create a temp SubShot and assign value
            SubShotManaged TempSubShot = new SubShotManaged();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

            if (SubShotNo != -99)
            {
                // Retrive current sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[SubShotNo];

                // Update Text
                StartSubShotFramebtn.Text = TempSubShot.start.ToString();
                EndSubShotFramebtn.Text   = TempSubShot.end.ToString();
            }
            else
            {
                // Retrive 0 sub shot information and its start frame
                TempSubShot = (SubShotManaged)TempShot.subShotList[0];

                // Update Text
                StartSubShotFramebtn.Text = TempSubShot.start.ToString();

                // Retrive last sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[TempShot.subShotList.Count - 1];

                EndSubShotFramebtn.Text = TempSubShot.end.ToString();
            }
        }
示例#11
0
        private void AddSubShotBtn_Click(object sender, EventArgs e)
        {
            // Add the subShot
            AddSubShot(ShotCbox.SelectedIndex, 0 , Convert.ToInt32(StartSubShotFramebtn.Text), Convert.ToInt32(EndSubShotFramebtn.Text));

            // Update the message
            string message = "Shot ";
            message += ShotCbox.SelectedIndex.ToString();
            message += " SubShot ";
            message += SubShotCBox.Items.Count.ToString();
            message += " from Frame ";
            message += StartSubShotFramebtn.Text;
            message += " to ";
            message += EndSubShotFramebtn.Text;
            message += " added";

            MessageBox.Show(message, "Shot Created Information",
            MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();
            TempShot.subShotList = new ArrayList();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotCbox.SelectedIndex]);

            SubShotCBox.Items.Add(TempShot.subShotList.Count - 1);

            // Update StructureTreeView
            UpdateStructureTreeView();
        }
示例#12
0
        // Update StructureTreeView
        private void UpdateStructureTreeView()
        {
            string sShot = "Shot";
            string sSubShot = "SubShot";
            int ShotNo = 0 ;
            int SubShotNo = 0;

            //Clear Up
            StructureTreeView.Nodes.Clear();

            // Get Shot , SubShot and Iterate on each

            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();
            TempShot.subShotList = new ArrayList();

             // Iterate Shot and uppdate to tree view
            for(ShotNo =0; ShotNo< ObjShotInfo.shotList.Count; ShotNo++)
            {
                 // Tree Node
                 TreeNode ShotTreeNode = new TreeNode(sShot += ShotNo.ToString());

                 // Get Shot Object
                 TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

                 // Iterate SubShot and uppdate to tree view
                 for(SubShotNo =0; SubShotNo < TempShot.subShotList.Count; SubShotNo++)
                 {
                     // Add subShot Tree Node
                     ShotTreeNode.Nodes.Add(sSubShot += SubShotNo.ToString());

                     // init sSubShot
                     sSubShot = "SubShot";
                 }

                 StructureTreeView.Nodes.Add(ShotTreeNode);

                 // Init sShot
                 sShot = "Shot";

            }
        }
示例#13
0
        // Update Type, Start & Frame
        private void UpdateStartEndFrameText(int ShotNo, int SubShotNo)
        {
            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();
            TempShot.subShotList = new ArrayList();

            // Create a temp SubShot and assign value
            SubShotManaged TempSubShot = new SubShotManaged();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

            if (SubShotNo != -99)
            {
                // Retrive current sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[SubShotNo];

                // Update Text
                StartSubShotFramebtn.Text = TempSubShot.start.ToString();
                EndSubShotFramebtn.Text = TempSubShot.end.ToString();

            }
            else
            {
                // Retrive 0 sub shot information and its start frame
                TempSubShot = (SubShotManaged)TempShot.subShotList[0];

                // Update Text
                StartSubShotFramebtn.Text = TempSubShot.start.ToString();

                // Retrive last sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[TempShot.subShotList.Count-1];

                EndSubShotFramebtn.Text = TempSubShot.end.ToString();

            }
        }
示例#14
0
        private void UpdateShottreeView(int ShotNo, int SubShotNo)
        {
            int FrameNo = 0;

            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();
            TempShot.subShotList = new ArrayList();

            // Create a temp SubShot and assign value
            SubShotManaged TempSubShot = new SubShotManaged();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

            if (SubShotNo != -99)
            {
                // Retrive current sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[SubShotNo];

                // Update Temp start frame
                TempSelectedStartFrame = TempSubShot.start;
                TempSelectedEndFrame = TempSubShot.end;
            }
            else
            {
                // Retrive 0 sub shot information, start frame
                TempSubShot = (SubShotManaged)TempShot.subShotList[0];

                TempSelectedStartFrame = TempSubShot.start;

                // Retrive last sub shot information
                TempSubShot = (SubShotManaged)TempShot.subShotList[TempShot.subShotList.Count - 1];

                TempSelectedEndFrame = TempSubShot.end;

            }

            // Clear up
            ShottreeView.Nodes.Clear();

            //Display frame 0
            for (FrameNo = TempSelectedStartFrame; FrameNo <= TempSelectedEndFrame; FrameNo++)
                ShottreeView.Nodes.Add(CompleteTreeView.Nodes[FrameNo].Text);
        }
示例#15
0
        // Change display of shot\subshot item number
        private void ShotCbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            int i = 0;

            // Add SubShot Number to Combo Box
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();
            TempShot.subShotList = new ArrayList();
            SubShotManaged TempSubShot = new SubShotManaged();

            // Retrieve current shot information
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotCbox.SelectedIndex]);

            // Clean up old data
            SubShotCBox.Items.Clear();

            // Update SubShot Combo box
            for (i = 0; i < TempShot.subShotCount; i++)
                SubShotCBox.Items.Add(i);
        }
示例#16
0
        // Remove Last SubShot
        private void RemoveSubShot(int ShotNo)
        {
            // Create a temp Shot
            ShotManaged TempShot = new ShotManaged();

            // Retrive current shot parameter and copy to temp shot object
            TempShot = ((ShotManaged)ObjShotInfo.shotList[ShotNo]);

            TempShot.subShotList.RemoveAt(TempShot.subShotList.Count-1);
            TempShot.subShotCount = TempShot.subShotList.Count;

            ObjShotInfo.shotList[ShotNo] = TempShot;
        }