public void tmrReconnect_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { bool srvReady = Scanner.IsPortOpen(_Info.Hostname, Convert.ToString(_Info.Port)); ReconnectGroup.ServerReady = srvReady; if (ReconnectGroup.ReconnectWhenReady && srvReady) { tmrReconnect.Enabled = false; ReconnectGroup.DisposeReconnectGroup(); _ICAClient.Connect(); } }
public void tmrReconnect_Elapsed(object sender, ElapsedEventArgs e) { var srvReady = PortScanner.IsPortOpen(_info.Hostname, Convert.ToString(_info.Port)); ReconnectGroup.ServerReady = srvReady; if (!ReconnectGroup.ReconnectWhenReady || !srvReady) { return; } tmrReconnect.Enabled = false; ReconnectGroup.DisposeReconnectGroup(); _icaClient.Connect(); }
public void tmrReconnect_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { try { var srvReady = PortScanner.IsPortOpen(_connectionInfo.Hostname, Convert.ToString(_connectionInfo.Port)); ReconnectGroup.ServerReady = srvReady; if (ReconnectGroup.ReconnectWhenReady && srvReady) { tmrReconnect.Enabled = false; ReconnectGroup.DisposeReconnectGroup(); //SetProps() _rdpClient.Connect(); } } catch (Exception ex) { Runtime.MessageCollector.AddExceptionMessage(string.Format(Language.AutomaticReconnectError, _connectionInfo.Hostname), ex, MessageClass.WarningMsg, false); } }