Example #1
0
        //更新动态区文本
        public static int dynamicAreastr_5(byte[] ipAdder, ushort port, byte ScreenColor, byte uAreaId, byte RunMode, ushort Timeout,
                                           ushort uAreaX, ushort uAreaY, ushort uWidth, ushort uHeight, bx_sdk_dual.EQareaframeHeader Frame, byte DisplayMode, byte Speed,
                                           ushort StayTime, byte RepeatTime, bx_sdk_dual.E_arrMode arrMode, ushort fontSize, uint color, byte fontBold, byte fontItalic,
                                           bx_sdk_dual.E_txtDirection tdirection, ushort txtSpace, byte Valign, byte Halign, string fontName, string strAreaTxtContent,
                                           byte PlayImmediately, byte RelateAllPro, ushort RelateProNum, ushort[] RelateProSerial)
        {
            int err = 0;

            bx_sdk_dual.EQfontData oFont;
            oFont.arrMode    = arrMode;
            oFont.fontSize   = fontSize;
            oFont.color      = color;
            oFont.fontBold   = fontBold;
            oFont.fontItalic = fontItalic;
            oFont.tdirection = tdirection;
            oFont.txtSpace   = txtSpace;
            oFont.Valign     = Valign;
            oFont.Halign     = Halign;
            byte[] Font = Encoding.GetEncoding("GBK").GetBytes(fontName);
            byte[] str  = Encoding.GetEncoding("GBK").GetBytes(strAreaTxtContent);

            err = bx_sdk_dual.bxDual_dynamicArea_AddAreaWithTxt_5G(ipAdder, port, (bx_sdk_dual.E_ScreenColor_G56)ScreenColor, uAreaId, RunMode, Timeout, RelateAllPro, RelateProNum, RelateProSerial,
                                                                   PlayImmediately, uAreaX, uAreaY, uWidth, uHeight, Frame, DisplayMode, 0, Speed, StayTime, RepeatTime, oFont, Font, str);
            return(err);
        }
Example #2
0
        //添加图片
        public static int Creat_Addimg(ushort areaID, string png, ushort picID, byte DisplayMode, byte Speed, ushort StayTime, byte RepeatTime, ushort ValidLen,
                                       byte CartoonFrameRate, byte BackNotValidFlag, bx_sdk_dual.E_arrMode arrMode, ushort fontSize, uint color, byte fontBold, byte fontItalic,
                                       bx_sdk_dual.E_txtDirection tdirection, ushort txtSpace, byte Valign, byte Halign)
        {
            bx_sdk_dual.EQpageHeader_G6 pheader;
            pheader.PageStyle        = 0x00;
            pheader.DisplayMode      = DisplayMode;
            pheader.ClearMode        = 0x01;
            pheader.Speed            = Speed;
            pheader.StayTime         = StayTime;
            pheader.RepeatTime       = RepeatTime;
            pheader.ValidLen         = ValidLen;
            pheader.CartoonFrameRate = CartoonFrameRate;
            pheader.BackNotValidFlag = BackNotValidFlag;
            pheader.arrMode          = arrMode;
            pheader.fontSize         = fontSize;
            pheader.color            = color;
            pheader.fontBold         = fontBold;
            pheader.fontItalic       = fontItalic;
            pheader.tdirection       = tdirection;
            pheader.txtSpace         = txtSpace;
            pheader.Valign           = Valign;
            pheader.Halign           = Halign;
            byte[] img = Encoding.GetEncoding("GBK").GetBytes(png);
            int    err = bx_sdk_dual.bxDual_program_pictureAreaAddPic_G6(areaID, picID, ref pheader, img);

            return(err);
        }
