예제 #1
0
        //每隔1秒监听一次
        private void watch_Timer_Elapsed(object sender, EventArgs e)
        {
            Thread.CurrentThread.IsBackground = true;
            BathDBDataContext dc = new BathDBDataContext(connectionString);

            if (dc.PayMsg.Count() != 0)
            {
                watch_Timer.Interval = ts.Seconds * 1000;
                PayMsg msg  = dc.PayMsg.ToList().Last();
                string path = dir + GeneralClass.Now.ToShortDateString() + "\\" + msg.systemId + ".avi";

                recording = true;
                video.StartKinescope(path);
                recordTime = GeneralClass.Now;

                dc.PayMsg.DeleteAllOnSubmit(dc.PayMsg.ToArray());
                dc.SubmitChanges();
            }
            if (recording && GeneralClass.Now - recordTime >= ts)
            {
                watch_Timer.Interval = 100;
                recording            = false;
                video.StopKinescope();
            }
        }
예제 #2
0
 partial void DeletePayMsg(PayMsg instance);
예제 #3
0
 partial void UpdatePayMsg(PayMsg instance);
예제 #4
0
 partial void InsertPayMsg(PayMsg instance);
예제 #5
0
 partial void DeletePayMsg(PayMsg instance);
예제 #6
0
 partial void UpdatePayMsg(PayMsg instance);
예제 #7
0
 partial void InsertPayMsg(PayMsg instance);