//添加计时 private void button7_Click(object sender, EventArgs e) { User_Timer TimeCount = new User_Timer(); TimeCount.bDay = true; TimeCount.bHour = false; TimeCount.BkColor = 0; TimeCount.bMin = false; TimeCount.bMulOrSingleLine = true; TimeCount.bSec = false; TimeCount.chTitle = "距离国庆"; TimeCount.FontInfo.bFontBold = false; TimeCount.FontInfo.bFontItaic = false; TimeCount.FontInfo.bFontUnderline = false; TimeCount.FontInfo.colorFont = 0xFFFF; TimeCount.FontInfo.iAlignStyle = 2; TimeCount.FontInfo.iFontSize = 16; TimeCount.FontInfo.strFontName = "宋体"; TimeCount.PartInfo.FrameColor = 0xFF00; TimeCount.PartInfo.iFrameMode = 0; TimeCount.PartInfo.iHeight = 32; TimeCount.PartInfo.iWidth = 64; TimeCount.PartInfo.iX = 0; TimeCount.PartInfo.iY = 0; TimeCount.ReachTimeYear = 2010; TimeCount.ReachTimeMonth = 10; TimeCount.ReachTimeDay = 1; TimeCount.ReachTimeHour = 12; TimeCount.ReachTimeMinute = 0; TimeCount.ReachTimeSecond = 0; if (-1 == User_AddTimeCount(g_iCardNum, ref TimeCount, g_iProgramIndex)) { MessageBox.Show("添加计时失败!"); } else { MessageBox.Show("添加计时成功!"); } }
public static extern int User_AddTimeCount(int CardNum, ref User_Timer pTimeCount, int iProgramIndex);