From 48e84f11c153cf0f3a0d816ae0d0ca1ec0ce42b1 Mon Sep 17 00:00:00 2001
From: maqiao <625215135@qq.com>
Date: Tue, 3 Dec 2024 13:22:42 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DM_Weight.Commons/DM_Weight.Commons.csproj | 13 +
.../ValidationErrorMappingBehavior.cs | 75 +
DM_Weight.sln | 51 +
DM_Weight/App.config | 120 +
DM_Weight/App.xaml | 19 +
DM_Weight/App.xaml.cs | 259 +
DM_Weight/AssemblyInfo.cs | 10 +
DM_Weight/Common/CRC16MODBUS.cs | 42 +
DM_Weight/Common/CommonClass.cs | 31 +
DM_Weight/Common/PrismManager.cs | 24 +
DM_Weight/Common/TemperatureRangeRule.cs | 61 +
.../Components/pagination/Pagination.xaml | 43 +
.../Components/pagination/Pagination.xaml.cs | 265 +
.../pagination/PaginationViewModel.cs | 81 +
DM_Weight/Converter/ApplyListConverter.cs | 91 +
DM_Weight/Converter/BoardTypeConverter.cs | 119 +
DM_Weight/Converter/DrawerSelectConverter.cs | 26 +
DM_Weight/Converter/ForeColorConverter.cs | 30 +
DM_Weight/Converter/GroupSumConverter.cs | 40 +
DM_Weight/Converter/InputQuantityConverter.cs | 26 +
.../Converter/NullableToEnabelConverter.cs | 27 +
DM_Weight/Converter/OpenBoxConverter.cs | 32 +
DM_Weight/Converter/OrderStatusConverter.cs | 38 +
DM_Weight/Converter/PaginationConverter.cs | 56 +
DM_Weight/Converter/QuantityCountConverter.cs | 25 +
DM_Weight/Converter/ShiftsStateConverter.cs | 30 +
DM_Weight/Converter/StatusConverter.cs | 85 +
DM_Weight/Converter/StockStatusConverter.cs | 47 +
DM_Weight/Converter/TotalCountConverter.cs | 35 +
DM_Weight/CustomAttribute/MessageAttribute.cs | 20 +
DM_Weight/DM_Weight.csproj | 140 +
DM_Weight/Finger/FingerprintUtil.cs | 183 +
DM_Weight/HIKVISION/CHCNetSDK.cs | 20375 ++++++++++++++++
DM_Weight/HIKVISION/CHKFunction.cs | 192 +
DM_Weight/Images/TbExit.png | Bin 0 -> 5613 bytes
DM_Weight/Images/TbJiay.png | Bin 0 -> 5521 bytes
DM_Weight/Images/TbKuc.png | Bin 0 -> 20283 bytes
DM_Weight/Images/TbQyao.png | Bin 0 -> 5774 bytes
DM_Weight/Images/TbSet.png | Bin 0 -> 5554 bytes
DM_Weight/Images/TbTuiy.png | Bin 0 -> 5708 bytes
DM_Weight/Images/body-bg.jpg | Bin 0 -> 19588 bytes
DM_Weight/Images/box-16.jpg | Bin 0 -> 18695 bytes
DM_Weight/Images/box.png | Bin 0 -> 5630 bytes
DM_Weight/Images/favicon.ico | Bin 0 -> 270398 bytes
DM_Weight/Images/finger-bg-r.png | Bin 0 -> 54076 bytes
DM_Weight/Images/logo.png | Bin 0 -> 3660 bytes
DM_Weight/Models/AccountBookG2.cs | 152 +
DM_Weight/Models/AccountType.cs | 23 +
DM_Weight/Models/ChannelList.cs | 206 +
DM_Weight/Models/ChannelStock.cs | 210 +
DM_Weight/Models/CollectDrug.cs | 122 +
DM_Weight/Models/DestoryDetail.cs | 36 +
DM_Weight/Models/DrugBase.cs | 31 +
DM_Weight/Models/DrugInfo.cs | 96 +
DM_Weight/Models/DrugManuNo.cs | 35 +
DM_Weight/Models/DrugPleaseClaim.cs | 130 +
DM_Weight/Models/DrugPleaseManuNo.cs | 21 +
DM_Weight/Models/DrugPleaseState.cs | 20 +
DM_Weight/Models/DrugType.cs | 14 +
DM_Weight/Models/HkcChangeShifts.cs | 45 +
DM_Weight/Models/InOutInvoice.cs | 149 +
DM_Weight/Models/Invoice.cs | 20 +
DM_Weight/Models/MachineRecord.cs | 154 +
DM_Weight/Models/OrderDepartment.cs | 16 +
DM_Weight/Models/OrderDetail.cs | 131 +
DM_Weight/Models/OrderFinish.cs | 32 +
DM_Weight/Models/OrderInfo.cs | 211 +
DM_Weight/Models/PremissionDm.cs | 35 +
DM_Weight/Models/RejectionReport.cs | 104 +
DM_Weight/Models/RoleDm.cs | 40 +
DM_Weight/Models/SettingPage.cs | 56 +
DM_Weight/Models/ShiftsReport.cs | 55 +
DM_Weight/Models/UserList.cs | 77 +
DM_Weight/Port/PortUtil.cs | 1931 ++
DM_Weight/Port/ScreenUtil.cs | 171 +
DM_Weight/Report/GridReportUtil.cs | 369 +
.../ReturnEmptyDistory_template.grf | 432 +
DM_Weight/ReportTemp/account_book_temp.grf | 618 +
DM_Weight/ReportTemp/changeShifts_temp.grf | 345 +
DM_Weight/ReportTemp/machine_log_add.grf | 283 +
DM_Weight/ReportTemp/machine_log_check.grf | 283 +
DM_Weight/ReportTemp/machine_log_return.grf | 283 +
DM_Weight/ReportTemp/machine_log_take.grf | 283 +
DM_Weight/ReportTemp/orderUse_template.grf | 633 +
DM_Weight/ReportTemp/stock_template.grf | 346 +
.../Validation/NotEmptyValidationRule.cs | 20 +
.../ViewModels/AccountWindowViewModel.cs | 378 +
.../ViewModels/AddDrugControlViewModel.cs | 534 +
.../ViewModels/AddToJiaoJieDialogViewModel.cs | 569 +
.../ViewModels/AddToJiaoJieWindowViewModel.cs | 505 +
.../ViewModels/ApplyInStockWindowViewModel.cs | 844 +
.../ViewModels/ApplyListWindowViewModel.cs | 202 +
.../BindingChannelDialogViewModel.cs | 453 +
.../BindingChannelNewDialogViewModel.cs | 494 +
.../ViewModels/ChangeShiftsDialogViewModel.cs | 656 +
.../ChangeShiftsListWindowViewModel.cs | 190 +
.../ViewModels/CheckStockWindowViewModel.cs | 336 +
.../ViewModels/CollectDrugDialogViewModel.cs | 231 +
.../ViewModels/CollectDrugWindowViewModel.cs | 291 +
.../ViewModels/CollectionViewGroupInternal.cs | 6 +
DM_Weight/ViewModels/DebugWindowViewModel.cs | 40 +
.../ViewModels/DestoryEmptyDialogViewModel.cs | 211 +
.../DrawerAddDrugWindowViewModel.cs | 484 +
.../DrawerTakeDrugWindowViewModel.cs | 483 +
.../ViewModels/DrugBaseWindowViewModel.cs | 12 +
.../ViewModels/DrugListWindowViewModel.cs | 397 +
.../ViewModels/EditUserDialogViewModel.cs | 210 +
.../ViewModels/FingerprintDialogViewModel.cs | 133 +
.../ViewModels/FridgeOnlyWindowViewModel.cs | 224 +
DM_Weight/ViewModels/FridgeWindowViewModel.cs | 345 +
DM_Weight/ViewModels/HomeWindowViewModel.cs | 617 +
.../ViewModels/InvoiceAddDialogViewModel.cs | 453 +
.../ViewModels/InvoiceInWindowViewModel.cs | 384 +
.../ViewModels/InvoiceOutWindowViewModel.cs | 270 +
.../ViewModels/InvoiceTakeDialogViewModel.cs | 525 +
DM_Weight/ViewModels/LoginWindowViewModel.cs | 476 +
.../MachineRecordWindowViewModel.cs | 209 +
DM_Weight/ViewModels/MainWindowViewModel.cs | 103 +
.../MultiOrderTakeDialogViewModel.cs | 488 +
.../MultiOrderTakeDrugWindowViewModel.cs | 380 +
.../ViewModels/OrderReturnDialogViewModel.cs | 510 +
.../ViewModels/OrderTakeDialogViewModel.cs | 546 +
.../OrderTakeDrugWindowViewModel.cs | 275 +
DM_Weight/ViewModels/PremissionViewModel.cs | 36 +
.../ViewModels/ReturnDrugDialogViewModel.cs | 426 +
.../ViewModels/ReturnDrugWindow2ViewModel.cs | 254 +
.../ViewModels/ReturnDrugWindowViewModel.cs | 216 +
.../ViewModels/ReturnEmptyDialogViewModel.cs | 385 +
.../ViewModels/ReturnEmptyWindowViewModel.cs | 364 +
.../ViewModels/RoleManagerWindowViewModel.cs | 796 +
.../ViewModels/SelfAddDialogViewModel.cs | 451 +
.../ViewModels/SelfAddWindowViewModel.cs | 201 +
.../ViewModels/SelfTakeDialogViewModel.cs | 417 +
.../ViewModels/SelfTakeDrugWindowViewModel.cs | 192 +
.../ViewModels/SettingMainWindowViewModel.cs | 82 +
.../ViewModels/SettingWindowViewModel.cs | 83 +
.../ViewModels/ShowMessageDialogViewModel.cs | 54 +
.../ViewModels/StockListWindowViewModel.cs | 229 +
.../ViewModels/UserManagerWindowViewModel.cs | 198 +
DM_Weight/Views/AccountWindow.xaml | 236 +
DM_Weight/Views/AccountWindow.xaml.cs | 51 +
DM_Weight/Views/AddDrugControl.xaml | 395 +
DM_Weight/Views/AddDrugControl.xaml.cs | 41 +
DM_Weight/Views/AddToJiaoJieWindow.xaml | 176 +
DM_Weight/Views/AddToJiaoJieWindow.xaml.cs | 64 +
DM_Weight/Views/ApplyInStockWindow.xaml | 278 +
DM_Weight/Views/ApplyInStockWindow.xaml.cs | 28 +
DM_Weight/Views/ApplyListWindow.xaml | 305 +
DM_Weight/Views/ApplyListWindow.xaml.cs | 28 +
DM_Weight/Views/ChangeShiftsListWindow.xaml | 136 +
.../Views/ChangeShiftsListWindow.xaml.cs | 28 +
DM_Weight/Views/CheckStockWindow.xaml | 314 +
DM_Weight/Views/CheckStockWindow.xaml.cs | 28 +
DM_Weight/Views/CollectDrugWindow.xaml | 140 +
DM_Weight/Views/CollectDrugWindow.xaml.cs | 28 +
DM_Weight/Views/DebugWindow.xaml | 23 +
DM_Weight/Views/DebugWindow.xaml.cs | 28 +
.../Views/Dialog/AddToJiaoJieDialog.xaml | 152 +
.../Views/Dialog/AddToJiaoJieDialog.xaml.cs | 28 +
.../Views/Dialog/BindingChannelDialog.xaml | 207 +
.../Views/Dialog/BindingChannelDialog.xaml.cs | 47 +
.../Views/Dialog/BindingChannelNewDialog.xaml | 230 +
.../Dialog/BindingChannelNewDialog.xaml.cs | 47 +
.../Views/Dialog/ChangeShiftsDialog.xaml | 163 +
.../Views/Dialog/ChangeShiftsDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/CollectDrugDialog.xaml | 145 +
.../Views/Dialog/CollectDrugDialog.xaml.cs | 28 +
.../Views/Dialog/DestoryEmptyDialog.xaml | 196 +
.../Views/Dialog/DestoryEmptyDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/EditUserDialog.xaml | 106 +
DM_Weight/Views/Dialog/EditUserDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/FingerprintDialog.xaml | 59 +
.../Views/Dialog/FingerprintDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/InvoiceAddDialog.xaml | 180 +
.../Views/Dialog/InvoiceAddDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/InvoiceTakeDialog.xaml | 181 +
.../Views/Dialog/InvoiceTakeDialog.xaml.cs | 28 +
.../Views/Dialog/MultiOrderTakeDialog.xaml | 180 +
.../Views/Dialog/MultiOrderTakeDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/OrderReturnDialog.xaml | 239 +
.../Views/Dialog/OrderReturnDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/OrderTakeDialog.xaml | 222 +
.../Views/Dialog/OrderTakeDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/ReturnDrugDialog.xaml | 201 +
.../Views/Dialog/ReturnDrugDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/ReturnEmptyDialog.xaml | 223 +
.../Views/Dialog/ReturnEmptyDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/SelfAddDialog.xaml | 143 +
DM_Weight/Views/Dialog/SelfAddDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/SelfTakeDialog.xaml | 143 +
DM_Weight/Views/Dialog/SelfTakeDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/ShowMessageDialog.xaml | 23 +
.../Views/Dialog/ShowMessageDialog.xaml.cs | 28 +
DM_Weight/Views/DrawerAddDrugWindow.xaml | 362 +
DM_Weight/Views/DrawerAddDrugWindow.xaml.cs | 28 +
DM_Weight/Views/DrawerTakeDrugWindow.xaml | 280 +
DM_Weight/Views/DrawerTakeDrugWindow.xaml.cs | 28 +
DM_Weight/Views/DrugBaseWindow.xaml | 13 +
DM_Weight/Views/DrugBaseWindow.xaml.cs | 28 +
DM_Weight/Views/DrugListWindow.xaml | 219 +
DM_Weight/Views/DrugListWindow.xaml.cs | 28 +
DM_Weight/Views/FridgeOnlyWindow.xaml | 65 +
DM_Weight/Views/FridgeOnlyWindow.xaml.cs | 28 +
DM_Weight/Views/FridgeWindow.xaml | 106 +
DM_Weight/Views/FridgeWindow.xaml.cs | 28 +
DM_Weight/Views/HomeWindow.xaml | 136 +
DM_Weight/Views/HomeWindow.xaml.cs | 28 +
DM_Weight/Views/InvoiceInWindow.xaml | 243 +
DM_Weight/Views/InvoiceInWindow.xaml.cs | 28 +
DM_Weight/Views/InvoiceOutWindow.xaml | 121 +
DM_Weight/Views/InvoiceOutWindow.xaml.cs | 28 +
DM_Weight/Views/LoginWindow.xaml | 205 +
DM_Weight/Views/LoginWindow.xaml.cs | 37 +
DM_Weight/Views/MachineRecordWindow.xaml | 150 +
DM_Weight/Views/MachineRecordWindow.xaml.cs | 28 +
DM_Weight/Views/MainWindow.xaml | 40 +
DM_Weight/Views/MainWindow.xaml.cs | 47 +
DM_Weight/Views/MultiOrderTakeDrugWindow.xaml | 151 +
.../Views/MultiOrderTakeDrugWindow.xaml.cs | 55 +
DM_Weight/Views/OrderTakeDrugWindow.xaml | 134 +
DM_Weight/Views/OrderTakeDrugWindow.xaml.cs | 33 +
DM_Weight/Views/ReturnDrugWindow.xaml | 117 +
DM_Weight/Views/ReturnDrugWindow.xaml.cs | 28 +
DM_Weight/Views/ReturnDrugWindow2.xaml | 127 +
DM_Weight/Views/ReturnDrugWindow2.xaml.cs | 28 +
DM_Weight/Views/ReturnEmptyWindow.xaml | 132 +
DM_Weight/Views/ReturnEmptyWindow.xaml.cs | 28 +
DM_Weight/Views/RoleManagerWindow.xaml | 196 +
DM_Weight/Views/RoleManagerWindow.xaml.cs | 28 +
DM_Weight/Views/SelfAddWindow.xaml | 238 +
DM_Weight/Views/SelfAddWindow.xaml.cs | 28 +
DM_Weight/Views/SelfTakeDrugWindow.xaml | 171 +
DM_Weight/Views/SelfTakeDrugWindow.xaml.cs | 28 +
DM_Weight/Views/SettingMainWindow.xaml | 44 +
DM_Weight/Views/SettingMainWindow.xaml.cs | 28 +
DM_Weight/Views/SettingWindow.xaml | 38 +
DM_Weight/Views/SettingWindow.xaml.cs | 28 +
DM_Weight/Views/StockListWindow.xaml | 275 +
DM_Weight/Views/StockListWindow.xaml.cs | 28 +
DM_Weight/Views/Test.xaml | 138 +
DM_Weight/Views/Test.xaml.cs | 28 +
DM_Weight/Views/UserManagerWindow.xaml | 123 +
DM_Weight/Views/UserManagerWindow.xaml.cs | 28 +
DM_Weight/favicon.ico | Bin 0 -> 270398 bytes
DM_Weight/log4net.config | 53 +
DM_Weight/msg/AddDrugEvent.cs | 14 +
DM_Weight/msg/FingerprintEvent.cs | 14 +
DM_Weight/msg/IsSelectedEvent.cs | 14 +
DM_Weight/msg/LoginOutEvent.cs | 13 +
DM_Weight/msg/PortUtilEvent.cs | 14 +
DM_Weight/msg/SnackbarEvent.cs | 14 +
DM_Weight/select/OrderTakeSelect.cs | 14 +
DM_Weight/util/AlertMsg.cs | 19 +
DM_Weight/util/BindingProxy.cs | 18 +
DM_Weight/util/CheckComputerFreeState.cs | 53 +
DM_Weight/util/DeviceMsg.cs | 33 +
DM_Weight/util/DialogServiceExtensions.cs | 55 +
DM_Weight/util/FingerprintMsg.cs | 25 +
DM_Weight/util/GridViewExtensions.cs | 70 +
DM_Weight/util/MD5.cs | 34 +
DM_Weight/util/MaterialDialogService.cs | 159 +
DM_Weight/util/MsgType.cs | 16 +
DM_Weight/util/ReadApp.cs | 23 +
DM_Weight/util/SqlSugarHelper.cs | 26 +
DM_Weight/util/TabTip/AnimationHelper.cs | 328 +
DM_Weight/util/TabTip/EnvironmentEx.cs | 40 +
DM_Weight/util/TabTip/HardwareKeyboard.cs | 111 +
DM_Weight/util/TabTip/PoolingTimer.cs | 26 +
DM_Weight/util/TabTip/Screen.cs | 101 +
DM_Weight/util/TabTip/TabTip.cs | 166 +
DM_Weight/util/TabTip/TabTipAutomation.cs | 121 +
DM_Weight/util/TabTip/Taskbar.cs | 132 +
DM_Weight/util/TransExpV2.cs | 41 +
DM_WeightTests/DM_WeightTests.csproj | 23 +
DM_WeightTests/Port/ScreenUtilTests.cs | 12 +
275 files changed, 61005 insertions(+)
create mode 100644 DM_Weight.Commons/DM_Weight.Commons.csproj
create mode 100644 DM_Weight.Commons/ValidatRules/ValidationErrorMappingBehavior.cs
create mode 100644 DM_Weight.sln
create mode 100644 DM_Weight/App.config
create mode 100644 DM_Weight/App.xaml
create mode 100644 DM_Weight/App.xaml.cs
create mode 100644 DM_Weight/AssemblyInfo.cs
create mode 100644 DM_Weight/Common/CRC16MODBUS.cs
create mode 100644 DM_Weight/Common/CommonClass.cs
create mode 100644 DM_Weight/Common/PrismManager.cs
create mode 100644 DM_Weight/Common/TemperatureRangeRule.cs
create mode 100644 DM_Weight/Components/pagination/Pagination.xaml
create mode 100644 DM_Weight/Components/pagination/Pagination.xaml.cs
create mode 100644 DM_Weight/Components/pagination/PaginationViewModel.cs
create mode 100644 DM_Weight/Converter/ApplyListConverter.cs
create mode 100644 DM_Weight/Converter/BoardTypeConverter.cs
create mode 100644 DM_Weight/Converter/DrawerSelectConverter.cs
create mode 100644 DM_Weight/Converter/ForeColorConverter.cs
create mode 100644 DM_Weight/Converter/GroupSumConverter.cs
create mode 100644 DM_Weight/Converter/InputQuantityConverter.cs
create mode 100644 DM_Weight/Converter/NullableToEnabelConverter.cs
create mode 100644 DM_Weight/Converter/OpenBoxConverter.cs
create mode 100644 DM_Weight/Converter/OrderStatusConverter.cs
create mode 100644 DM_Weight/Converter/PaginationConverter.cs
create mode 100644 DM_Weight/Converter/QuantityCountConverter.cs
create mode 100644 DM_Weight/Converter/ShiftsStateConverter.cs
create mode 100644 DM_Weight/Converter/StatusConverter.cs
create mode 100644 DM_Weight/Converter/StockStatusConverter.cs
create mode 100644 DM_Weight/Converter/TotalCountConverter.cs
create mode 100644 DM_Weight/CustomAttribute/MessageAttribute.cs
create mode 100644 DM_Weight/DM_Weight.csproj
create mode 100644 DM_Weight/Finger/FingerprintUtil.cs
create mode 100644 DM_Weight/HIKVISION/CHCNetSDK.cs
create mode 100644 DM_Weight/HIKVISION/CHKFunction.cs
create mode 100644 DM_Weight/Images/TbExit.png
create mode 100644 DM_Weight/Images/TbJiay.png
create mode 100644 DM_Weight/Images/TbKuc.png
create mode 100644 DM_Weight/Images/TbQyao.png
create mode 100644 DM_Weight/Images/TbSet.png
create mode 100644 DM_Weight/Images/TbTuiy.png
create mode 100644 DM_Weight/Images/body-bg.jpg
create mode 100644 DM_Weight/Images/box-16.jpg
create mode 100644 DM_Weight/Images/box.png
create mode 100644 DM_Weight/Images/favicon.ico
create mode 100644 DM_Weight/Images/finger-bg-r.png
create mode 100644 DM_Weight/Images/logo.png
create mode 100644 DM_Weight/Models/AccountBookG2.cs
create mode 100644 DM_Weight/Models/AccountType.cs
create mode 100644 DM_Weight/Models/ChannelList.cs
create mode 100644 DM_Weight/Models/ChannelStock.cs
create mode 100644 DM_Weight/Models/CollectDrug.cs
create mode 100644 DM_Weight/Models/DestoryDetail.cs
create mode 100644 DM_Weight/Models/DrugBase.cs
create mode 100644 DM_Weight/Models/DrugInfo.cs
create mode 100644 DM_Weight/Models/DrugManuNo.cs
create mode 100644 DM_Weight/Models/DrugPleaseClaim.cs
create mode 100644 DM_Weight/Models/DrugPleaseManuNo.cs
create mode 100644 DM_Weight/Models/DrugPleaseState.cs
create mode 100644 DM_Weight/Models/DrugType.cs
create mode 100644 DM_Weight/Models/HkcChangeShifts.cs
create mode 100644 DM_Weight/Models/InOutInvoice.cs
create mode 100644 DM_Weight/Models/Invoice.cs
create mode 100644 DM_Weight/Models/MachineRecord.cs
create mode 100644 DM_Weight/Models/OrderDepartment.cs
create mode 100644 DM_Weight/Models/OrderDetail.cs
create mode 100644 DM_Weight/Models/OrderFinish.cs
create mode 100644 DM_Weight/Models/OrderInfo.cs
create mode 100644 DM_Weight/Models/PremissionDm.cs
create mode 100644 DM_Weight/Models/RejectionReport.cs
create mode 100644 DM_Weight/Models/RoleDm.cs
create mode 100644 DM_Weight/Models/SettingPage.cs
create mode 100644 DM_Weight/Models/ShiftsReport.cs
create mode 100644 DM_Weight/Models/UserList.cs
create mode 100644 DM_Weight/Port/PortUtil.cs
create mode 100644 DM_Weight/Port/ScreenUtil.cs
create mode 100644 DM_Weight/Report/GridReportUtil.cs
create mode 100644 DM_Weight/ReportTemp/ReturnEmptyDistory_template.grf
create mode 100644 DM_Weight/ReportTemp/account_book_temp.grf
create mode 100644 DM_Weight/ReportTemp/changeShifts_temp.grf
create mode 100644 DM_Weight/ReportTemp/machine_log_add.grf
create mode 100644 DM_Weight/ReportTemp/machine_log_check.grf
create mode 100644 DM_Weight/ReportTemp/machine_log_return.grf
create mode 100644 DM_Weight/ReportTemp/machine_log_take.grf
create mode 100644 DM_Weight/ReportTemp/orderUse_template.grf
create mode 100644 DM_Weight/ReportTemp/stock_template.grf
create mode 100644 DM_Weight/Validation/NotEmptyValidationRule.cs
create mode 100644 DM_Weight/ViewModels/AccountWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/AddDrugControlViewModel.cs
create mode 100644 DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/ApplyListWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/BindingChannelDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/BindingChannelNewDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/ChangeShiftsDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/ChangeShiftsListWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/CheckStockWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/CollectDrugDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/CollectDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/CollectionViewGroupInternal.cs
create mode 100644 DM_Weight/ViewModels/DebugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/DestoryEmptyDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/DrugBaseWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/DrugListWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/EditUserDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/FingerprintDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/FridgeOnlyWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/FridgeWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/HomeWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/InvoiceInWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/InvoiceOutWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/LoginWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/MachineRecordWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/MainWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/MultiOrderTakeDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/OrderReturnDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/OrderTakeDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/OrderTakeDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/PremissionViewModel.cs
create mode 100644 DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/ReturnDrugWindow2ViewModel.cs
create mode 100644 DM_Weight/ViewModels/ReturnDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/ReturnEmptyWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/RoleManagerWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/SelfAddDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/SelfAddWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/SelfTakeDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/SelfTakeDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/SettingMainWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/SettingWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/ShowMessageDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/StockListWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/UserManagerWindowViewModel.cs
create mode 100644 DM_Weight/Views/AccountWindow.xaml
create mode 100644 DM_Weight/Views/AccountWindow.xaml.cs
create mode 100644 DM_Weight/Views/AddDrugControl.xaml
create mode 100644 DM_Weight/Views/AddDrugControl.xaml.cs
create mode 100644 DM_Weight/Views/AddToJiaoJieWindow.xaml
create mode 100644 DM_Weight/Views/AddToJiaoJieWindow.xaml.cs
create mode 100644 DM_Weight/Views/ApplyInStockWindow.xaml
create mode 100644 DM_Weight/Views/ApplyInStockWindow.xaml.cs
create mode 100644 DM_Weight/Views/ApplyListWindow.xaml
create mode 100644 DM_Weight/Views/ApplyListWindow.xaml.cs
create mode 100644 DM_Weight/Views/ChangeShiftsListWindow.xaml
create mode 100644 DM_Weight/Views/ChangeShiftsListWindow.xaml.cs
create mode 100644 DM_Weight/Views/CheckStockWindow.xaml
create mode 100644 DM_Weight/Views/CheckStockWindow.xaml.cs
create mode 100644 DM_Weight/Views/CollectDrugWindow.xaml
create mode 100644 DM_Weight/Views/CollectDrugWindow.xaml.cs
create mode 100644 DM_Weight/Views/DebugWindow.xaml
create mode 100644 DM_Weight/Views/DebugWindow.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/AddToJiaoJieDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/AddToJiaoJieDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/BindingChannelDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/BindingChannelDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/BindingChannelNewDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/BindingChannelNewDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/ChangeShiftsDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/ChangeShiftsDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/CollectDrugDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/CollectDrugDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/DestoryEmptyDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/DestoryEmptyDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/EditUserDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/EditUserDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/FingerprintDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/FingerprintDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/InvoiceAddDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/InvoiceAddDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/InvoiceTakeDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/InvoiceTakeDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/MultiOrderTakeDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/MultiOrderTakeDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/OrderReturnDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/OrderReturnDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/OrderTakeDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/OrderTakeDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/ReturnDrugDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/ReturnDrugDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/ReturnEmptyDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/ReturnEmptyDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/SelfAddDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/SelfAddDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/SelfTakeDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/SelfTakeDialog.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/ShowMessageDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/ShowMessageDialog.xaml.cs
create mode 100644 DM_Weight/Views/DrawerAddDrugWindow.xaml
create mode 100644 DM_Weight/Views/DrawerAddDrugWindow.xaml.cs
create mode 100644 DM_Weight/Views/DrawerTakeDrugWindow.xaml
create mode 100644 DM_Weight/Views/DrawerTakeDrugWindow.xaml.cs
create mode 100644 DM_Weight/Views/DrugBaseWindow.xaml
create mode 100644 DM_Weight/Views/DrugBaseWindow.xaml.cs
create mode 100644 DM_Weight/Views/DrugListWindow.xaml
create mode 100644 DM_Weight/Views/DrugListWindow.xaml.cs
create mode 100644 DM_Weight/Views/FridgeOnlyWindow.xaml
create mode 100644 DM_Weight/Views/FridgeOnlyWindow.xaml.cs
create mode 100644 DM_Weight/Views/FridgeWindow.xaml
create mode 100644 DM_Weight/Views/FridgeWindow.xaml.cs
create mode 100644 DM_Weight/Views/HomeWindow.xaml
create mode 100644 DM_Weight/Views/HomeWindow.xaml.cs
create mode 100644 DM_Weight/Views/InvoiceInWindow.xaml
create mode 100644 DM_Weight/Views/InvoiceInWindow.xaml.cs
create mode 100644 DM_Weight/Views/InvoiceOutWindow.xaml
create mode 100644 DM_Weight/Views/InvoiceOutWindow.xaml.cs
create mode 100644 DM_Weight/Views/LoginWindow.xaml
create mode 100644 DM_Weight/Views/LoginWindow.xaml.cs
create mode 100644 DM_Weight/Views/MachineRecordWindow.xaml
create mode 100644 DM_Weight/Views/MachineRecordWindow.xaml.cs
create mode 100644 DM_Weight/Views/MainWindow.xaml
create mode 100644 DM_Weight/Views/MainWindow.xaml.cs
create mode 100644 DM_Weight/Views/MultiOrderTakeDrugWindow.xaml
create mode 100644 DM_Weight/Views/MultiOrderTakeDrugWindow.xaml.cs
create mode 100644 DM_Weight/Views/OrderTakeDrugWindow.xaml
create mode 100644 DM_Weight/Views/OrderTakeDrugWindow.xaml.cs
create mode 100644 DM_Weight/Views/ReturnDrugWindow.xaml
create mode 100644 DM_Weight/Views/ReturnDrugWindow.xaml.cs
create mode 100644 DM_Weight/Views/ReturnDrugWindow2.xaml
create mode 100644 DM_Weight/Views/ReturnDrugWindow2.xaml.cs
create mode 100644 DM_Weight/Views/ReturnEmptyWindow.xaml
create mode 100644 DM_Weight/Views/ReturnEmptyWindow.xaml.cs
create mode 100644 DM_Weight/Views/RoleManagerWindow.xaml
create mode 100644 DM_Weight/Views/RoleManagerWindow.xaml.cs
create mode 100644 DM_Weight/Views/SelfAddWindow.xaml
create mode 100644 DM_Weight/Views/SelfAddWindow.xaml.cs
create mode 100644 DM_Weight/Views/SelfTakeDrugWindow.xaml
create mode 100644 DM_Weight/Views/SelfTakeDrugWindow.xaml.cs
create mode 100644 DM_Weight/Views/SettingMainWindow.xaml
create mode 100644 DM_Weight/Views/SettingMainWindow.xaml.cs
create mode 100644 DM_Weight/Views/SettingWindow.xaml
create mode 100644 DM_Weight/Views/SettingWindow.xaml.cs
create mode 100644 DM_Weight/Views/StockListWindow.xaml
create mode 100644 DM_Weight/Views/StockListWindow.xaml.cs
create mode 100644 DM_Weight/Views/Test.xaml
create mode 100644 DM_Weight/Views/Test.xaml.cs
create mode 100644 DM_Weight/Views/UserManagerWindow.xaml
create mode 100644 DM_Weight/Views/UserManagerWindow.xaml.cs
create mode 100644 DM_Weight/favicon.ico
create mode 100644 DM_Weight/log4net.config
create mode 100644 DM_Weight/msg/AddDrugEvent.cs
create mode 100644 DM_Weight/msg/FingerprintEvent.cs
create mode 100644 DM_Weight/msg/IsSelectedEvent.cs
create mode 100644 DM_Weight/msg/LoginOutEvent.cs
create mode 100644 DM_Weight/msg/PortUtilEvent.cs
create mode 100644 DM_Weight/msg/SnackbarEvent.cs
create mode 100644 DM_Weight/select/OrderTakeSelect.cs
create mode 100644 DM_Weight/util/AlertMsg.cs
create mode 100644 DM_Weight/util/BindingProxy.cs
create mode 100644 DM_Weight/util/CheckComputerFreeState.cs
create mode 100644 DM_Weight/util/DeviceMsg.cs
create mode 100644 DM_Weight/util/DialogServiceExtensions.cs
create mode 100644 DM_Weight/util/FingerprintMsg.cs
create mode 100644 DM_Weight/util/GridViewExtensions.cs
create mode 100644 DM_Weight/util/MD5.cs
create mode 100644 DM_Weight/util/MaterialDialogService.cs
create mode 100644 DM_Weight/util/MsgType.cs
create mode 100644 DM_Weight/util/ReadApp.cs
create mode 100644 DM_Weight/util/SqlSugarHelper.cs
create mode 100644 DM_Weight/util/TabTip/AnimationHelper.cs
create mode 100644 DM_Weight/util/TabTip/EnvironmentEx.cs
create mode 100644 DM_Weight/util/TabTip/HardwareKeyboard.cs
create mode 100644 DM_Weight/util/TabTip/PoolingTimer.cs
create mode 100644 DM_Weight/util/TabTip/Screen.cs
create mode 100644 DM_Weight/util/TabTip/TabTip.cs
create mode 100644 DM_Weight/util/TabTip/TabTipAutomation.cs
create mode 100644 DM_Weight/util/TabTip/Taskbar.cs
create mode 100644 DM_Weight/util/TransExpV2.cs
create mode 100644 DM_WeightTests/DM_WeightTests.csproj
create mode 100644 DM_WeightTests/Port/ScreenUtilTests.cs
diff --git a/DM_Weight.Commons/DM_Weight.Commons.csproj b/DM_Weight.Commons/DM_Weight.Commons.csproj
new file mode 100644
index 0000000..467963e
--- /dev/null
+++ b/DM_Weight.Commons/DM_Weight.Commons.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net6.0-windows
+ enable
+ true
+
+
+
+
+
+
+
diff --git a/DM_Weight.Commons/ValidatRules/ValidationErrorMappingBehavior.cs b/DM_Weight.Commons/ValidatRules/ValidationErrorMappingBehavior.cs
new file mode 100644
index 0000000..fce3c87
--- /dev/null
+++ b/DM_Weight.Commons/ValidatRules/ValidationErrorMappingBehavior.cs
@@ -0,0 +1,75 @@
+using Microsoft.Xaml.Behaviors;
+using System.Collections.ObjectModel;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace DM_Weight.Commons.ValidatRules
+{
+ public class ValidationErrorMappingBehavior : Behavior
+ {
+ #region Properties
+
+ public static readonly DependencyProperty ValidationErrorsProperty =
+ DependencyProperty.Register("ValidationErrors", typeof(ObservableCollection),
+ typeof(ValidationErrorMappingBehavior), new PropertyMetadata(new ObservableCollection()));
+
+ public ObservableCollection ValidationErrors
+ {
+ get { return (ObservableCollection)this.GetValue(ValidationErrorsProperty); }
+ set { this.SetValue(ValidationErrorsProperty, value); }
+ }
+
+ public static readonly DependencyProperty HasValidationErrorProperty = DependencyProperty.Register("HasValidationError",
+ typeof(bool), typeof(ValidationErrorMappingBehavior), new PropertyMetadata(false));
+
+ public bool HasValidationError
+ {
+ get { return (bool)this.GetValue(HasValidationErrorProperty); }
+ set { this.SetValue(HasValidationErrorProperty, value); }
+ }
+
+ #endregion
+
+ #region Constructors
+
+ public ValidationErrorMappingBehavior()
+ : base()
+ { }
+
+ #endregion
+
+ #region Events & Event Methods
+
+ private void Validation_Error(object sender, ValidationErrorEventArgs e)
+ {
+ if (e.Action == ValidationErrorEventAction.Added)
+ {
+ this.ValidationErrors.Add(e.Error);
+ }
+ else
+ {
+ this.ValidationErrors.Remove(e.Error);
+ }
+
+ this.HasValidationError = this.ValidationErrors.Count > 0;
+ }
+
+ #endregion
+
+ #region Support Methods
+
+ protected override void OnAttached()
+ {
+ base.OnAttached();
+ Validation.AddErrorHandler(this.AssociatedObject, Validation_Error);
+ }
+
+ protected override void OnDetaching()
+ {
+ base.OnDetaching();
+ Validation.RemoveErrorHandler(this.AssociatedObject, Validation_Error);
+ }
+
+ #endregion
+ }
+}
diff --git a/DM_Weight.sln b/DM_Weight.sln
new file mode 100644
index 0000000..cd46efa
--- /dev/null
+++ b/DM_Weight.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32922.545
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DM_Weight", "DM_Weight\DM_Weight.csproj", "{439FA76B-F874-40DB-BAF2-E3647CD55B10}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DM_Weight.Commons", "DM_Weight.Commons\DM_Weight.Commons.csproj", "{7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x64.ActiveCfg = Debug|x64
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x64.Build.0 = Debug|x64
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x86.ActiveCfg = Debug|x86
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x86.Build.0 = Debug|x86
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|Any CPU.Build.0 = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x64.ActiveCfg = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x64.Build.0 = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x86.ActiveCfg = Debug|x86
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x86.Build.0 = Debug|x86
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x64.Build.0 = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x86.Build.0 = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x64.ActiveCfg = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x64.Build.0 = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x86.ActiveCfg = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {E50E8179-1102-41F1-92F5-2905C75898A6}
+ EndGlobalSection
+EndGlobal
diff --git a/DM_Weight/App.config b/DM_Weight/App.config
new file mode 100644
index 0000000..72253dd
--- /dev/null
+++ b/DM_Weight/App.config
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DM_Weight/App.xaml b/DM_Weight/App.xaml
new file mode 100644
index 0000000..ef8d445
--- /dev/null
+++ b/DM_Weight/App.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DM_Weight/App.xaml.cs b/DM_Weight/App.xaml.cs
new file mode 100644
index 0000000..d355a08
--- /dev/null
+++ b/DM_Weight/App.xaml.cs
@@ -0,0 +1,259 @@
+using DM_Weight.Finger;
+using DM_Weight.Port;
+using DM_Weight.util.TabTip;
+using DM_Weight.util;
+using DM_Weight.ViewModels;
+using DM_Weight.Views.Dialog;
+using DM_Weight.Views;
+using log4net.Config;
+using Prism.Ioc;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Configuration;
+using System.Data;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using Prism.Unity;
+using log4net;
+using System.Windows.Interop;
+using System.Windows.Threading;
+using System.Timers;
+using DM_Weight.HIKVISION;
+
+namespace DM_Weight
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : PrismApplication
+ {
+ private readonly ILog logger = LogManager.GetLogger(typeof(App));
+ public App()
+ {
+ TabTipAutomation.IgnoreHardwareKeyboard = HardwareKeyboardIgnoreOptions.IgnoreAll;
+ TabTipAutomation.BindTo();
+ TabTipAutomation.BindTo();
+ }
+
+
+
+ protected override Window CreateShell()
+ {
+ //UI线程未捕获异常处理事件
+ this.DispatcherUnhandledException += OnDispatcherUnhandledException;
+ //Task线程内未捕获异常处理事件
+ TaskScheduler.UnobservedTaskException += OnUnobservedTaskException;
+ //多线程异常
+ AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
+
+ return Container.Resolve();
+ }
+
+ void OnDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
+ {
+ logger.Error($"发生错误:{e.Exception.Message}");
+ e.Handled = true;
+ }
+
+ void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
+ {
+
+ foreach (Exception item in e.Exception.InnerExceptions)
+ {
+ logger.Error($"异常类型:{item.GetType()}{Environment.NewLine}来自:{item.Source}{Environment.NewLine}异常内容:{item.Message}");
+ }
+
+ //将异常标识为已经观察到
+ e.SetObserved();
+ }
+
+ void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
+ {
+ logger.Error($"Unhandled exception.{e.ToString()}");
+ }
+
+
+ protected override void InitializeShell(Window shell)
+ {
+
+ base.InitializeShell(shell);
+ }
+
+ protected override void RegisterTypes(IContainerRegistry containerRegistry)
+ {
+ // 注入日志
+ XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config"));
+ //containerRegistry.RegisterInstance(LogManager.GetLogger(""));
+
+ // 串口工具
+ containerRegistry.RegisterSingleton();
+ // 指纹机工具
+ containerRegistry.RegisterSingleton();
+ // 组态屏工具
+ containerRegistry.RegisterSingleton();
+ // 录像机
+ //containerRegistry.RegisterSingleton();
+
+ containerRegistry.Register();
+
+ // 主窗口
+ containerRegistry.Register();
+ containerRegistry.RegisterForNavigation();
+
+ // 分页
+ //containerRegistry.Register();
+ //containerRegistry.Register();
+
+ // 登录页面
+ containerRegistry.RegisterForNavigation();
+
+ // 布局页面
+ containerRegistry.RegisterForNavigation();
+
+ // 录入指纹模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+
+
+ #region 取药
+
+ //交接柜补药
+ containerRegistry.RegisterForNavigation();
+ //交接柜补药页面弹窗
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+
+
+
+ // 处方取药页面
+ containerRegistry.RegisterForNavigation();
+ // 处方取药模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 调拨取药页面
+ containerRegistry.RegisterForNavigation();
+ // 调拨取药模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 抽屉取药页面
+ containerRegistry.RegisterForNavigation();
+ // 自选取药模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 自选取药页面
+ containerRegistry.RegisterForNavigation();
+
+ //多处方取药
+ containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ #region 加药
+ // 自选加药页面
+ containerRegistry.RegisterForNavigation();
+ // 调拨加药页面
+ containerRegistry.RegisterForNavigation();
+
+ // 调拨取药模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 抽屉加药页面
+ containerRegistry.RegisterForNavigation();
+ // 自选加药模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ //多批次抽屉加药
+ containerRegistry.RegisterForNavigation();
+ //药品请领
+ containerRegistry.RegisterForNavigation();
+ // 药品请领模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+
+ //请领列表
+ containerRegistry.RegisterForNavigation();
+ //请领入库
+ containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ #region 还药
+ // 还药页面
+ containerRegistry.RegisterForNavigation();
+ // 按记录归还药品模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+
+ // 还药页面2
+ containerRegistry.RegisterForNavigation();
+ // 按处方归还药品模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 还空瓶页面
+ containerRegistry.RegisterForNavigation();
+ // 归还空瓶模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 空瓶销毁模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ #endregion
+
+ #region 库存管理
+ // 库存列表页面
+ containerRegistry.RegisterForNavigation();
+ // 库位绑定模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ //同一药品多批次库位绑定
+ containerRegistry.RegisterForNavigation();
+ // 库存盘点页面
+ containerRegistry.RegisterForNavigation();
+ // 药品列表页面
+ containerRegistry.RegisterForNavigation();
+
+ //交接班记录
+ containerRegistry.RegisterForNavigation();
+ //交接班弹窗
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+
+ containerRegistry.RegisterForNavigation();
+ #endregion
+
+ #region 系统设置
+ // 用户管理页面
+ containerRegistry.RegisterForNavigation();
+ // 编辑用户模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 角色管理页面
+ containerRegistry.RegisterForNavigation();
+ // 系统设置
+ containerRegistry.RegisterForNavigation();
+ // 调试页面
+ containerRegistry.RegisterForNavigation();
+ //主设置页面
+ containerRegistry.RegisterForNavigation();
+ //两个冰箱抽屉设置页面
+ containerRegistry.RegisterForNavigation();
+ //只有一个冰箱抽屉设置页面
+ containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ // 设备记录页面
+ containerRegistry.RegisterForNavigation();
+
+ containerRegistry.RegisterForNavigation();
+
+ }
+ }
+}
diff --git a/DM_Weight/AssemblyInfo.cs b/DM_Weight/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/DM_Weight/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/DM_Weight/Common/CRC16MODBUS.cs b/DM_Weight/Common/CRC16MODBUS.cs
new file mode 100644
index 0000000..6384cf7
--- /dev/null
+++ b/DM_Weight/Common/CRC16MODBUS.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DM_Weight.Common
+{
+ public class CRC16MODBUS
+ {
+ /// Name: CRC-16/MODBUS x16+x15+x2+1
+ /// Poly: 0x8005
+ /// Init: 0xFFFF
+ /// Refin: true
+ /// Refout: true
+ /// Xorout: 0x0000
+ ///******************************添加数据CRC16MODBUS校验位*******************************************
+ public static byte[] CrcModBus(byte[] buffer, int start = 0, int len = 0)
+ {
+ if (buffer == null || buffer.Length == 0) return null;
+ if (start < 0) return null;
+ if (len == 0) len = buffer.Length - start;
+ int length = start + len;
+ if (length > buffer.Length) return null;
+ ushort crc = 0xFFFF;// Initial value
+ for (int i = start; i < length; i++)
+ {
+ crc ^= buffer[i];
+ for (int j = 0; j < 8; j++)
+ {
+ if ((crc & 1) > 0)
+ crc = (ushort)((crc >> 1) ^ 0xA001);// 0xA001 = reverse 0x8005
+ else
+ crc = (ushort)(crc >> 1);
+ }
+ }
+ byte[] ret = BitConverter.GetBytes(crc);
+ //Array.Reverse(ret);
+ return ret;
+ }
+ }
+}
diff --git a/DM_Weight/Common/CommonClass.cs b/DM_Weight/Common/CommonClass.cs
new file mode 100644
index 0000000..daf7730
--- /dev/null
+++ b/DM_Weight/Common/CommonClass.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml;
+
+namespace DM_Weight.Common
+{
+ public class CommonClass
+ {
+ //手动实现调用配置的逻辑 规避修改配置文件后不起作用的问题
+ public static string ReadAppSetting(string key)
+ {
+ string xPath = "/configuration/appSettings//add[@key='" + key + "']";
+ XmlDocument doc = new XmlDocument();
+ string exeFileName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
+ doc.Load(exeFileName + ".dll.config");
+ XmlNode node = doc.SelectSingleNode(xPath);
+ return node.Attributes["value"].Value;
+ }
+ public static void SaveAppSetting(string key,string value)
+ {
+ Configuration _configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
+ _configuration.AppSettings.Settings[key].Value = value;
+ _configuration.Save();
+ ConfigurationManager.RefreshSection(key);
+ }
+ }
+}
diff --git a/DM_Weight/Common/PrismManager.cs b/DM_Weight/Common/PrismManager.cs
new file mode 100644
index 0000000..459848b
--- /dev/null
+++ b/DM_Weight/Common/PrismManager.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DM_Weight.Common
+{
+ public class PrismManager
+ {
+ /////
+ ///// 主页面区域,主要呈现登录页及登录后页面
+ /////
+ //public static readonly string MainViewRegionName = "MainContent";
+ ///
+ /// 设置菜单页面跳转,主要呈现设置下子菜单
+ ///
+ public static readonly string SettingViewRegionName = "SettingViewContent";
+ /////
+ ///// 主页面各菜单页
+ /////
+ //public static readonly string HomeViewRegionName = "HomeViewContent";
+ }
+}
diff --git a/DM_Weight/Common/TemperatureRangeRule.cs b/DM_Weight/Common/TemperatureRangeRule.cs
new file mode 100644
index 0000000..111c8b2
--- /dev/null
+++ b/DM_Weight/Common/TemperatureRangeRule.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace DM_Weight.Common
+{
+ //设置冰箱温度规则
+ public class TemperatureRangeRule : ValidationRule
+ {
+ //冰箱温度设置区间为取自配置文件(2~8度)
+ public override ValidationResult Validate(object value, CultureInfo cultureInfo)
+ {
+ bool flag = false;
+ string tips = string.Empty;
+ try
+ {
+ string[] rang = value.ToString().Split('-');
+ if (rang.Length >= 2)
+ {
+ bool bSRange = int.TryParse(rang[0], out int sRange);
+ bool bERange = int.TryParse(rang[1], out int eRange);
+ if (bSRange && bERange)
+ {
+ if ((sRange < 2 || eRange > 8||sRange>8||eRange<2))
+ {
+ tips = "温度区间设置2-8度,请检查输入";
+ return new ValidationResult(flag, tips);
+ }
+ else
+ {
+ flag = true;
+ }
+ }
+ else
+ {
+ tips = "请输入正确的数值";
+ return new ValidationResult(flag, tips);
+ }
+
+ }
+ else
+ {
+ tips = "请输入正确的数值";
+ return new ValidationResult(flag, tips);
+ }
+ return new ValidationResult(flag, tips);
+ }
+ catch (Exception ex)
+ {
+ tips = $"校验异常{ex.ToString()}";
+ return new ValidationResult(flag, tips);
+ }
+ }
+ }
+}
diff --git a/DM_Weight/Components/pagination/Pagination.xaml b/DM_Weight/Components/pagination/Pagination.xaml
new file mode 100644
index 0000000..8b3eee6
--- /dev/null
+++ b/DM_Weight/Components/pagination/Pagination.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DM_Weight/Components/pagination/Pagination.xaml.cs b/DM_Weight/Components/pagination/Pagination.xaml.cs
new file mode 100644
index 0000000..3b404f6
--- /dev/null
+++ b/DM_Weight/Components/pagination/Pagination.xaml.cs
@@ -0,0 +1,265 @@
+using NetTaste;
+using Prism.Commands;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Reflection;
+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 DM_Weight.Components.pagination
+{
+ ///
+ /// Pagination.xaml 的交互逻辑
+ ///
+ public partial class Pagination : UserControl
+ {
+ public Pagination()
+ {
+ InitializeComponent();
+ ResetInfoText();
+ ResetCurrentPageText();
+ }
+
+ static Pagination()
+ {
+ InitializeCommands();
+
+ }
+
+ private static readonly Type _typeofSelf = typeof(Pagination);
+
+
+ private static void InitializeCommands()
+ {
+ FirstCommand = new RoutedCommand("First", _typeofSelf);
+ PrevCommand = new RoutedCommand("Prev", _typeofSelf);
+ NextCommand = new RoutedCommand("Next", _typeofSelf);
+ EndCommand = new RoutedCommand("End", _typeofSelf);
+
+
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(FirstCommand, OnFirstComman, OnCanFirstComman));
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(PrevCommand, OnPrevCommand, OnCanPrevCommand));
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(NextCommand, OnNextCommand, OnCanNextCommand));
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(EndCommand, OnEndCommand, OnCanEndCommand));
+ }
+
+
+
+ public static RoutedCommand FirstCommand { get; private set; }
+ private static void OnFirstComman(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage = 1;
+ }
+
+ private static void OnCanFirstComman(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage > 1;
+ }
+
+ public static RoutedCommand PrevCommand { get; private set; }
+ private static void OnPrevCommand(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage--;
+ }
+
+ private static void OnCanPrevCommand(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage > 1;
+ }
+
+ public static RoutedCommand NextCommand { get; private set; }
+
+ private static void OnNextCommand(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage++;
+ }
+
+ private static void OnCanNextCommand(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage < ctrl.PageCount;
+ }
+ public static RoutedCommand EndCommand { get; private set; }
+ private static void OnEndCommand(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage = ctrl.PageCount;
+ }
+
+ private static void OnCanEndCommand(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage < ctrl.PageCount;
+ }
+
+
+
+ // 默认当前页码
+ public static int DefaultCurrentPage = 1;
+ // 默认总条数
+ public static int DefaultTotalPages = 0;
+ // 默认每页条数列表
+ public static List DefaultPageSizeList = new List { 10, 20, 50, 100 };
+ // 是否显示页码条数信息
+ public static bool DefaultInfoTextIsEnabel = true;
+ // 默认每页条数
+ public static int DefaultPageSize = 10;
+
+
+ public static readonly DependencyProperty CurrentPageProperty = DependencyProperty
+ .Register("CurrentPage",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultCurrentPage, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ public static readonly DependencyProperty PageSizeProperty = DependencyProperty
+ .Register("PageSize",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultPageSize, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ public static readonly DependencyProperty TotalPagesProperty = DependencyProperty
+ .Register("TotalPages",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultTotalPages, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(OnItemsSourceChanged)));
+ public static readonly DependencyProperty InfoTextIsEnabelProperty = DependencyProperty
+ .Register("InfoTextIsEnabel",
+ typeof(bool),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultInfoTextIsEnabel, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ Pagination p = (Pagination)d;
+
+ p.ResetInfoText();
+ }
+
+ [Bindable(true)]
+ [Category("Appearance")]
+ public int CurrentPage
+ {
+ get { return (int)GetValue(CurrentPageProperty); }
+ set
+ {
+ SetValue(CurrentPageProperty, value);
+ if (InfoTextIsEnabel)
+ {
+ ResetInfoText();
+ }
+ ResetCurrentPageText();
+ }
+ }
+
+
+ //private static void OnCurrentPageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ //{
+ // Pagination p = d as Pagination;
+
+ // if (p != null)
+ // {
+ // Console.WriteLine(e.NewValue);
+ // }
+ //}
+
+ [Bindable(true)]
+ [Category("Appearance")]
+ public int PageSize
+ {
+ get { return (int)GetValue(PageSizeProperty); }
+ set
+ {
+ SetValue(PageSizeProperty, value);
+ if (InfoTextIsEnabel)
+ {
+ ResetInfoText();
+ }
+ ResetCurrentPageText();
+ }
+ }
+
+
+ [Bindable(true)]
+ [Category("Appearance")]
+ public int TotalPages
+ {
+ get { return (int)GetValue(TotalPagesProperty); }
+ set
+ {
+ SetValue(TotalPagesProperty, value);
+ if (InfoTextIsEnabel)
+ {
+ ResetInfoText();
+ }
+ ResetCurrentPageText();
+ }
+ }
+
+ public bool InfoTextIsEnabel
+ {
+ get { return (bool)GetValue(InfoTextIsEnabelProperty); }
+ set { SetValue(InfoTextIsEnabelProperty, value); }
+ }
+
+ public int PageCount
+ {
+ get => (int)Math.Ceiling((double)TotalPages / PageSize);
+ }
+
+
+ public void ResetInfoText()
+ {
+ this.Dispatcher.BeginInvoke(() =>
+ {
+ if (InfoTextIsEnabel)
+ {
+ if (TotalPages <= PageSize)
+ {
+ this.InfoBlock.Text = $"1-{TotalPages}/{TotalPages}";
+ if (TotalPages == 0)
+ {
+ this.InfoBlock.Text = $"0-{TotalPages}/{TotalPages}";
+ }
+ } else
+ {
+ this.InfoBlock.Text = ((CurrentPage - 1) * PageSize + 1) + "-" + (CurrentPage * PageSize > TotalPages ? TotalPages : CurrentPage * PageSize) + "/" + TotalPages;
+ }
+
+ } else
+ {
+ this.InfoBlock.Visibility = Visibility.Visible;
+ }
+
+ });
+
+ }
+
+ public void ResetCurrentPageText()
+ {
+ this.Dispatcher.BeginInvoke(() =>
+ {
+ this.CurrentPageText.Text = CurrentPage + "";
+ });
+
+ }
+
+ }
+}
diff --git a/DM_Weight/Components/pagination/PaginationViewModel.cs b/DM_Weight/Components/pagination/PaginationViewModel.cs
new file mode 100644
index 0000000..00a7f0b
--- /dev/null
+++ b/DM_Weight/Components/pagination/PaginationViewModel.cs
@@ -0,0 +1,81 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace DM_Weight.Components.pagination
+{
+ public class PaginationViewModel: BindableBase, IRegionMemberLifetime
+ {
+ public static readonly DependencyProperty PageSizeProperty = DependencyProperty
+ .Register("CurrentPage",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(10));
+
+ // 每页条数
+ private int _pageSize = 10;
+ // 当前页码
+ private int _currentPage = 1;
+ // 总条数
+ private int _totalPages = 0;
+
+ public int PageSize { get=> _pageSize; set => SetProperty(ref _pageSize, value); }
+ public int CurrentPage { get => _currentPage; set => SetProperty(ref _currentPage, value); }
+ public int TotalPages { get => _totalPages; set => SetProperty(ref _totalPages, value); }
+ // 总页数
+ public int PageCount
+ {
+ get => (int)Math.Ceiling((double)TotalPages/ PageSize);
+ }
+
+ public string InfoText
+ {
+ get => ((CurrentPage - 1) * PageSize + 1) + "-" + (CurrentPage * PageSize > TotalPages ? TotalPages : CurrentPage * PageSize) + "/" + TotalPages;
+ }
+
+ public bool KeepAlive => false;
+
+
+ public DelegateCommand ToFirst
+ {
+ get => new(() =>
+ {
+ CurrentPage = 1;
+ });
+ }
+
+
+
+ public DelegateCommand ToPrve
+ {
+ get => new(() =>
+ {
+ CurrentPage -= 1;
+ });
+ }
+
+ public DelegateCommand ToNext
+ {
+ get => new(() =>
+ {
+ CurrentPage += 1;
+ });
+ }
+
+ public DelegateCommand ToEnd
+ {
+ get => new(() =>
+ {
+ CurrentPage = PageCount;
+ });
+ }
+
+
+ }
+}
diff --git a/DM_Weight/Converter/ApplyListConverter.cs b/DM_Weight/Converter/ApplyListConverter.cs
new file mode 100644
index 0000000..042d543
--- /dev/null
+++ b/DM_Weight/Converter/ApplyListConverter.cs
@@ -0,0 +1,91 @@
+using DM_Weight.Models;
+using DM_Weight.util;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Configuration;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace DM_Weight.Converter
+{
+ ///
+ /// 请领列表页面状态转换
+ ///
+ public class ApplyListConverter : IValueConverter
+ {
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ //用户名
+ if (parameter.ToString().Equals("UserId"))
+ {
+ int val = int.Parse(value.ToString());
+ if (val <= 0)
+ {
+ return "";
+ }
+ string userName = SqlSugarHelper.Db.Queryable().Where(ul => ul.Id == val).Select(ul => new { ul.Nickname }).First().Nickname;
+ return userName;
+ }
+ //请领单状态
+ if (parameter.ToString().Equals("PleaseStatus"))
+ {
+ int val = int.Parse(value.ToString());
+ string retStr = "状态:";
+ switch (val)
+ {
+ case 0:
+ return retStr + "已创建";
+ case 1:
+ return retStr + "审核通过";
+ case 2:
+ return retStr + "已出库";
+ case 3:
+ return retStr + "已入库";
+ default:
+ return retStr + "状态未知";
+ }
+ }
+ //处方状态
+ if (parameter.ToString().Equals("OrderStatus"))
+ {
+ int val = int.Parse(value.ToString());
+ switch (val)
+ {
+ case 0:
+ return "已申请";
+ case 1:
+ return "已接收";
+ case 2:
+ return "已退回";
+ default:
+ return "状态未知";
+ }
+ }
+ //请领药库
+ if (parameter.ToString().Equals("machineId"))
+ {
+ string val = value.ToString();
+ string[] colloctedId = ConfigurationManager.AppSettings["colloctedId"].Split(',');
+ if (Array.IndexOf(colloctedId, val)>0)
+ {
+ return colloctedId[Array.IndexOf(colloctedId, val) - 1].ToString();
+ }
+ else
+ {
+ return "未知";
+ }
+ }
+ return "";
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/DM_Weight/Converter/BoardTypeConverter.cs b/DM_Weight/Converter/BoardTypeConverter.cs
new file mode 100644
index 0000000..c1e57ec
--- /dev/null
+++ b/DM_Weight/Converter/BoardTypeConverter.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace DM_Weight.Converter
+{
+ public class BoardTypeConverter : IMultiValueConverter
+ {
+ public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
+ {
+ int BoardType = int.Parse(value[0].ToString());
+ int DrawerType = int.Parse(value[1].ToString());
+ switch (BoardType)
+ {
+ case 1:
+ if (DrawerType == 1)
+ {
+ return "物理隔断";
+ }
+ else if(DrawerType == 2)
+ {
+ return "内置回收";
+ }
+ else
+ {
+ return "外置回收";
+ }
+ case 2:
+ if (DrawerType == 1)
+ {
+ return "单支计数";
+ }
+ else if (DrawerType == 2)
+ {
+ return "计数回收(内置)";
+ }
+ else
+ {
+ return "计数回收(外置)";
+ }
+ case 3:
+ if (DrawerType == 1)
+ {
+ return "管控药盒";
+ }
+ else if (DrawerType == 2)
+ {
+ return "药盒回收(内置)";
+ }
+ else
+ {
+ return "外置回收";
+ }
+ case 35:
+ if (DrawerType == 1)
+ {
+ return "管控药盒带屏幕";
+ }
+ else if (DrawerType == 2)
+ {
+ return "药盒带屏幕回收(内置)";
+ }
+ else
+ {
+ return "外置回收";
+ }
+ case 4:
+ if (DrawerType == 1)
+ {
+ return "储物箱";
+ }
+ else if (DrawerType == 2)
+ {
+ return "内置回收";
+ }
+ else
+ {
+ return "外置回收";
+ }
+ case 5:
+ if (DrawerType == 1)
+ {
+ return "智能显示";
+ }
+ else if (DrawerType == 2)
+ {
+ return "内置回收";
+ }
+ else
+ {
+ return "外置回收";
+ }
+ case 6:
+ if (DrawerType == 1)
+ {
+ return "称重计数";
+ }
+ else if (DrawerType == 2)
+ {
+ return "称重回收(内置)";
+ }
+ else
+ {
+ return "计数回收(外置)";
+ }
+ }
+ return "";
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/DM_Weight/Converter/DrawerSelectConverter.cs b/DM_Weight/Converter/DrawerSelectConverter.cs
new file mode 100644
index 0000000..be5086c
--- /dev/null
+++ b/DM_Weight/Converter/DrawerSelectConverter.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace DM_Weight.Converter
+{
+ internal class DrawerSelectConverter : IMultiValueConverter
+ {
+ public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
+ {
+ int ButtonDrawerNo = int.Parse(value[0].ToString());
+ int SelectedDrawerNo = int.Parse(value[1].ToString());
+ return ButtonDrawerNo == SelectedDrawerNo;
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/DM_Weight/Converter/ForeColorConverter.cs b/DM_Weight/Converter/ForeColorConverter.cs
new file mode 100644
index 0000000..5c0ea45
--- /dev/null
+++ b/DM_Weight/Converter/ForeColorConverter.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace DM_Weight.Converter
+{
+ public class ForeColorConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if ((bool)value)
+ {
+ return "#3ECFED";
+ }
+ else
+ {
+ return "#808080";
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/DM_Weight/Converter/GroupSumConverter.cs b/DM_Weight/Converter/GroupSumConverter.cs
new file mode 100644
index 0000000..3907e37
--- /dev/null
+++ b/DM_Weight/Converter/GroupSumConverter.cs
@@ -0,0 +1,40 @@
+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;
+using DM_Weight.Models;
+
+namespace DM_Weight.Converter
+{
+ public class GroupSumConverter : IValueConverter
+ {
+ #region 分组组内求和
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var total = 0;
+ // DataGrid分组后对应的组及组内元素CollectionViewGroup.Items 类型是ReadOnlyObservableCollection