Example #1
0
        private void btn_left_Click(object sender, EventArgs e)
        {
            if (m_viewInfoList.Count() == 0)
            {
                return;
            }
            viewInfo FirstViewInfo = m_viewInfoList.First();

            m_viewInfoList.RemoveFirst();
            m_viewInfoList.AddLast(FirstViewInfo);
            Layout_RemoteView_();
        }
Example #2
0
        public static void Layout_RemoteView_()
        {
            int       nsmallViewSize = 0;
            Rectangle clientRect;
            Rectangle subSmallViewRect = new Rectangle();
            Rectangle smallViewRect    = new Rectangle();
            Rectangle bigViewRect      = new Rectangle();

            clientRect           = mainFrm.ClientRectangle;
            smallViewRect.X      = 10 + 25;
            smallViewRect.Y      = 10;
            smallViewRect.Width  = clientRect.Width * 3 / 4 - 25;
            smallViewRect.Height = clientRect.Height / 6;

            bigViewRect.X      = 10;
            bigViewRect.Y      = clientRect.Height / 6 + 5;
            bigViewRect.Width  = clientRect.Width * 3 / 4;
            bigViewRect.Height = clientRect.Height * 4 / 6;

            if (m_viewInfoList.Count() == 0)
            {
                return;
            }
            //hideAllPanel();
            viewInfo FirstViewInfo = m_viewInfoList.First();

            foreach (viewInfo viewInfo_ in m_viewInfoList)
            {
                if (viewInfo_.strUid == FirstViewInfo.strUid &&
                    viewInfo_.videoTrack == FirstViewInfo.videoTrack &&
                    viewInfo_.showPanel == FirstViewInfo.showPanel)
                {
                    viewInfo_.showPanel.Location =
                        new System.Drawing.Point(bigViewRect.X, bigViewRect.Y);
                    viewInfo_.showPanel.Size =
                        new System.Drawing.Size(bigViewRect.Width, bigViewRect.Height);
                    mainFrm.Controls.Add(viewInfo_.showPanel);
                }
                else
                {
                    subSmallViewRect.X =
                        smallViewRect.X + smallViewRect.Width * nsmallViewSize / m_nsmallViewSize;
                    subSmallViewRect.Y           = smallViewRect.Y;
                    subSmallViewRect.Width       = smallViewRect.Width / m_nsmallViewSize;
                    subSmallViewRect.Height      = smallViewRect.Height;
                    viewInfo_.showPanel.Location = new System.Drawing.Point(subSmallViewRect.X, subSmallViewRect.Y);
                    viewInfo_.showPanel.Size     = new System.Drawing.Size(subSmallViewRect.Width, subSmallViewRect.Height - 5);
                    mainFrm.Controls.Add(viewInfo_.showPanel);
                    ++nsmallViewSize;
                }
            }
        }