diff --git a/DATA/VncSharpWpf.zip b/DATA/VncSharpWpf.zip
new file mode 100644
index 0000000..9cbceff
Binary files /dev/null and b/DATA/VncSharpWpf.zip differ
diff --git a/EX/DLL/VncSharpWpf.dll b/EX/DLL/VncSharpWpf.dll
new file mode 100644
index 0000000..618a498
Binary files /dev/null and b/EX/DLL/VncSharpWpf.dll differ
diff --git a/EX/VNC.xaml b/EX/VNC.xaml
index 2f2c371..aa5cb2f 100644
--- a/EX/VNC.xaml
+++ b/EX/VNC.xaml
@@ -6,15 +6,15 @@
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.EX"
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
- xmlns:vnc="clr-namespace:VncSharp;assembly=VncSharp"
+ xmlns:rdp="clr-namespace:VncSharpWpf;assembly=VncSharpWpf"
mc:Ignorable="d" Loaded="Window_Loaded"
Title="VNC" Height="450" Width="800">
-
-
-
+
+
+
diff --git a/EX/VNC.xaml.cs b/EX/VNC.xaml.cs
index 50f0e93..7274584 100644
--- a/EX/VNC.xaml.cs
+++ b/EX/VNC.xaml.cs
@@ -14,6 +14,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Net.NetworkInformation;
+using VncSharpWpf;
namespace SunlightCentralizedControlManagement_SCCM_.EX
@@ -30,15 +31,60 @@ namespace SunlightCentralizedControlManagement_SCCM_.EX
public VNC()
{
InitializeComponent();
+
+ // vnc.Cursor = Cursors;
+
+ // vnc.MouseMove += Vnc_MouseMove;
+ // vnc.MouseDown += Vnc_MouseDown ;
+ // vnc.MouseUp += Vnc_MouseUp;
+ // vnc.MouseLeave += Vnc_MouseLeave;
+ // vnc.MouseWheel += Vnc_MouseWheel;
+ // vnc.PreviewKeyDown += Vnc_PreviewKeyDown;
+
+
+ // rdp.ConnectComplete += new ConnectCompleteHandler(ConnectCompleteEventHandler);
+ // rdp.ConnectionLost += new EventHandler(ConnectionLostEventHandler);
+ // rdp.StoppedListen += new EventHandler(ConnectionLostEventHandler);
+
}
-
+
+
+
private void Save_Click(object sender, RoutedEventArgs e)
{
+ if (rdp.IsConnected) { rdp.Disconnect(); }//断开连接
this.Close();
}
+ public void Parameter(object IP, object PROT, object USER, object PASSWD)
+ {
+ host = IP.ToString();
+ port = Convert.ToInt16(PROT);
+ password = PASSWD.ToString();
+ }
+
+ private async void Window_Loaded(object sender, RoutedEventArgs e)
+ {
+ if (await PingTest(host))
+ {
+ if (!rdp.IsConnected)
+ {
+ try
+ {
+ rdp.VncPort = port;
+ rdp.Passwd = password;
+ rdp.Connect(host, true, true);
+ }
+ catch (Exception ex)
+ {
+
+ }
+
+ }
+ }
+ }
private async Task PingTest(string ip)
{
bool result = false;
@@ -46,7 +92,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.EX
try
{
- PingReply reply = await pingSender.SendPingAsync(ip, 3000);
+ PingReply reply = await pingSender.SendPingAsync(ip, 3000);
if (reply.Status == IPStatus.Success)
{
@@ -66,33 +112,5 @@ namespace SunlightCentralizedControlManagement_SCCM_.EX
}
return result;
}
-
- public void Parameter(object IP,object PROT,object USER ,object PASSWD)
- {// host = IP.ToString();
- //port =Convert.ToInt16( PROT);
- // password = PASSWD.ToString();
- }
-
- /* 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.GetPassword();
- vnc.Connect(host, true, true);
- // vnc.Authenticate(password);
-
- //System.Windows.MessageBox.Show("VNC 连接成功!");
- }
- }
- }
}
}
diff --git a/SunlightCentralizedControlManagement(SCCM).sln b/SunlightCentralizedControlManagement(SCCM).sln
index be44efa..a8c2350 100644
--- a/SunlightCentralizedControlManagement(SCCM).sln
+++ b/SunlightCentralizedControlManagement(SCCM).sln
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SunlightCentralizedControlM
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nGantt", "..\nGantt\nGantt.csproj", "{CCC54F28-5D20-4AB3-A1A8-C62CD2DA3AE7}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VncSharpWpf", "..\VncSharpWpf\VncSharpWpf.csproj", "{77B5CB63-E14B-4253-881D-6BE9D7C57076}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{CCC54F28-5D20-4AB3-A1A8-C62CD2DA3AE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCC54F28-5D20-4AB3-A1A8-C62CD2DA3AE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCC54F28-5D20-4AB3-A1A8-C62CD2DA3AE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {77B5CB63-E14B-4253-881D-6BE9D7C57076}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {77B5CB63-E14B-4253-881D-6BE9D7C57076}.Debug|Any CPU.Build.0 = Debug|x86
+ {77B5CB63-E14B-4253-881D-6BE9D7C57076}.Release|Any CPU.ActiveCfg = Release|x86
+ {77B5CB63-E14B-4253-881D-6BE9D7C57076}.Release|Any CPU.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SunlightCentralizedControlManagement_SCCM_.csproj b/SunlightCentralizedControlManagement_SCCM_.csproj
index 6443586..8c761e2 100644
--- a/SunlightCentralizedControlManagement_SCCM_.csproj
+++ b/SunlightCentralizedControlManagement_SCCM_.csproj
@@ -406,6 +406,7 @@
+
@@ -485,15 +486,13 @@
3.0.9
-
- 1.0.7
-
+
@@ -546,6 +545,13 @@
{ccc54f28-5d20-4ab3-a1a8-c62cd2da3ae7}
nGantt
+
+ {77b5cb63-e14b-4253-881d-6be9d7c57076}
+ VncSharpWpf
+
+
+
+
diff --git a/UserControls/DispenseMacInfo.xaml b/UserControls/DispenseMacInfo.xaml
index 9daa62b..5194129 100644
--- a/UserControls/DispenseMacInfo.xaml
+++ b/UserControls/DispenseMacInfo.xaml
@@ -40,9 +40,9 @@
-
-
-
-
+
+
+
+
diff --git a/View/DispenseMachinesSet.xaml b/View/DispenseMachinesSet.xaml
index 4664467..1e607d1 100644
--- a/View/DispenseMachinesSet.xaml
+++ b/View/DispenseMachinesSet.xaml
@@ -81,7 +81,7 @@
-
+