} // end of ControllerSetUp method /// <summary> /// will disable controller which will be passed inside of the method /// </summary> /// <returns></returns> static public void DisableController() { try { Cntr.Dispose(); Cntr = null; monitoringRunning = false; } catch (Exception ex) { logger.Error(ex, "Problem with Dispose method inside of ControllerPresenter class"); } }
/// <summary> /// Will check before connecting to the controller if controller is active and if it's active it will AbbELog off from this controller and will dispose that controller. /// </summary> /// <returns></returns> static public void EnableController() { if (Cntr != null) //if selecting a new controller { try { using (Cntr) { Cntr.Logoff(); Cntr.Dispose(); Cntr = null; } } catch (Exception e) { logger.Error($"Inside of ControllerPresenter {e}"); } } } // end of EnableController method
} // end of ControllerSetUp method /// <summary> /// will disable controller which will be passed inside of the method /// </summary> /// <returns></returns> static public void DisableController() { Cntr.Dispose(); Cntr = null; }