Exemplo n.º 1
0
 static void Main(string[] args)
 {
     VncServer s = new VncServer("T!T@N", 5900, "T!T@N-VNC");
     try
     {
         s.Start();
     }
     catch (ArgumentNullException ex)
     {
         Console.WriteLine(ex.Message);
         return;
     }
     Console.ReadLine();
 }
Exemplo n.º 2
0
 private static void Main(string[] args)
 {
     var s = new VncServer("password", 5901, 5900, "Ulterius VNC");
     try
     {
         s.Start();
     }
     catch (ArgumentNullException ex)
     {
        s.Stop();
         return;
     }
     
 }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     VncServer s = new VncServer("", 5900, "VNC", 640, 480);
     //s.ConnectAction(ac);
     s.ConnectActionRaw(ac2);
     s.ConnectInputs(keyev, mouseev);
     try
     {
         s.Start();
     }
     catch (ArgumentNullException ex)
     {
         Console.WriteLine(ex.Message);
         return;
     }
     Console.ReadLine();
 }
Exemplo n.º 4
0
 public void StartVncServer()
 {
     try
     {
         var settings = new Settings();
         var vncProxyPort = settings.Read("Vnc", "VncProxyPort", 5901);
         var vncPort = settings.Read("Vnc", "VncPort", 5900);
         var vncPass = settings.Read("Vnc", "VncPass", "");
         vncServer = new VncServer(vncPass, vncProxyPort, vncPort, "Ulterius VNC");
         Task.Run(() => { vncServer.Start(); });
         var endData = new
         {
             vncStarted = true,
             proxyPort = vncProxyPort,
             port = vncPort,
             message = "VNC Server Started"
         };
         serializator.Serialize(_client, packet.endpoint, packet.syncKey, endData);
     }
     catch (ArgumentNullException)
     {
         vncServer?.Stop();
     }
 }