コード例 #1
0
 private void btnStop_Click(object sender, EventArgs e)
 {
     SyncHelp.StopSync();
     btnStop.Enabled   = false;
     btnStart.Enabled  = true;
     btnCancel.Enabled = true;
 }
コード例 #2
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);
        }
コード例 #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);
        }
コード例 #4
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();
        }
コード例 #5
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();
         }
     }
 }