|
|
@ -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) |
|
|
|
{ |
|
|
|