private void Dispose(bool disposing) { DebugOutput("~~~~~~~~~~~~~~~~~~~~~~ InPlaceEditor.Dispose(" + disposing + ")" ENTER); #if DO_CLEANUP if (EditingEndedObserver != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing end edit observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingEndedObserver); EditingEndedObserver.Dispose(); EditingEndedObserver = null; } if (EditingTextChanged != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing edit text changed observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingTextChanged); EditingTextChanged.Dispose(); EditingTextChanged = null; } if (EditingStartedObserver != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing edit started observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingStartedObserver); EditingStartedObserver.Dispose(); EditingStartedObserver = null; } #endif // DO_CLEANUP if (KeyMonitor != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing key monitor"); NSEvent.RemoveMonitor(KeyMonitor); KeyMonitor.Dispose(); KeyMonitor = null; } DebugOutput("~~~~~~~~~~~~~~~~~~~~~~ InPlaceEditor.Dispose(" + disposing + ") EXIT"); }
/// <summary> /// Stop monitoring events and release the resources /// </summary> public void Stop() { if (monitor != null) { NSEvent.RemoveMonitor(monitor); monitor = null; } }
public override void WillTerminate(NSNotification notification) { _ipcServer?.Stop(); _ipcServer?.Dispose(); // Insert code here to tear down your application NSEvent.RemoveMonitor(_eventMonitor); }
public override void WillTerminate(NSNotification notification) { _socketServer?.Disconnect(Ipc.RepoZIpcEndpoint.Address); _socketServer?.Dispose(); // Insert code here to tear down your application NSEvent.RemoveMonitor(_eventMonitor); }
void StopMouseMonitoring() { if (clickMonitor != null) { NSEvent.RemoveMonitor(clickMonitor); clickMonitor = null; } }
public void stop() { for (int i = 0; i < mask.Length; i++) { if (monitor[i] != null) { NSEvent.RemoveMonitor(monitor[i]); monitor[i] = null; } } }
public void StopHoverSelection() { if (clickMonitor != null) { NSEvent.RemoveMonitor(clickMonitor); clickMonitor = null; } //if (moveMonitor != null) //{ // NSEvent.RemoveMonitor(moveMonitor); // moveMonitor = null; //} }
public void StopHoverSelection() { endSelection = true; if (clickMonitor != null) { NSEvent.RemoveMonitor(clickMonitor); clickMonitor = null; } if (moveMonitor != null) { NSEvent.RemoveMonitor(moveMonitor); moveMonitor = null; } }
private void CellTextEditEnded(NSNotification notification) { DebugOutput("---------------------- CellEdit ended"); #if ENABLE_INPLACEEDIT_TRACE if (notification != null) { var editor = notification.UserInfo.ValueForKey(FieldEditorKey) as NSTextView; var value = editor == null ? "<null editor>" : editor.Value; DebugOutput(" -!-!-!-! CellEdit ended: Notification field editor value: " + value); } #endif // ENABLE_INPLACEEDIT_TRACE #if DO_CLEANUP if (EditingEndedObserver != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing end edit observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingEndedObserver); EditingEndedObserver.Dispose(); EditingEndedObserver = null; } if (EditingTextChanged != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing edit text changed observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingTextChanged); EditingTextChanged.Dispose(); EditingTextChanged = null; } if (EditingStartedObserver != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing edit started observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingStartedObserver); EditingStartedObserver.Dispose(); EditingStartedObserver = null; } #endif // DO_CLEANUP if (KeyMonitor != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing key event monitor"); NSEvent.RemoveMonitor(KeyMonitor); KeyMonitor.Dispose(); KeyMonitor = null; } EditingObject = null; LiveValue = null; TextStorage = null; // do NOT dispose this - it refers to the storage maintained by Owner DebugOutput("---------------------- CellEdit ended: Finished"); }
public override void WillTerminate(NSNotification notification) { // Insert code here to tear down your application NSEvent.RemoveMonitor(_eventMonitor); }
private void StopMonitoring() { NSEvent.RemoveMonitor(globalEventMonitor); NSEvent.RemoveMonitor(localEventMonitor); }