Beispiel #1
0
 public WindowsList(float fps)
 {
     FPS = fps;
     //For testing only one window
     if (Program.DEBUG_FIXWINDOWHANDLES.Length > 0)
     {
         Console.WriteLine("For testing please check the FAR Handle.");
         foreach (var f in Program.DEBUG_FIXWINDOWHANDLES)
         {
             HandlesList.Add(f, HandlesList.windows);
         }
         return;
     }
     if (!Program.TEST_WINDOWSLIST)
     {
         bms = BabylonMS.BabylonMS.LaunchMiniShip(out proc_windowslist, "WindowsList.exe", UUIDWindowsList, UUIDWindowsList, Program.instanceUUID); //UUID
     }
     else
     {
     }
     Console.WriteLine("WindowsList Ship launched.");
     bms.NewInputFrame          += NewInputFrame;
     bms.ServerReadyForTransfer += ReadyForTransfer;
     bms.PrepareGate();
 }
Beispiel #2
0
        public ImageBuffer()
        {
            if (!Program.TEST_IMAGEBUFFER)
            {
                bms = BabylonMS.BabylonMS.LaunchMiniShip(out proc_imagebuffer, "ImageBuffer.exe", ImageBufferUUID, ImageBufferUUID, Program.instanceUUID); //UUID
            }
            else
            {
                bms = BabylonMS.BabylonMS.LaunchMiniShip(ImageBufferUUID, ImageBufferUUID, Program.instanceUUID); //DEBUG because Manual start //UUID
            }
            try
            {
                bms.ChangeMiniShipToNetwork(Program.ip_imagebuffer, Program.port_imagebuffer); //started file but switchOn Radio
                bms.ServerReadyForTransfer += ReadyForTransfer;
                bms.PrepareGate();
            }
            catch (Exception) {
                Console.WriteLine(Program.ERR_IMAGEBUFFERLOAD);
                Program.terminate();
            }

            while ((bms.IsReady) || (!ready))
            {
                Thread.Sleep(100);
            }
            ;                                                //TODO Biztosan nem "!bms.IsReady" kell?
            ready = false;
            bms.ServerReadyForTransfer -= ReadyForTransfer;  //NEED!! tedd vissza a norm'l haszn'lathoz
        }
Beispiel #3
0
 public SendR()
 {
     bms = BabylonMS.BabylonMS.LaunchMiniShip(Program.shipUUID, Program.shipUUID, Program.instanceUUID); //UUID
     Console.WriteLine("SendR Ship launched.");
     bms.NewInputFrame          += NewInputFrame;
     bms.ServerReadyForTransfer += ReadyForTransfer;
     bms.PrepareGate();
 }
Beispiel #4
0
 public InputController()
 {
     if (!Program.TEST_INPUTCONTROLLER)
     {
         bms = BabylonMS.BabylonMS.LaunchMiniShip(out proc_inputcontroller, "InputController.exe", InputControllerUUID, InputControllerUUID, Program.instanceUUID); //UUID
     }
     else
     {
         bms = BabylonMS.BabylonMS.LaunchMiniShip(InputControllerUUID, InputControllerUUID, Program.instanceUUID); //UUID
     }
     bms.Connected     += Connected;
     bms.NewInputFrame += NewInputFrame;
     bms.PrepareGate();
 }
Beispiel #5
0
 public ImageBufferInterface()
 {
     androidReady = false;
     tcp          = BabylonMS.BabylonMS.LaunchMiniShip(Program.ip_imagebuffer, Program.port_imagebuffer, ImageBuffer.ImageBufferUUID, ImageBuffer.ImageBufferUUID, Program.instanceUUID); //UUID
     //tcp = Program.imagebuffer.bms;
     tcp.IsReady        = false;
     tcp.Connected     += Connected;
     tcp.NewInputFrame += NewInputFrame;
     tcp.Disconnected  += Disconnect;
     tcp.Waitbytes     += Waitbytes;
     tcp.PrepareGate();//Nonblocking   net Client
     while ((!tcp.IsReady))
     {
         Thread.Sleep(100);
     }
     ;
     Console.WriteLine("Connected ImageBuffer");
 }
Beispiel #6
0
 public ScreenCapture(Int64 hwnd, float fps)
 {
     focused   = null;
     this.Hwnd = hwnd;
     FPS       = fps;
     if (!Program.TEST_SCREENCAPTURE)
     {
         bms = BabylonMS.BabylonMS.LaunchMiniShip("ScreenContentExporter.exe", UUIDScreenCapture + hwnd.ToString(), UUIDScreenCapture, Program.instanceUUID); //UUID
     }
     else
     {
         bms = BabylonMS.BabylonMS.LaunchMiniShip(UUIDScreenCapture, UUIDScreenCapture, Program.instanceUUID);
         //bms = BabylonMS.BabylonMS.LaunchMiniShip("192.168.1.102",9000, UUIDScreenCapture + hwnd.ToString(), UUIDScreenCapture, Program.UUID);
     }
     Console.WriteLine("ScreenCapture Ship launched.");
     bms.NewInputFrame          += NewInputFrame;
     bms.ServerReadyForTransfer += ReadyForTransfer;
     bms.Disconnected           += Disconnect;
     bms.PrepareGate();//Nonblocking
 }