This commit is contained in:
sc committed 2025-04-22 23:18:21 +08:00
commit 51510fd83a
1 file changed
+6 -9
+6 -9
View File
@@ -129,24 +129,21 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
MessageBox.Show(Properties.Resources.Not_a, "Desktop", MessageBoxButton.OK);
return;
}
machines_info = 1;
log.Visibility = Visibility.Collapsed;
Picture.Visibility = Visibility.Collapsed;
rdp.Visibility = Visibility.Visible;
RemoteDesktopWpf remoteDesktopWpf = new RemoteDesktopWpf();
Picture.Content = remoteDesktopWpf;
// RemoteDesktopWpf remoteDesktopWpf = new RemoteDesktopWpf();
// Picture.Content = remoteDesktopWpf;
if (await PingTest(host))
{
if (!remoteDesktopWpf.IsConnected)
if (!rdp.IsConnected)
{
try
{
remoteDesktopWpf.VncPort = port;
remoteDesktopWpf.Passwd = password;
remoteDesktopWpf.Connect(host, true, false);
rdp.VncPort = port;
rdp.Passwd = password;
rdp.Connect(host, true, false);
}
catch (Exception ex)
{