diff --git a/CenterView/App.xaml.cs b/CenterView/App.xaml.cs
index f1f6ae1..040be65 100644
--- a/CenterView/App.xaml.cs
+++ b/CenterView/App.xaml.cs
@@ -1,17 +1,17 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace CenterView
-{
- ///
- /// App.xaml 的交互逻辑
- ///
- public partial class App : Application
- {
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace CenterView
+{
+ ///
+ /// App.xaml 的交互逻辑
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/CenterView/CenterView.csproj b/CenterView/CenterView.csproj
index 5314fc6..dd05faa 100644
--- a/CenterView/CenterView.csproj
+++ b/CenterView/CenterView.csproj
@@ -37,7 +37,9 @@
+
+
@@ -71,6 +73,7 @@
App.xaml
Code
+
MainWindow.xaml
Code
diff --git a/CenterView/CkCitrix.cs b/CenterView/CkCitrix.cs
new file mode 100644
index 0000000..297e855
--- /dev/null
+++ b/CenterView/CkCitrix.cs
@@ -0,0 +1,57 @@
+using Microsoft.Win32;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.ComponentModel;
+using System.Diagnostics;
+
+namespace CenterView
+{
+ public class CkCitrix
+ {
+ //检测citrix是否存在
+ public static bool CheckCitrix()
+ {
+ List subkeyNames = new List();
+ //当前用户
+ RegistryKey CurrentUserhkml = Registry.CurrentUser;
+ RegistryKey CurrentUsersoftware = CurrentUserhkml.OpenSubKey("SOFTWARE");
+ subkeyNames = CurrentUsersoftware.GetSubKeyNames().ToList();
+ if (subkeyNames.Contains("Citrix"))
+ {
+ CurrentUserhkml.Close();
+ return true;
+ }
+ else
+ {
+ CurrentUserhkml.Close();
+ }
+ //本机安装
+ RegistryKey LocalMachinehkml = Registry.LocalMachine;
+ RegistryKey LocalMachinesoftware = LocalMachinehkml.OpenSubKey("SOFTWARE");
+ subkeyNames = LocalMachinesoftware.GetSubKeyNames().ToList();
+ if (subkeyNames.Contains("Citrix"))
+ {
+ LocalMachinehkml.Close();
+ return true;
+ }
+ else
+ {
+
+ LocalMachinehkml.Close();
+ return false;
+ }
+ }
+
+ //检查cx是否在运行
+ public static bool IsProcessStarted()
+ {
+ Process[] temp = Process.GetProcessesByName("wfcrun32");
+ if (temp.Length > 0) return true;
+ else
+ return false;
+ }
+ }
+ }
+
diff --git a/CenterView/MainWindow.xaml b/CenterView/MainWindow.xaml
index bbeeafd..232bd96 100644
--- a/CenterView/MainWindow.xaml
+++ b/CenterView/MainWindow.xaml
@@ -1,295 +1,295 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CenterView/MainWindow.xaml.cs b/CenterView/MainWindow.xaml.cs
index 4edd24c..f7b58c0 100644
--- a/CenterView/MainWindow.xaml.cs
+++ b/CenterView/MainWindow.xaml.cs
@@ -1,65 +1,112 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace CenterView
-{
- ///
- /// MainWindow.xaml 的交互逻辑
- ///
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
- private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- this.DragMove();
- }
-
- private void menu_Click(object sender, RoutedEventArgs e)
- {
- menu1.IsOpen = true;
- }
-
- private void x_Click(object sender, RoutedEventArgs e)
- {
- this.Close();
- }
- // 下载于www.mycodes.net
- private void ___Click(object sender, RoutedEventArgs e)
- {
- this.WindowState = WindowState.Minimized;
- }
-
- private void ksl_Click(object sender, RoutedEventArgs e)
- {
- //if (list1.Items.Count > 2)
- //{
- // return;
- //}
- //list1.Items.Add("扫描c盘中...");
- //list1.Items.Add("扫描d盘中...");
- //list1.Items.Add("扫描e盘中...");
- //list1.Items.Add("扫描d盘中...");
- //list1.Items.Add("扫描g盘中...");
- //list1.Items.Add("扫描l盘中...");
- //list1.Items.Add("扫描i盘中...");
- //list1.Items.Add("扫描j盘中...");
- //list1.Items.Add("扫描k盘中...");
- //list1.Items.Add("扫描完毕");
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.ComponentModel;
+using Microsoft.Win32;
+using System.Windows.Forms;
+using System.Diagnostics;
+using System.IO;
+
+namespace CenterView
+{
+ ///
+ /// MainWindow.xaml 的交互逻辑
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ this.DragMove();
+ }
+
+ private void menu_Click(object sender, RoutedEventArgs e)
+ {
+ menu1.IsOpen = true;
+ }
+
+ private void x_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+ // 下载于www.mycodes.net
+ private void ___Click(object sender, RoutedEventArgs e)
+ {
+ this.WindowState = WindowState.Minimized;
+ }
+
+ private void ksl_Click(object sender, RoutedEventArgs e)
+ {
+ //if (list1.Items.Count > 2)
+ //{
+ // return;
+ //}
+ //list1.Items.Add("扫描c盘中...");
+ //list1.Items.Add("扫描d盘中...");
+ //list1.Items.Add("扫描e盘中...");
+ //list1.Items.Add("扫描d盘中...");
+ //list1.Items.Add("扫描g盘中...");
+ //list1.Items.Add("扫描l盘中...");
+ //list1.Items.Add("扫描i盘中...");
+ //list1.Items.Add("扫描j盘中...");
+ //list1.Items.Add("扫描k盘中...");
+ //list1.Items.Add("扫描完毕");
+ }
+
+
+ private void window_Loaded(object sender, RoutedEventArgs e)
+ {
+ //显示citrix插件是否安装
+ {
+ var isExistCkCitrix = CkCitrix.CheckCitrix();
+ if (isExistCkCitrix)
+ {
+ citrix1.Text = "Ctrix Receiver已安装";
+ //判断citrix是否运行
+ var isWorkCitrix = CkCitrix.IsProcessStarted();
+ if (isWorkCitrix)
+ {
+ citrix2.Text = "Citrix Receiver正在运行";
+ }
+ else
+ {
+ citrix2.Text = "为您启动Citrix Receiver";
+ try
+ {
+ System.Diagnostics.Process.Start("C:\\Program Files (x86)\\Citrix\\ICA Client\\wfcrun32.exe");//启动cx,软件安装位置用户无法选择
+ }
+ catch
+ {
+ citrix2.Text = "Citrix Receiver启动失败";
+ }
+ }
+ }
+ else
+ {
+ citrix1.Text = "Citrix Receiver未安装";
+ citrix2.Text = "Citrix Receiver未启动";
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
diff --git a/CenterView/Properties/AssemblyInfo.cs b/CenterView/Properties/AssemblyInfo.cs
index d87d4e5..f722eed 100644
--- a/CenterView/Properties/AssemblyInfo.cs
+++ b/CenterView/Properties/AssemblyInfo.cs
@@ -1,55 +1,55 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// 有关程序集的常规信息通过以下
-// 特性集控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("CenterView")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("HP Inc.")]
-[assembly: AssemblyProduct("CenterView")]
-[assembly: AssemblyCopyright("Copyright © HP Inc. 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 使此程序集中的类型
-// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
-// 则将该类型上的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-//若要开始生成可本地化的应用程序,请在
-// 中的 .csproj 文件中
-//设置 CultureYouAreCodingWith。 例如,如果您在源文件中
-//使用的是美国英语,请将 设置为 en-US。 然后取消
-//对以下 NeutralResourceLanguage 特性的注释。 更新
-//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //主题特定资源词典所处位置
- //(在页面或应用程序资源词典中
- // 未找到某个资源的情况下使用)
- ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
- //(在页面、应用程序或任何主题特定资源词典中
- // 未找到某个资源的情况下使用)
-)]
-
-
-// 程序集的版本信息由下面四个值组成:
-//
-// 主版本
-// 次版本
-// 生成号
-// 修订号
-//
-// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
-// 方法是按如下所示使用“*”:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的常规信息通过以下
+// 特性集控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("CenterView")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("CenterView")]
+[assembly: AssemblyCopyright("Copyright © HP Inc. 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 使此程序集中的类型
+// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
+// 则将该类型上的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请在
+// 中的 .csproj 文件中
+//设置 CultureYouAreCodingWith。 例如,如果您在源文件中
+//使用的是美国英语,请将 设置为 en-US。 然后取消
+//对以下 NeutralResourceLanguage 特性的注释。 更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+ //(在页面或应用程序资源词典中
+ // 未找到某个资源的情况下使用)
+ ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+ //(在页面、应用程序或任何主题特定资源词典中
+ // 未找到某个资源的情况下使用)
+)]
+
+
+// 程序集的版本信息由下面四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/CenterView/Properties/Resources.Designer.cs b/CenterView/Properties/Resources.Designer.cs
index 248ab7e..d74416f 100644
--- a/CenterView/Properties/Resources.Designer.cs
+++ b/CenterView/Properties/Resources.Designer.cs
@@ -1,63 +1,63 @@
-//------------------------------------------------------------------------------
-//
-// 此代码由工具生成。
-// 运行时版本:4.0.30319.42000
-//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
-//
-//------------------------------------------------------------------------------
-
-namespace CenterView.Properties {
- using System;
-
-
- ///
- /// 一个强类型的资源类,用于查找本地化的字符串等。
- ///
- // 此类是由 StronglyTypedResourceBuilder
- // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
- // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
- // (以 /str 作为命令选项),或重新生成 VS 项目。
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// 返回此类使用的缓存的 ResourceManager 实例。
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CenterView.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// 使用此强类型资源类,为所有资源查找
- /// 重写当前线程的 CurrentUICulture 属性。
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace CenterView.Properties {
+ using System;
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// 返回此类使用的缓存的 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CenterView.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 使用此强类型资源类,为所有资源查找
+ /// 重写当前线程的 CurrentUICulture 属性。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/CenterView/Properties/Settings.Designer.cs b/CenterView/Properties/Settings.Designer.cs
index 778aa08..bdc4302 100644
--- a/CenterView/Properties/Settings.Designer.cs
+++ b/CenterView/Properties/Settings.Designer.cs
@@ -1,26 +1,26 @@
-//------------------------------------------------------------------------------
-//
-// 此代码由工具生成。
-// 运行时版本:4.0.30319.42000
-//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
-//
-//------------------------------------------------------------------------------
-
-namespace CenterView.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace CenterView.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/CenterView/StatusBar.xaml b/CenterView/StatusBar.xaml
index 1bbace1..9328294 100644
--- a/CenterView/StatusBar.xaml
+++ b/CenterView/StatusBar.xaml
@@ -1,21 +1,21 @@
-
-
-
+
+
+
\ No newline at end of file