From e3054d0d28e6751ea32b2c6fe663d5acca58bd34 Mon Sep 17 00:00:00 2001
From: maqiao <625215135@qq.com>
Date: Thu, 18 Apr 2024 11:09:21 +0800
Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=B3=BB=E7=BB=9F=E5=BD=95?=
=?UTF-8?q?=E5=83=8F=E6=9C=BA=E5=BC=80=E5=A7=8B=E5=BD=95=E5=83=8F=EF=BC=8C?=
=?UTF-8?q?=E9=80=80=E5=87=BA=E7=B3=BB=E7=BB=9F=E5=81=9C=E6=AD=A2=E5=BD=95?=
=?UTF-8?q?=E5=83=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DM_Weight/App.config | 13 +-
DM_Weight/App.xaml.cs | 5 +-
DM_Weight/Converter/TotalCountConverter.cs | 35 +
DM_Weight/DM_Weight.csproj | 4 +
DM_Weight/Finger/FingerprintUtil.cs | 12 +-
DM_Weight/HIKVISION/CHCNetSDK.cs | 20375 ++++++++++++++++
DM_Weight/HIKVISION/CHKFunction.cs | 166 +
DM_Weight/Port/PortUtil.cs | 2 +-
DM_Weight/ViewModels/HomeWindowViewModel.cs | 10 +-
DM_Weight/ViewModels/LoginWindowViewModel.cs | 7 +-
DM_Weight/ViewModels/MainWindowViewModel.cs | 5 +-
.../ViewModels/StockListWindowViewModel.cs | 55 +-
DM_Weight/Views/StockListWindow.xaml | 75 +-
DM_Weight/util/ReadApp.cs | 23 +
14 files changed, 20750 insertions(+), 37 deletions(-)
create mode 100644 DM_Weight/Converter/TotalCountConverter.cs
create mode 100644 DM_Weight/HIKVISION/CHCNetSDK.cs
create mode 100644 DM_Weight/HIKVISION/CHKFunction.cs
create mode 100644 DM_Weight/util/ReadApp.cs
diff --git a/DM_Weight/App.config b/DM_Weight/App.config
index 106848b..ddc7c74 100644
--- a/DM_Weight/App.config
+++ b/DM_Weight/App.config
@@ -16,7 +16,7 @@
-
+
@@ -60,7 +60,16 @@
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DM_Weight/App.xaml.cs b/DM_Weight/App.xaml.cs
index 28a848f..0fa1057 100644
--- a/DM_Weight/App.xaml.cs
+++ b/DM_Weight/App.xaml.cs
@@ -23,6 +23,7 @@ using log4net;
using System.Windows.Interop;
using System.Windows.Threading;
using System.Timers;
+using DM_Weight.HIKVISION;
namespace DM_Weight
{
@@ -92,9 +93,11 @@ namespace DM_Weight
// 串口工具
containerRegistry.RegisterSingleton();
// 指纹机工具
- //containerRegistry.RegisterSingleton();
+ containerRegistry.RegisterSingleton();
// 组态屏工具
containerRegistry.RegisterSingleton();
+ // 录像机
+ containerRegistry.RegisterSingleton();
containerRegistry.Register();
diff --git a/DM_Weight/Converter/TotalCountConverter.cs b/DM_Weight/Converter/TotalCountConverter.cs
new file mode 100644
index 0000000..906aa70
--- /dev/null
+++ b/DM_Weight/Converter/TotalCountConverter.cs
@@ -0,0 +1,35 @@
+using DM_Weight.Models;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace DM_Weight.Converter
+{
+ public class TotalCountConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var total = 0;
+ // DataGrid分组后对应的组及组内元素CollectionViewGroup.Items 类型是ReadOnlyObservableCollection