示例#1
0
        void OnThread()
        {
            DateTime n = DateTime.Now;

            TimeSpan t = new TimeSpan(n.Ticks - last.Ticks);

            delta = t.TotalMilliseconds;
            last  = n;

            txTime.Text = n.ToString("yyyy-MM-dd HH:mm:ss");

            cav.Refresh();

            LedHelper.AssignCanvas(0, cav);

            LedHelper.SendToScreen();
            Thread.Sleep(500);
        }
示例#2
0
        private void tmDisp_Tick(object sender, EventArgs e)
        {
            if (tbMain.SelectedTab != tbDisp)
            {
                return;
            }
            Canvas cav = dsp.GetPage();

            cav.Refresh();

            Graphics g = Graphics.FromImage(pic.Image);

            g.DrawImage(cav.Img, 0, 0, pic.Image.Width, pic.Image.Height);

            g.Dispose();

            pic.Refresh();

            LedHelper.AssignCanvas(0, cav);

            //LedHelper.SendToScreen();
        }