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(); }
/// <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(); SyncHelp.StopSync(); UploadHelp.StopUpload(); if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); }