Ejemplo n.º 1
0
        /// <summary>
        /// 打开视频窗口
        /// </summary>
        /// <param name="request"></param>
        private void procVideo_OpenWindow(WSRequest request)
        {
            var req = JsonConvert.DeserializeObject <WSVideoRequest_OpenWindow>(request.Params.ToString());



            FrmVideo frmVideo = this.getVideoFormByID(req.PanelID);

            int screenid = req.ScreenID ?? 0;

            if (screenid > Screen.AllScreens.Length)
            {
                screenid = 0;
            }
            var screen = Screen.AllScreens[screenid];

            frmVideo.Width           = req.Width ?? frmVideo.Width;
            frmVideo.Height          = req.Height ?? frmVideo.Height;
            frmVideo.Location        = new System.Drawing.Point(req.LocationX ?? frmVideo.Location.X, req.LocationY ?? frmVideo.Location.Y);
            frmVideo.TopMost         = req.TopMost ?? true;
            frmVideo.FormBorderStyle = req.ShowWindowBorder == true ? FormBorderStyle.Sizable : FormBorderStyle.None;

            this.VideoManager.SetLayout(req.PanelID, req.LayoutName);

            frmVideo.WindowState = FormWindowState.Normal;
            frmVideo.Show();
        }
Ejemplo n.º 2
0
        private void procVideo_CloseWindow(WSRequest request)
        {
            var req = JsonConvert.DeserializeObject <WSVideoRequest>(request.Params.ToString());


            FrmVideo frmVideo = this.getVideoFormByID(req.PanelID);

            frmVideo.Hide();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取指定的窗口
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        private FrmVideo getVideoFormByID(string id)
        {
            if (this.m_VideoFrmList.ContainsKey(id))
            {
                return(this.m_VideoFrmList[id]);
            }
            var      panel = this.VideoManager.CreateVideoPanel(id);
            FrmVideo ret   = new FrmVideo();

            ret.Show();
            ret.SetVideoPanel(panel);
            this.m_VideoFrmList.Add(id, ret);
            return(ret);
        }