//----------------------------------------------------------------------------------------------------- private void SetSpecialAppDynamic() { SpecialAppDynamic sad = new SpecialAppDynamic(); DialogResult ret = sad.ShowDialog(); if (ret == DialogResult.OK) { int err = ONNONLed5KSDKD.Led5kSDK.BX5MK_SetSpecialAppDynamic(m_dwCurHand, SpecialAppDynamic.AreaX, SpecialAppDynamic.AreaY, SpecialAppDynamic.AreaWidth, SpecialAppDynamic.AreaHigh, SpecialAppDynamic.DataType, 0, SpecialAppDynamic.RunState, SpecialAppDynamic.Timeout, SpecialAppDynamic.SingleLine, SpecialAppDynamic.Lines_sizes, SpecialAppDynamic.NewLine, SpecialAppDynamic.StayTime); } else { this.DialogResult = DialogResult.Cancel; } }
//发送特殊动态区 private void button41_Click(object sender, EventArgs e) { Display ds = new Display(); Bitmap bit = ds.CreateContent("shanghaiyangbang", true, StringAlignment.Center); List <byte> tobyte = ds.ToBytes(bit, Display.ColorType.SINGLE, Display.MatrixType.RG); foreach (var v in tobyte) { string b = v.ToString(); string h = Convert.ToString(v, 16); textBox2.Text += h + " "; } MessageBox.Show("shujushi" + textBox2.Text); SetSpecialAppDynamic(); SpecialAppDynamic f4 = new SpecialAppDynamic(); f4.ShowDialog(); PageDataLen = 80; PageNum = 1; PageData = tobyte.ToArray(); //PageDataLen = f4.PageDataLen; //PageNum = f4.PageNum; //PageData = f4.PageData; if (SpecialAppDynamic.DataType == 0) { //发送分页数据 int err = ONNONLed5KSDKD.Led5kSDK.BX5MK_SendPageData(m_dwCurHand, PageNum, PageDataLen, PageData); if (err != 0) { MessageBox.Show("发送分页数据失败"); } } else { //发送点阵信息 int err = ONNONLed5KSDKD.Led5kSDK.BX5MK_SendLatticeMessage(m_dwCurHand, BlockFlag, BlockAddr, BlockData, BlockDataLen); if (err != 0) { MessageBox.Show("发送点阵信息失败"); } } }