This commit is contained in:
sc committed 2025-03-30 20:51:57 +08:00
commit 289a9fbf81
2 files changed
+14 -4

No files matched your search

+1
View File
@@ -15,4 +15,5 @@
</ContentControl> </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" /> <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> </Grid>
</Window> </Window>
+13 -4
View File
@@ -46,7 +46,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.EX
try try
{ {
PingReply reply = await pingSender.SendPingAsync(ip, 6); PingReply reply = await pingSender.SendPingAsync(ip, 3000);
if (reply.Status == IPStatus.Success) if (reply.Status == IPStatus.Success)
{ {
@@ -68,19 +68,28 @@ namespace SunlightCentralizedControlManagement_SCCM_.EX
} }
public void Parameter(object IP,object PROT,object USER ,object PASSWD) 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 (await PingTest(host))
{ {
if (!vnc.IsConnected) if (!vnc.IsConnected)
{ {
vnc.VncPort = port;
vnc.Connect(host, false, true); vnc.Connect(host, false, true);
//System.Windows.MessageBox.Show("VNC 连接成功!"); //System.Windows.MessageBox.Show("VNC 连接成功!");
} }
} }
} }
} }
} }