Beispiel #1
0
 public static void StopListening()
 {
     _instance.Invoke(new MethodInvoker(() => ChangeClipboardChain(_instance.Handle, _nextClipboardViewer)));
     _instance.Invoke(new MethodInvoker(_instance.Close));
     _instance.Dispose();
     _instance = null;
 }
Beispiel #2
0
 public static void Stop()
 {
     mInstance.Invoke(new MethodInvoker(() =>
     {
         ChangeClipboardChain(mInstance.Handle, nextClipboardViewer);
     }));
     mInstance.Invoke(new MethodInvoker(mInstance.Close));
     mInstance.Dispose();
     mInstance = null;
 }
        // stop listening (dispose form)
        public static void Stop()
        {
            try
            {
                mInstance.Invoke(new MethodInvoker(() =>
                {
                    ChangeClipboardChain(mInstance.Handle, nextClipboardViewer);
                }));
                mInstance.Invoke(new MethodInvoker(mInstance.Close));

                mInstance.Dispose();

                mInstance = null;
            }
            catch (NullReferenceException) { }
        }
Beispiel #4
0
                // stop listening (dispose form)
                public static void StopWatcher()
                {
                    if (_instance == null)
                    {
                        return;
                    }

                    _instance.Invoke(new MethodInvoker(() =>
                    {
                        ChangeClipboardChain(_instance.Handle, _nextClipboardViewer);
                    }));

                    _instance.Invoke(new MethodInvoker(_instance.Close));

                    _instance.Dispose();
                    _instance = null;
                }
Beispiel #5
0
            // stop listening (dispose form)
            public static void Stop()
            {
                if (mInstance == null)
                {
                    return;
                }

                mInstance.Invoke(new MethodInvoker(() =>
                {
                    bool b = User32.RemoveClipboardFormatListener(mInstance.Handle);
                }));
                mInstance.Invoke(new MethodInvoker(mInstance.Close));

                mInstance.Dispose();

                mInstance = null;
            }