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);
 }