Ejemplo n.º 1
0
        public void StartSync(string str)
        {
            if (this.InvokeRequired)
            {
                AppendLog al = new AppendLog(StartSync);
                this.Invoke(al, str);
            }
            else
            {
                int syncType = 0;
                try
                {
                    syncType = int.Parse(str);
                }
                catch
                {
                }

                txtLog.Text = string.Empty;
                SyncHelp.StartSync(syncType);
                btnStart.Enabled    = false;
                btnCancel.Enabled   = false;
                btnStop.Enabled     = true;
                btnSyncTime.Enabled = false;
            }
        }
Ejemplo n.º 2
0
 private void btnStop_Click(object sender, EventArgs e)
 {
     SyncHelp.StopSync();
     btnStop.Enabled   = false;
     btnStart.Enabled  = true;
     btnCancel.Enabled = true;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            Rectangle rect = new Rectangle();

            FullScreen.SetFullScreen(false, ref rect);
            //UnitechDSDll.CloseCamera();
            SyncHelp.StopSync();
            UploadHelp.StopUpload();

            try
            {
                //this.DecodeApi.aDecodeSetDecodeEnable(0);
                //this.DecodeApi.Close();
            }
            catch
            {
            }
            try
            {
                this.CamSdk.Close();
            }
            catch
            {
            }

            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            Rectangle rect = new Rectangle();

            FullScreen.SetFullScreen(false, ref rect);
            //Scanner.GetScanner().Close();
            //Scanner.GetScanner().Unregister();
            //UnitechDSDll.CloseCamera();
            try
            {
                SyncHelp.StopSync();
            }
            catch
            {
            }
            try
            {
                UploadHelp.StopUpload();
            }
            catch
            {
            }
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
Ejemplo n.º 5
0
        private void FrmParent_Closing(object sender, CancelEventArgs e)
        {
            Rectangle rect = new Rectangle();

            FullScreen.SetFullScreen(false, ref rect);
            //Scanner.GetScanner().Close();
            Scanner.GetScanner().Unregister();
            UnitechDSDll.CloseCamera();
            SyncHelp.StopSync();
            UploadHelp.StopUpload();
        }
Ejemplo n.º 6
0
 public void StartSync(string str)
 {
     if (this.InvokeRequired)
     {
         AppendLog al = new AppendLog(StartSync);
         this.Invoke(al, str);
     }
     else
     {
         txtLog.Text = string.Empty;
         SyncHelp.StartSync();
         btnStart.Enabled  = false;
         btnCancel.Enabled = false;
         btnStop.Enabled   = true;
     }
 }
Ejemplo n.º 7
0
 private void btnExit_Click(object sender, EventArgs e)
 {
     if (CheckPDAPassword("010203"))
     {
         DialogResult dr = MessageBox.Show("确定要退出本系统吗?", "操作提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
         if (dr == DialogResult.Yes)
         {
             Rectangle rect = new Rectangle();
             FullScreen.SetFullScreen(false, ref rect);
             //UnitechDSDll.CloseCamera();
             SyncHelp.StopSync();
             UploadHelp.StopUpload();
             //Common. WriteIsClose();
             FrmParent.ParentForm.DecodeApi.aDecodeSetDecodeEnable(0);
             FrmParent.ParentForm.DecodeApi.Close();
             FrmParent.ParentForm.CamSdk.Close();
             Application.Exit();
         }
     }
 }