Пример #1
0
 public override void Disconnect()
 {
     try {
         connected = false;
         rd.Disconnect();
     } catch (Exception e) {
         Terminals.Logging.Log.Info("Disconnect", e);
     }
 }
 public override void Disconnect()
 {
     try
     {
         _VNC.Disconnect();
     }
     catch (Exception ex)
     {
         Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, Language.strVncConnectionDisconnectFailed + Environment.NewLine + ex.Message, true);
     }
 }
Пример #3
0
 public override void Disconnect()
 {
     try
     {
         VNC_Client.Disconnect();
     }
     catch (Exception ex)
     {
         Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
                                             Language.strVncConnectionDisconnectFailed + Constants.vbNewLine +
                                             ex.Message, true);
     }
 }
 private bool IsPortVNC()
 {
     try {
         lock (vncConnection) {
             VncSharp.RemoteDesktop rd = new VncSharp.RemoteDesktop();
             rd.VncPort     = Port;
             rd.GetPassword = new VncSharp.AuthenticateDelegate(VNCPassword);
             rd.Connect(IPAddress);
             rd.Disconnect();
         }
         return(true);
     }catch (System.Security.Cryptography.CryptographicException ce) {
         Terminals.Logging.Log.Info("", ce);
         return(true);
     } catch (Exception exc) {
         Terminals.Logging.Log.Info("", exc);
         exc.ToString();
     }
     return(false);
 }
 private bool IsPortVNC()
 {
     try {
         lock (vncConnection) {
             VncSharp.RemoteDesktop rd = new VncSharp.RemoteDesktop();
             rd.VncPort = Port;
             rd.GetPassword = new VncSharp.AuthenticateDelegate(VNCPassword);
             rd.Connect(IPAddress);
             rd.Disconnect();
         }
         return true;
     }catch(System.Security.Cryptography.CryptographicException ce) {
         Terminals.Logging.Log.Info("", ce);
         return true;
     } catch (Exception exc) {
         Terminals.Logging.Log.Info("", exc);
         exc.ToString();
     }
     return false;
 }