private void UpdateGuestClipboard(DTOext ext)
        {
            receivedClipboard = ext;

            if (receivedClipboard.Paste)
            {
                lock (threadLocks[3]) { this.paste = true; }
            }
        }
Exemple #2
0
        private void CheckPaste()
        {
            while (hostOrClient && TCH != null)
            {
                if (TCH.PasteField)
                {
                    clipboardManager.CopyClipboard();
                    clipboard = TCH.ReceivedClipboard;
                    clipboardManager.ImportDTOext(clipboard);

                    NativeMethods.keybd_event(VK_LCONTROL, 0, KEYEVENTF_EXTENDEDKEY, (IntPtr)0);
                    NativeMethods.keybd_event(V, 0, KEYEVENTF_EXTENDEDKEY, (IntPtr)0);
                    NativeMethods.keybd_event(V, 0, KEYEVENTF_KEYUP, (IntPtr)0);
                    NativeMethods.keybd_event(VK_LCONTROL, 0, KEYEVENTF_KEYUP, (IntPtr)0);
                    lock (TCH.ThreadLock4Field) { TCH.PasteField = false; }
                    clipboardManager.PasteClipboard();
                }
                Thread.Sleep(20);
            }
        }