Exemple #1
0
        // Get camera by name
        public Camera GetCameraByName(string name)
        {
            string[] nameParts = name.Split('\\');
            Group    group     = null;

            // get group
            if (nameParts.Length > 1)
            {
                group = camerasGroups.GetGroupByName(string.Join("\\", nameParts, 0, nameParts.Length - 1));
            }

            // get camera
            return(cameras.GetCamera(nameParts[nameParts.Length - 1], group));
        }
Exemple #2
0
        // Update grid labels
        private void UpdateGridLabels()
        {
            if (cameras != null)
            {
                for (int i = 0; i < viewGrid.Rows; i++)
                {
                    for (int j = 0; j < viewGrid.Cols; j++)
                    {
                        // get camera ID of the specified cell of the grid
                        int cameraID = view.GetCamera(i, j);

                        if (cameraID > 0)
                        {
                            Camera c = cameras.GetCamera(cameraID);

                            if (c != null)
                            {
                                viewGrid.SetLabel(c.FullName, i, j);
                            }
                        }
                    }
                }
            }
        }