sc 7 months ago
parent
commit
289a9fbf81
  1. 1
      EX/VNC.xaml
  2. 17
      EX/VNC.xaml.cs

1
EX/VNC.xaml

@ -15,4 +15,5 @@
</ContentControl>
<TextBlock x:Name="log" VerticalAlignment="Bottom" Text="LINK-------" Margin="0,0,0,10" HorizontalAlignment="Left" Width="600" Height="35" FontSize="24" FontWeight="Bold" FontStyle="Italic" />
</Grid>
</Window>

17
EX/VNC.xaml.cs

@ -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 连接成功!");
}
}
}
}
}

Loading…
Cancel
Save