Exemplo n.º 1
0
        /// <summary>
        /// 添加显示信息节目
        /// </summary>
        private void AddSmartParagram()
        {
            var r1 = Led2014.AddProgram(_ledSessionHandle, _smartProgramIndex, 0);

            if (r1 == 0)
            {
                throw new Exception("添加节目失败");
            }
            var r2 = Led2014.AddQuitText(_ledSessionHandle, _smartProgramIndex, 1, 0, 0, LedWidth, LedHeight,
                                         (int)FontColor.Green, "宋体",
                                         24, 0, 0, 0, "物联网");

            if (r2 == 0)
            {
                throw new Exception("时间节目添加玛特节目失败");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 添加时间节目
        /// </summary>
        private void AddTimerParagram()
        {
            var r1 = Led2014.AddProgram(_ledSessionHandle, _timeProgramIndex, 0);

            if (r1 == 0)
            {
                throw new Exception("添加时间节目失败");
            }

            var r2 = Led2014.AddDClockArea(_ledSessionHandle, _timeProgramIndex, 1, 8, 0, LedWidth, LedHeight, 2, "宋体",
                                           24, 0, 0,
                                           0,

                                           /*DateTime.Now.Year, (int)DateTime.Now.DayOfWeek, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour,
                                            * DateTime.Now.Minute, DateTime.Now.Second,*/0, 0, 1, 1, 1, 1, 0, 2, 1, 1, 0, 0, 0);

            if (r2 == 0)
            {
                throw new Exception("时间节目添加播放区域失败");
            }
        }
Exemplo n.º 3
0
        public void Send()
        {
            //添加实时数据节目及内容
            for (var i = 0; i < ShowInfoTuples.Count; i++)
            {
                var pragramNo = _timeProgramIndex + i + 1;
                var r1        = Led2014.AddProgram(_ledSessionHandle, pragramNo, 0);
                if (r1 == 0)
                {
                    throw new Exception("添加内码节目失败");
                }
                var r2 = Led2014.AddNeiMaTxtArea1(_ledSessionHandle, 1, pragramNo, 1, 0, 0, LedWidth, LedHeight,
                                                  ShowInfoTuples[i].Item2, 32, 0, ShowInfoTuples[i].Item1, 32, 255, 10, 3);
                if (r2 == 0)
                {
                    throw new Exception("内码节目添加播放区域失败");
                }
            }

            ////int pno = _timeProgramIndex + 1;
            ////Led2014.AddProgram(_ledSessionHandle, pno, 5);
            ////Led2014.AddNeiMaTxtArea1(_ledSessionHandle, 1, pno, 1, 0, 0, LedWidth, LedHeight, "物联网一二三四五六七", 32/*点阵*/, 0/*宋体*/, 1/*颜色*/, 32/*连续左移*/, 255, 8, 20);

            //发送
            var r3 = Led2014.SendControl(_ledSessionHandle, 1, IntPtr.Zero);

            if (r3 == 0)
            {
                throw new Exception("发送LED失败");
            }
            //结束
            var r4 = Led2014.EndSend(_ledSessionHandle);

            if (r4 == 0)
            {
                throw new Exception("结束LED发送失败");
            }
        }