Example #3
0
        //更新动态区图片
        public static int dynamicAreaimg_6(byte[] ipAdder, ushort port, byte ScreenColor, byte uAreaId, ushort x, ushort y, ushort w, ushort h,
                                           byte DisplayMode, byte Speed, ushort StayTime, byte RepeatTime, ushort ValidLen, byte CartoonFrameRate,
                                           bx_sdk_dual.E_arrMode arrMode, ushort fontSize, uint color, byte fontBold, byte fontItalic,
                                           bx_sdk_dual.E_txtDirection tdirection, ushort txtSpace, byte Valign, byte Halign, string fontName, string strAreaTxtContent,
                                           byte PlayImmediately, ushort RelateProNum, ushort[] RelateProSerial, bx_sdk_dual.EQSound_6G stSoundData)
        {
            int err = 0;

            bx_sdk_dual.EQareaHeader_G6 aheader;
            aheader.AreaType       = 0x10;
            aheader.AreaX          = x;
            aheader.AreaY          = y;
            aheader.AreaWidth      = w;
            aheader.AreaHeight     = h;
            aheader.BackGroundFlag = 0x00;
            aheader.Transparency   = 101;
            aheader.AreaEqual      = 0x00;
            aheader.stSoundData    = stSoundData;

            bx_sdk_dual.EQpageHeader_G6 pheader;
            pheader.PageStyle        = 0x00;
            pheader.PageStyle        = 0x00;
            pheader.DisplayMode      = DisplayMode;
            pheader.ClearMode        = 0x01;
            pheader.Speed            = Speed;
            pheader.StayTime         = StayTime;
            pheader.RepeatTime       = RepeatTime;
            pheader.ValidLen         = ValidLen;
            pheader.CartoonFrameRate = CartoonFrameRate;
            pheader.BackNotValidFlag = 0;
            pheader.arrMode          = arrMode;
            pheader.fontSize         = fontSize;
            pheader.color            = color;
            pheader.fontBold         = fontBold;
            pheader.fontItalic       = fontItalic;
            pheader.tdirection       = tdirection;
            pheader.txtSpace         = txtSpace;
            pheader.Valign           = Valign;
            pheader.Halign           = Halign;
            bx_sdk_dual.DynamicAreaParams[] Params = new bx_sdk_dual.DynamicAreaParams[1];
            Params[0].uAreaId        = uAreaId;
            Params[0].oAreaHeader_G6 = aheader;
            Params[0].stPageHeader   = pheader;
            byte[] Font = Encoding.GetEncoding("GBK").GetBytes(fontName);
            Params[0].fontName = Calculation.BytesToIntptr(Font);
            byte[] str = Encoding.GetEncoding("GBK").GetBytes(strAreaTxtContent);
            Params[0].strAreaTxtContent = Calculation.BytesToIntptr(str);
            if (PlayImmediately == 1)
            {
                err = bx_sdk_dual.bxDual_dynamicAreaS_AddAreaPic_6G(ipAdder, port, (bx_sdk_dual.E_ScreenColor_G56)ScreenColor, (byte)Params.Length, Params);
            }
            else
            {
                err = bx_sdk_dual.bxDual_dynamicAreaS_AddAreaPic_WithProgram_6G(ipAdder, port, (bx_sdk_dual.E_ScreenColor_G56)ScreenColor, (byte)Params.Length, Params, RelateProNum, RelateProSerial);
            }
            return(err);
        }
Example #4
0
        //添加内容
        public static int Creat_AddStr(ushort areaID, string txt, string font, byte DisplayMode, byte Speed, ushort StayTime, byte RepeatTime, ushort ValidLen,
                                       bx_sdk_dual.E_arrMode arrMode, ushort fontSize, uint color, byte fontBold, byte fontItalic, bx_sdk_dual.E_txtDirection tdirection, ushort txtSpace, byte Valign, byte Halign)
        {
            byte[] str  = Encoding.GetEncoding("GBK").GetBytes(txt);
            byte[] Font = Encoding.GetEncoding("GBK").GetBytes(font);
            bx_sdk_dual.EQpageHeader pheader;
            pheader.PageStyle   = 0x00;
            pheader.DisplayMode = DisplayMode;
            pheader.ClearMode   = 0x01;
            pheader.Speed       = Speed;
            pheader.StayTime    = StayTime;
            pheader.RepeatTime  = RepeatTime;
            pheader.ValidLen    = ValidLen;
            pheader.arrMode     = arrMode;
            pheader.fontSize    = fontSize;
            pheader.color       = color;
            pheader.fontBold    = fontBold;
            pheader.fontItalic  = fontItalic;
            pheader.tdirection  = tdirection;
            pheader.txtSpace    = txtSpace;
            pheader.Valign      = Valign;
            pheader.Halign      = Halign;
            int err = bx_sdk_dual.bxDual_program_picturesAreaAddTxt(areaID, str, Font, ref pheader);

            return(err);
        }