diff --git a/软件系统服务端Wpf/App.config b/软件系统服务端Wpf/App.config deleted file mode 100644 index 8e15646..0000000 --- a/软件系统服务端Wpf/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/软件系统服务端Wpf/App.xaml b/软件系统服务端Wpf/App.xaml deleted file mode 100644 index 22a17c7..0000000 --- a/软件系统服务端Wpf/App.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/软件系统服务端Wpf/App.xaml.cs b/软件系统服务端Wpf/App.xaml.cs deleted file mode 100644 index d92adfa..0000000 --- a/软件系统服务端Wpf/App.xaml.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Diagnostics; -using System.Linq; -using System.Runtime.InteropServices; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; - -namespace 软件系统客户端Wpf -{ - /// - /// App.xaml 的交互逻辑 - /// - public partial class App : Application - { - /// - /// 指示了应用程序退出时的代码 - /// - public static int QuitCode { get; set; } = 0; - - - protected override void OnStartup(StartupEventArgs e) - { - base.OnStartup(e); - //捕获未处理的异常 - AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; - - Process process = Process.GetCurrentProcess(); - //遍历应用程序的同名进程组 - foreach (Process p in Process.GetProcessesByName(process.ProcessName)) - { - //不是同一进程则关闭刚刚创建的进程 - if (p.Id != process.Id) - { - //此处显示原先的窗口需要一定的时间,不然无法显示 - ShowWindowAsync(p.MainWindowHandle, 9); - SetForegroundWindow(p.MainWindowHandle); - Thread.Sleep(10); - Current.Shutdown();//关闭当前的应用程序 - return; - } - } - - - P1: - LoginWindow lw = new LoginWindow(); - bool? result = lw.ShowDialog(); - if (result.Value == true) - { - MainWindow mw = new MainWindow(); - MainWindow = mw; - - mw.ShowDialog(); - if (QuitCode == 1) - { - //继续显示登录窗口 - QuitCode = 0; - goto P1; - } - else - { - Current.Shutdown();//关闭当前的应用程序 - } - } - else - { - Environment.Exit(0); - } - - } - - - - private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) - { - - } - - [DllImport("User32.dll")] - private static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow); - - [DllImport("User32.dll")] - private static extern bool SetForegroundWindow(IntPtr hWnd); - } -} diff --git a/软件系统服务端Wpf/BasicSupport/UserClient.cs b/软件系统服务端Wpf/BasicSupport/UserClient.cs deleted file mode 100644 index 9109981..0000000 --- a/软件系统服务端Wpf/BasicSupport/UserClient.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using HslCommunication.Enthernet; -using HslCommunication.BasicFramework; -using CommonLibrary; - -namespace 软件系统客户端wpf -{ - - //==================================================================================================== - // 模版说明: - //==================================================================================================== - - - public class UserClient - { - public static JsonSettings JsonSettings = new JsonSettings(); - /// - /// 本软件的当前版本,用来验证更新的关键依据 - /// - public static SystemVersion CurrentVersion { get; } = new SystemVersion("1.0.0"); - - /// - /// 服务器的IP地址,默认为127.0.0.1,可用于单机调试 - /// - public static string ServerIp { get; } = "127.0.0.1"; - - /// - /// 所有版本更新信息的对象 - /// - public static List HistoryVersions { get; } = new List - { - //写入所有的历史版本信息,这样就能在更新日志的界面查看到信息 - new VersionInfo() - { - VersionNum=new SystemVersion("1.0.0"), - ReleaseDate=new DateTime(2017,1,1),//该版本发布的日期 - UpdateDetails=new StringBuilder("1.本系统第一版本正式发布使用。"+Environment.NewLine+ - "2.提供了多客户端用时在线的功能。"+Environment.NewLine+ - "3.需要用户自行添加"), - }, - }; - - - - - /// - /// 设置或获取系统的公告 - /// - public static string Announcement { get; set; } = ""; - /// - /// 当前系统的登录账户 - /// - public static UserAccount UserAccount { get; set; } = new UserAccount(); - - /// - /// 服务器的时间,该时间与服务器同步,每隔10秒钟,防止客户端串改单机时间,可以作为各种时间条件判定 - /// - public static DateTime DateTimeServer { get; set; } = DateTime.Now; - - - /// - /// 用于访问服务器数据的网络对象类,必须修改这个端口参数,否则运行失败 - /// - public static Net_Simplify_Client Net_simplify_client = new Net_Simplify_Client( - new System.Net.IPEndPoint(System.Net.IPAddress.Parse(ServerIp), - CommonLibrary.CommonLibrary.Port_Second_Net)) - { - KeyToken = CommonHeadCode.KeyToken, - ConnectTimeout = 5000, - }; - - /// - /// 用于使用udp向服务器进行发送即时可丢失数据的对象 - /// - public static Net_Udp_Client Net_Udp_Client = new Net_Udp_Client( - new System.Net.IPEndPoint(System.Net.IPAddress.Parse(ServerIp), - CommonLibrary.CommonLibrary.Port_Udp_Server)) - { - KeyToken = CommonHeadCode.KeyToken, - }; - } -} diff --git a/软件系统服务端Wpf/LoginWindow.xaml b/软件系统服务端Wpf/LoginWindow.xaml deleted file mode 100644 index 2a1ffdf..0000000 --- a/软件系统服务端Wpf/LoginWindow.xaml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - [您的软件系统] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 是否记住密码 - - - 正在连接服务器... - - - - - - - - - - - - - - 版本号: - V1.0.0 - 本软件著作权归某某所有 - - - diff --git a/软件系统服务端Wpf/LoginWindow.xaml.cs b/软件系统服务端Wpf/LoginWindow.xaml.cs deleted file mode 100644 index cd28aa1..0000000 --- a/软件系统服务端Wpf/LoginWindow.xaml.cs +++ /dev/null @@ -1,48 +0,0 @@ -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.Shapes; - -namespace 软件系统客户端Wpf -{ - /// - /// LoginWindow.xaml 的交互逻辑 - /// - public partial class LoginWindow : Window - { - public LoginWindow() - { - InitializeComponent(); - } - - private void Button_Click(object sender, RoutedEventArgs e) - { - this.DialogResult = true; - } - - private void ToggleButton_Checked(object sender, RoutedEventArgs e) - { - - } - - private void ToggleButton_Unchecked(object sender, RoutedEventArgs e) - { - - } - - private void Window_Loaded(object sender, RoutedEventArgs e) - { - TextBlockSoftName.Text = CommonLibrary.Resource.StringResouce.SoftName; - TextBlockSoftVersion.Text= - } - } -} diff --git a/软件系统服务端Wpf/MainWindow.xaml b/软件系统服务端Wpf/MainWindow.xaml deleted file mode 100644 index 525ec98..0000000 --- a/软件系统服务端Wpf/MainWindow.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/软件系统服务端Wpf/MainWindow.xaml.cs b/软件系统服务端Wpf/MainWindow.xaml.cs deleted file mode 100644 index 3283e87..0000000 --- a/软件系统服务端Wpf/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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 软件系统客户端Wpf -{ - /// - /// MainWindow.xaml 的交互逻辑 - /// - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/软件系统服务端Wpf/Properties/AssemblyInfo.cs b/软件系统服务端Wpf/Properties/AssemblyInfo.cs deleted file mode 100644 index efdf67c..0000000 --- a/软件系统服务端Wpf/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("软件系统客户端Wpf")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("软件系统客户端Wpf")] -[assembly: AssemblyCopyright("Copyright © 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/软件系统服务端Wpf/Properties/Resources.Designer.cs b/软件系统服务端Wpf/Properties/Resources.Designer.cs deleted file mode 100644 index 2bdec7c..0000000 --- a/软件系统服务端Wpf/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码由工具生成。 -// 运行时版本:4.0.30319.42000 -// -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 -// -//------------------------------------------------------------------------------ - -namespace 软件系统客户端Wpf.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("软件系统客户端Wpf.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/软件系统服务端Wpf/Properties/Resources.resx b/软件系统服务端Wpf/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/软件系统服务端Wpf/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/软件系统服务端Wpf/Properties/Settings.Designer.cs b/软件系统服务端Wpf/Properties/Settings.Designer.cs deleted file mode 100644 index c30a085..0000000 --- a/软件系统服务端Wpf/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码由工具生成。 -// 运行时版本:4.0.30319.42000 -// -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 -// -//------------------------------------------------------------------------------ - -namespace 软件系统客户端Wpf.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.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/软件系统服务端Wpf/Properties/Settings.settings b/软件系统服务端Wpf/Properties/Settings.settings deleted file mode 100644 index 033d7a5..0000000 --- a/软件系统服务端Wpf/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/软件系统服务端Wpf/packages.config b/软件系统服务端Wpf/packages.config deleted file mode 100644 index 4b564d1..0000000 --- a/软件系统服务端Wpf/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/软件系统服务端Wpf/软件系统服务端Wpf.csproj b/软件系统服务端Wpf/软件系统服务端Wpf.csproj deleted file mode 100644 index 4f5018c..0000000 --- a/软件系统服务端Wpf/软件系统服务端Wpf.csproj +++ /dev/null @@ -1,123 +0,0 @@ - - - - - Debug - AnyCPU - {9B5A13FF-8483-4BB8-B0E7-2CF9A8E01C45} - WinExe - 软件系统客户端Wpf - 软件系统客户端Wpf - v4.5 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\CommonLibrary\bin\Debug\CommonLibrary.dll - - - ..\Public\HslCommunication.dll - - - ..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll - - - ..\packages\MaterialDesignThemes.2.3.0.823\lib\net45\MaterialDesignThemes.Wpf.dll - - - ..\Public\Newtonsoft.Json.dll - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - - LoginWindow.xaml - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - Designer - - - - - \ No newline at end of file