Exemplo n.º 1
0
        public void MoveScreenRight()
        {
            //move the screens for the current client.
#if QUEUE_CLIENT
            _dispatcher.Process(MoveScreenMessage.Right);
#else
            _dispatcher.Send(MoveScreenMessage.Right.GetBytes());
#endif
        }
        private void OnGlobalHookClipboard(object sender, ClipboardChangedEventArgs e)
        {
            if (!ClientState.CurrentClientFocused)
            {
                //Console.WriteLine("Trying to set the clipboard when we're not the current client...");
                return;
            }

            //if our application has received a clipboard push from the server, this event still fires, so bail out if we are currently syncing the clipboard.
            //don't process a hook event within 2 seconds
#if BailClient
            if (ShouldHookBailKeyboard())
            {
                return;
            }

            ClientState.LastHookEvent_Keyboard = DateTime.UtcNow;
#endif
            //Console.WriteLine("Sending clipboard to server");

#if QUEUE_CLIENT
            _dispatcher.Process(new ClipboardMessage(e.Value));
#else
            _dispatcher.Send(ClipboardMessage.GetBytes(e.Value));
#endif
        }