commit 9db965e8c1401ea1ebf7803e6f5e397a7b1df161
Author: wugang <425674808@qq.com>
Date: Mon Nov 20 16:48:38 2017 +0800
提交项目文件
diff --git a/CowOutputClient.sln b/CowOutputClient.sln
new file mode 100644
index 0000000..c03701f
--- /dev/null
+++ b/CowOutputClient.sln
@@ -0,0 +1,74 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CowOutputClient", "CowOutputClient\CowOutputClient.csproj", "{F216A33C-71D2-4E4A-926A-B315C2A8B0CE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FireBirdUtil", "FireBirdUtil\FireBirdUtil.csproj", "{3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyPad", "KeyPad\KeyPad.csproj", "{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{4768FDF9-DBC5-441F-AC59-5655146B8961}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "Utils\Utils.csproj", "{D123A086-C03A-4B8B-BEFB-124E102D3ADE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeighBusiness", "WeighBusiness\WeighBusiness.csproj", "{35613A1C-A935-480D-9545-78BCF5279AC4}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Release|x86.ActiveCfg = Release|Any CPU
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|x86.ActiveCfg = Debug|x86
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|x86.Build.0 = Debug|x86
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|x86.ActiveCfg = Release|x86
+ {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|x86.Build.0 = Release|x86
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|x86.ActiveCfg = Debug|x86
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|x86.Build.0 = Debug|x86
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|x86.ActiveCfg = Release|x86
+ {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|x86.Build.0 = Release|x86
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|x86.ActiveCfg = Debug|x86
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|x86.Build.0 = Debug|x86
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|x86.ActiveCfg = Release|x86
+ {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|x86.Build.0 = Release|x86
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|x86.ActiveCfg = Debug|x86
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|x86.Build.0 = Debug|x86
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|x86.ActiveCfg = Release|x86
+ {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|x86.Build.0 = Release|x86
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|x86.ActiveCfg = Debug|x86
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|x86.Build.0 = Debug|x86
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|x86.ActiveCfg = Release|x86
+ {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CowOutputClient/App.xaml b/CowOutputClient/App.xaml
new file mode 100644
index 0000000..41ba003
--- /dev/null
+++ b/CowOutputClient/App.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/CowOutputClient/App.xaml.cs b/CowOutputClient/App.xaml.cs
new file mode 100644
index 0000000..d237796
--- /dev/null
+++ b/CowOutputClient/App.xaml.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using CowOutputClient.Utils;
+using Update.Utils;
+
+namespace CowOutputClient
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ public App()
+ {
+ //处理程序中未捕获的异常
+ DispatcherUnhandledException += App_DispatcherUnhandledException;
+ }
+
+ private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
+ {
+ WindowUtil.Err(e.Exception.Message.ToString());
+ e.Handled = true;
+ }
+
+ protected override void OnStartup(StartupEventArgs e)
+ {
+ base.OnStartup(e);
+ init();
+ LoginUtil.InitRpc();
+ Application currApp = Application.Current;
+ currApp.StartupUri = new Uri("MainWindow.xaml", UriKind.RelativeOrAbsolute);
+ }
+
+ private void init()
+ {
+ var exePath = Process.GetCurrentProcess().MainModule.FileName;
+
+ var folder = new FileInfo(exePath).Directory.FullName;
+
+ var logFolder = Path.Combine(folder, "logs");
+ if (!Directory.Exists(logFolder)) {
+ Directory.CreateDirectory(logFolder);
+ }
+
+ var fileName = string.Format("{0:yyyyMMdd}.log", DateTime.Now);
+ var log = Path.Combine(logFolder, fileName);
+ Trace.Listeners.Clear();
+ Trace.Listeners.Add(new TextWriterTraceListener(log));
+ Trace.AutoFlush = true;
+ }
+ }
+}
diff --git a/CowOutputClient/Controls/CaptionBarButton.xaml b/CowOutputClient/Controls/CaptionBarButton.xaml
new file mode 100644
index 0000000..e6391ff
--- /dev/null
+++ b/CowOutputClient/Controls/CaptionBarButton.xaml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
diff --git a/CowOutputClient/Controls/CaptionBarButton.xaml.cs b/CowOutputClient/Controls/CaptionBarButton.xaml.cs
new file mode 100644
index 0000000..6791d4e
--- /dev/null
+++ b/CowOutputClient/Controls/CaptionBarButton.xaml.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+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 CowOutputClient
+{
+ ///
+ /// CaptionBarButton.xaml 的交互逻辑
+ ///
+ public partial class CaptionBarButton : UserControl, INotifyPropertyChanged
+ {
+ public event Predicate