private void CheckLock(object o) { lock (this) { try { int num = BugsBox.Pharmacy.MonitorHandlers.Drug.LockCount(); if (num > 0) { NotificationController.DrugLock(num); } num = BugsBox.Pharmacy.MonitorHandlers.Drug.GetDrugInfoForOutofStockNumber(); if (num > 0) { NotificationController.DrugOutofStock(num); } IsCheckLockOver = true; CallBackDelegate cbd = o as CallBackDelegate; cbd(); } catch (Exception ex) { IsCheckLockOver = true; LoggerHelper.Instance.Error(ex); } } }