Exemple #1
0
        /// <summary>
        /// 设置手术排班大屏显示布局
        /// </summary>
        private void SetScreenLayout()
        {
            System.Windows.Forms.Screen scr = System.Windows.Forms.Screen.PrimaryScreen;
            Rectangle rc = scr.Bounds;

            if (ExtendAppContext.Current.IsTV)
            {
                screenPnlRight.Width = rc.Width * 5 / 9;
            }
            else
            {
                screenPnlRight.Width = 0;
            }
            //计算并设置各控件的高度
            ScreenCtrHelper.CalculateCtrsHeight(rc.Height);
            screenTopPnl.Height       = ExtendAppContext.Current.TopBottomHeight;
            screenBottomPnl.Height    = ExtendAppContext.Current.TopBottomHeight;
            normalContentTitle.Height = ExtendAppContext.Current.RowHeight;
            //一般显示内容
            normalColsList = ScreenCtrHelper.GetNormalColumnList(this.normalContentArea.Width * 0.95);
            //手术信息显示字体大小
            ExtendAppContext.Current.ContentFontSize = MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight(ExtendAppContext.Current.RowHeight * 0.6F, "微软雅黑");
            //大屏标签(标题)字体
            LabelFont            = new Font("微软雅黑", MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight(screenPnlLabel.Height * 0.8F, "微软雅黑"));
            screenPnlLabel.Width = (int)(this.CreateGraphics().MeasureString(ExtendAppContext.Current.ScreenLabel, LabelFont).Width * 1.1);
            //日期时间显示字体
            DateTimeFont = new Font("微软雅黑", MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight(screenPnlTime.Height * 0.5F, "微软雅黑"));
            //公告信息
            MsgFont   = new Font("微软雅黑", MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight((float)ExtendAppContext.Current.TopBottomHeight * 0.7F, "微软雅黑"));
            msgStartX = rc.Width * 5 / 6;
            msgCurntX = msgStartX;
            msgCurntY = (ExtendAppContext.Current.TopBottomHeight - this.CreateGraphics().MeasureString("我", MsgFont).Height) / 2;
            msgStep   = this.CreateGraphics().MeasureString("1", MsgFont).Width / 4;
            if (ExtendAppContext.Current.IsTV)
            {
                screenPnlRight.Controls.Clear();
                mediaPlayerCtr mediaPlay = new mediaPlayerCtr();
                mediaPlay.Parent = screenPnlRight;
                mediaPlay.Dock   = DockStyle.Fill;
            }
            else
            {
                screenPnlRight.Controls.Clear();
                normalRightFrm rightFrm = new normalRightFrm();
                rightFrm.Parent = screenPnlRight;
                rightFrm.Dock   = DockStyle.Fill;
            }
        }
Exemple #2
0
        /// <summary>
        /// 设置手术排班大屏显示布局
        /// </summary>
        private void SetScreenLayout()
        {
            System.Windows.Forms.Screen scr = System.Windows.Forms.Screen.PrimaryScreen;
            Rectangle rc = scr.Bounds;

            screenPnlSequence.Visible = ExtendAppContext.Current.SeqMode;
            //计算并设置各控件的高度
            ScreenCtrHelper.CalculateCtrsHeight(rc.Height);
            screenTopPnl.Height       = ExtendAppContext.Current.TopBottomHeight;
            screenBottomPnl.Height    = ExtendAppContext.Current.TopBottomHeight;
            normalPnlTop.Height       = ExtendAppContext.Current.RowHeight;
            normalContentTitle.Height = ExtendAppContext.Current.RowHeight;
            seqPnlTop.Height          = ExtendAppContext.Current.RowHeight;
            seqContentTitle.Height    = ExtendAppContext.Current.RowHeight;

            //若接台展示
            if (ExtendAppContext.Current.SeqMode)
            {
                screenPnlSequence.Width = rc.Width / 3;
                seqColsList             = ScreenCtrHelper.GetSeqColumnList(this.seqContentArea.Width * 0.95);
            }
            //一般显示内容
            normalColsList = ScreenCtrHelper.GetNormalColumnList(this.screenPnlNormal.Width * 0.95);
            //手术信息显示字体大小
            ExtendAppContext.Current.ContentFontSize = ExtendAppContext.Current.SeqMode ?
                                                       MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight(ExtendAppContext.Current.RowHeight * 0.5F, "微软雅黑") : MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight(ExtendAppContext.Current.RowHeight * 0.6F, "微软雅黑");

            //大屏标签(标题)字体
            LabelFont            = new Font("微软雅黑", MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight(screenPnlLabel.Height * 0.8F, "微软雅黑"));
            screenPnlLabel.Width = (int)(this.CreateGraphics().MeasureString(ExtendAppContext.Current.ScreenLabel, LabelFont).Width * 1.1);
            //日期时间显示字体
            DateTimeFont = new Font("微软雅黑", MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight(screenPnlTime.Height * 0.5F, "微软雅黑"));
            //公告信息
            MsgFont   = new Font("微软雅黑", MedicalSystem.MedScreen.Controls.ControlHelper.GetFontSizeByHeight((float)ExtendAppContext.Current.TopBottomHeight * 0.7F, "微软雅黑"));
            msgStartX = rc.Width * 5 / 6;
            msgCurntX = msgStartX;
            msgCurntY = (ExtendAppContext.Current.TopBottomHeight - this.CreateGraphics().MeasureString("我", MsgFont).Height) / 2;
            msgStep   = this.CreateGraphics().MeasureString("1", MsgFont).Width / 4;
        }