예제 #1
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     try
     {
         if (mBolConnected)
         {
             mObjWeighingMachine.Disconnect(mObjConnection);
         }
     }
     catch (Exception lObjException)
     {
         CustomMessageBox.Show("Error", lObjException.Message);
     }
 }
예제 #2
0
        private void DisconnectWeighingMachineService()
        {
            grdContainer.BlockUI();

            try
            {
                if (mBolWeighingMachineLoaded)
                {
                    mObjWeighingMachineServer.Disconnect(mObjWeighingMachineConnection);
                }
            }
            catch (Exception lObjException)
            {
                grdContainer.UnblockUI();
                ShowMessage("Error", lObjException.Message);
                mBolWeighingMachineLoaded = false;
            }
            finally
            {
                grdContainer.UnblockUI();
            }
        }