|
|
@ -46,7 +46,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.EX |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
PingReply reply = await pingSender.SendPingAsync(ip, 6); |
|
|
|
PingReply reply = await pingSender.SendPingAsync(ip, 3000); |
|
|
|
|
|
|
|
if (reply.Status == IPStatus.Success) |
|
|
|
{ |
|
|
@ -68,19 +68,28 @@ namespace SunlightCentralizedControlManagement_SCCM_.EX |
|
|
|
} |
|
|
|
|
|
|
|
public void Parameter(object IP,object PROT,object USER ,object PASSWD) |
|
|
|
{ host = IP.ToString();port =Convert.ToInt16( PROT); password = PASSWD.ToString(); } |
|
|
|
{// host = IP.ToString();
|
|
|
|
//port =Convert.ToInt16( PROT);
|
|
|
|
password = PASSWD.ToString(); } |
|
|
|
|
|
|
|
private async Task Window_Loaded(object sender, RoutedEventArgs e) |
|
|
|
/* private Window_Loaded(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
private async void Window_Loaded(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
|
|
|
|
if (await PingTest(host)) |
|
|
|
{ |
|
|
|
if (!vnc.IsConnected) |
|
|
|
{ |
|
|
|
vnc.VncPort = port; |
|
|
|
vnc.Connect(host, false, true); |
|
|
|
|
|
|
|
//System.Windows.MessageBox.Show("VNC 连接成功!");
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|