Exemple #1
0
        public NetCopy(IPAddress ipAddress, MainWindow mainWindow)
        {
            this.ipAddress  = ipAddress;
            this.mainWindow = mainWindow;

            clipboardData = new ClipboardData();
            clipboardData.SetClipboardText();
            //SendData();

            serverData = new ServerRequest(this.ipAddress);
        }
Exemple #2
0
        //Send clipboard text to server
        public void SendData()
        {
            if (!Clipboard.ContainsText())
            {
                return;
            }

            if (isPasting)
            {
                return;
            }

            Console.WriteLine("    \nSENDING DATA...");
            NetworkClient netClient = new NetworkClient();

            clipboardData.SetClipboardText();
            string data            = clipboardData.GetSendedText();
            string responseMessage = null;

            Thread clientThread = new Thread(() => netClient.StartClient(ipAddress, data, out responseMessage));

            clientThread.Start();
        }