void displayFont(IntPtr dialog, Int64 timeStamp) { OneDialog cuDlg = m_dialog.getDialog(dialog); if (null == cuDlg) { return; } if (cuDlg.panel != null) { AfterRenderIndex idx = getIdx(dialog); if (idx == null) { return; } cuDlg.panel.BeginInvoke(refreshAfterRenderIdx, new object[] { cuDlg, timeStamp }); BVCU.Color color = new BVCU.Color(0xFFFFFFFF); try { BVCU.BVDisplay_DisplayFont(idx.dispHandle, idx.index, ref idx.dispRect, ref color, cuDlg.timeStamp.ToString("yyyy'/'MM'/'dd HH:mm:ss")); } catch { } } }
void procRefreshAfterRenderIdx(OneDialog dialog, Int64 timeStamp) { AfterRenderIndex idx = getIdx(dialog.dialogHandle); if (null == idx) { return; } idx.dispHandle = dialog.panel.Handle; idx.dispRect = new BVRect(dialog.panel.ClientRectangle.Top, dialog.panel.ClientRectangle.Left, dialog.panel.ClientRectangle.Bottom, dialog.panel.ClientRectangle.Right); double time = timeStamp / BVCU.SAV_TIME_BASE + 28800; DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(time); dialog.timeStamp = dateTime; }
void procCreateFontInDialog(OneDialog dialog) { AfterRenderIndex idx = new AfterRenderIndex(); idx.type = INDEX_TYPE.FONT; idx.dispHandle = dialog.panel.Handle; idx.dialogHandle = dialog.dialogHandle; if (!BVCU.SUCCEEDED(BVCU.BVDisplay_CreateFont(idx.dispHandle, ref idx.index, 15, "Arial"))) { return; } BVCU.FontDisplayMode effect = new BVCU.FontDisplayMode(); effect.size = BVCU.FONT_DISPLAY_MODE_SIZE; effect.fontColor = new BVCU.Color(0xFFFFFFFF); effect.backColor = new BVCU.Color(0xFF000000); effect.effect = BVCU.BVDISPLAY_TEXT_EFFECT_OUTLINE; effect.effectSize = 1; BVCU.BVDisplay_SetFontDisplayMode(idx.dispHandle, idx.index, ref effect); m_afterRenderList.Add(idx); }