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");
        }
예제 #2
0
 /// <summary>
 /// Stop monitoring events and release the resources
 /// </summary>
 public void Stop()
 {
     if (monitor != null)
     {
         NSEvent.RemoveMonitor(monitor);
         monitor = null;
     }
 }
예제 #3
0
        public override void WillTerminate(NSNotification notification)
        {
            _ipcServer?.Stop();
            _ipcServer?.Dispose();

            // Insert code here to tear down your application
            NSEvent.RemoveMonitor(_eventMonitor);
        }
예제 #4
0
        public override void WillTerminate(NSNotification notification)
        {
            _socketServer?.Disconnect(Ipc.RepoZIpcEndpoint.Address);
            _socketServer?.Dispose();

            // Insert code here to tear down your application
            NSEvent.RemoveMonitor(_eventMonitor);
        }
예제 #5
0
 void StopMouseMonitoring()
 {
     if (clickMonitor != null)
     {
         NSEvent.RemoveMonitor(clickMonitor);
         clickMonitor = null;
     }
 }
예제 #6
0
 public void stop()
 {
     for (int i = 0; i < mask.Length; i++)
     {
         if (monitor[i] != null)
         {
             NSEvent.RemoveMonitor(monitor[i]);
             monitor[i] = null;
         }
     }
 }
예제 #7
0
        public void StopHoverSelection()
        {
            if (clickMonitor != null)
            {
                NSEvent.RemoveMonitor(clickMonitor);
                clickMonitor = null;
            }

            //if (moveMonitor != null)
            //{
            //    NSEvent.RemoveMonitor(moveMonitor);
            //    moveMonitor = null;
            //}
        }
예제 #8
0
        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");
        }
예제 #10
0
 public override void WillTerminate(NSNotification notification)
 {
     // Insert code here to tear down your application
     NSEvent.RemoveMonitor(_eventMonitor);
 }
예제 #11
0
 private void StopMonitoring()
 {
     NSEvent.RemoveMonitor(globalEventMonitor);
     NSEvent.RemoveMonitor(localEventMonitor);
 }