示例#1
0
        public void dispMsg(String sMsg)
        {
            double wd, hi;
            double addy;

            string[] aryMsg;

            cnvsMsg.Children.Clear();
            if (sMsg == "")
            {
                m_dsptCheckTime.Stop();
                cnvsMsg.Background = Brushes.White;
            }
            else
            {
                wd = cnvsMsg.ActualWidth;
                hi = cnvsMsg.ActualHeight;
                m_libCnvs.setFontSize(70);
                addy = (hi - 70) / 2;

                cnvsMsg.Background = Brushes.Red;
                m_libCnvs.setFillBrush(Brushes.White);
                aryMsg = sMsg.Split(',');
                m_libCnvs.drawCenterText(cnvsMsg, 0, 0, wd, hi, 0, addy, aryMsg[0]);
                if (aryMsg[0] == "発報中")
                {
                    m_libCnvs.setFillBrush(Brushes.Black);
                    m_libCnvs.setFontSize(30);
                    addy = hi - 50;
                    m_libCnvs.drawCenterText(cnvsMsg, 0, 0, wd, hi, 0, addy, aryMsg[1]);
                }
                if (sMsg == "持ち去り警報")
                {
                    m_btnReset        = m_libCnvs.drawButton(cnvsMsg, wd - 120, 30, 120, 30, "解除");
                    m_btnReset.Click += (sender, e) => btnTReset_onClick(sender);
                }
                m_dsptCheckTime.Start();
            }
        }
示例#2
0
        private void SetTitleElement(double x1, double x2)
        {
            double addx, addy;
            double sx, sy, ex, ey;
            double wd, hi;

            m_libCnvs.setFontSize(m_dFontSize);

            sx = 0; ex = m_dAreaWidth;
            sy = 0; ey = m_dOneCardHeight;
            drowVerticalLine(cnvsTitle, sx, x1, x2, ex, sy, ey);

            addx = 0;
            addy = 4;
            sx   = m_dFontSize * 0.5;
            wd   = m_dFontSize * 5;
            sy   = 0;
            hi   = m_dFontSize;
            m_libCnvs.setFillBrush(Brushes.Black);
            m_libCnvs.drawLeftText(cnvsTitle, sx, sy, wd, hi, addx, addy, "稼動●警報");
            sx = sx + wd;
            wd = m_dFontSize;
            m_libCnvs.setFillBrush(Brushes.Red);
            m_libCnvs.drawLeftText(cnvsTitle, sx, sy, wd, hi, addx, addy, "●");
            sx = sx + wd;
            wd = m_dFontSize * 4;
            m_libCnvs.setFillBrush(Brushes.Black);
            m_libCnvs.drawLeftText(cnvsTitle, sx, sy, wd, hi, addx, addy, "持ち去り");
            sx = sx + wd;
            wd = m_dFontSize * 4;
            m_libCnvs.setFillBrush(Brushes.Green);
            m_libCnvs.drawLeftText(cnvsTitle, sx, sy, wd, hi, addx, addy, "●");

            sx = x1;
            wd = x2 - x1;
            m_libCnvs.setFillBrush(Brushes.Black);
            m_libCnvs.drawCenterText(cnvsTitle, sx, sy, wd, hi, addx, addy, "通報装置番号");

            sx = x2;
            wd = m_dAreaWidth - x2 - m_dScrollbarSpace;
            m_libCnvs.setFillBrush(Brushes.Black);
            m_libCnvs.drawCenterText(cnvsTitle, sx, sy, wd, hi, addx, addy, "通報装置署番号");
        }