// send image public static bool CP5200_SendImg(TextImage img, int effect) { int nRet = CP5200.CP5200_Net_SendPicture(Convert.ToByte(1), 0, 0, 0, img.Width, img.Height, Marshal.StringToHGlobalAnsi(img.path), 0, effect, 3, 0); return(nRet >= 0); }
// send image public static bool CP5200_SendImg(TextImage img, int effect) { int nRet = CP5200.CP5200_Net_SendPicture(Convert.ToByte(1), 0, 0, 0, img.Width, img.Height, Marshal.StringToHGlobalAnsi(img.path), 0, effect, 3, 0); return nRet >= 0; }
// CP5200 refresher private void RefreshLED(string str, Color foreColor) { //CP5200_SendText(PreviewResult.Text); // create temporal image TextImage tempImg = new TextImage(str, LEDConfig.defaultFont, foreColor, Color.Black); try { LEDConnection.CP5200_SendImg(tempImg, effect); } catch (Exception ex) { //refresh preview area LED.settingForm.RefreshPreview(ex.Message); } finally { // delete temp image tempImg.release(); } }