From 2a636e10c2e173d911af72e0d8e853b94b444d98 Mon Sep 17 00:00:00 2001
From: "625215135@qq.com" <625215135@qq.com>
Date: Mon, 13 Nov 2023 14:00:30 +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.sln | 25 +
DM_Weight/App.config | 62 +
DM_Weight/App.xaml | 19 +
DM_Weight/App.xaml.cs | 252 ++++
DM_Weight/AssemblyInfo.cs | 10 +
.../Components/pagination/Pagination.xaml | 43 +
.../Components/pagination/Pagination.xaml.cs | 265 ++++
.../pagination/PaginationViewModel.cs | 81 +
DM_Weight/Converter/BoardTypeConverter.cs | 106 ++
.../Converter/ChangeShiftsStatusConverter.cs | 25 +
DM_Weight/Converter/DrawerSelectConverter.cs | 26 +
DM_Weight/Converter/ForeColorConverter.cs | 31 +
DM_Weight/Converter/GroupSumConverter.cs | 40 +
DM_Weight/Converter/InputQuantityConverter.cs | 26 +
DM_Weight/Converter/MachineTypeConverter.cs | 59 +
.../Converter/NullableToEnabelConverter.cs | 27 +
DM_Weight/Converter/OrderStatusConverter.cs | 38 +
DM_Weight/Converter/PaginationConverter.cs | 56 +
DM_Weight/Converter/QuantityCountConverter.cs | 34 +
DM_Weight/Converter/ShiftsStateConverter.cs | 30 +
DM_Weight/Converter/StatusConverter.cs | 85 ++
DM_Weight/CustomAttribute/MessageAttribute.cs | 20 +
DM_Weight/DM_Weight.csproj | 128 ++
DM_Weight/Finger/FingerprintUtil.cs | 174 +++
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/AddChannelStockManuNo.cs | 26 +
DM_Weight/Models/ChannelList.cs | 196 +++
DM_Weight/Models/ChannelStock.cs | 197 +++
DM_Weight/Models/DrugInfo.cs | 89 ++
DM_Weight/Models/DrugManuNo.cs | 39 +
DM_Weight/Models/HkcChangeShifts.cs | 45 +
DM_Weight/Models/InOutInvoice.cs | 149 ++
DM_Weight/Models/Invoice.cs | 20 +
DM_Weight/Models/MachineRecord.cs | 147 ++
DM_Weight/Models/OrderDetail.cs | 131 ++
DM_Weight/Models/OrderFinish.cs | 32 +
DM_Weight/Models/OrderInfo.cs | 192 +++
DM_Weight/Models/PremissionDm.cs | 35 +
DM_Weight/Models/RoleDm.cs | 40 +
DM_Weight/Models/ShiftsReport.cs | 55 +
DM_Weight/Models/UserList.cs | 77 +
DM_Weight/Port/PortUtil.cs | 1309 +++++++++++++++++
DM_Weight/Port/ScreenUtil.cs | 171 +++
DM_Weight/Report/GridReportUtil.cs | 200 +++
DM_Weight/ReportTemp/account_book_temp.grf | 606 ++++++++
DM_Weight/ReportTemp/changeShifts_temp.grf | 346 +++++
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/stock_template.grf | 346 +++++
.../Validation/NotEmptyValidationRule.cs | 20 +
.../ViewModels/AddDrugControlViewModel.cs | 534 +++++++
.../ViewModels/AddManunoDialogViewModel.cs | 151 ++
.../BindingChannelDialogViewModel.cs | 506 +++++++
.../BindingChannelNewDialogViewModel.cs | 465 ++++++
.../ViewModels/ChangeShiftsDialogViewModel.cs | 660 +++++++++
.../ChangeShiftsListWindowViewModel.cs | 185 +++
.../ChangeShiftsRecordWindowViewModel.cs | 161 ++
.../ViewModels/ChangeShiftsWindowViewModel.cs | 562 +++++++
.../ViewModels/CheckStockWindowViewModel.cs | 319 ++++
.../ViewModels/CollectionViewGroupInternal.cs | 6 +
DM_Weight/ViewModels/DebugWindowViewModel.cs | 40 +
.../DrawerAddDrugWindowViewModel.cs | 392 +++++
.../DrawerTakeDrugWindowViewModel.cs | 334 +++++
.../ViewModels/DrugListWindowViewModel.cs | 283 ++++
.../ViewModels/EditUserDialogViewModel.cs | 210 +++
.../ViewModels/FingerprintDialogViewModel.cs | 133 ++
DM_Weight/ViewModels/HomeWindowViewModel.cs | 316 ++++
.../ViewModels/InvoiceAddDialogViewModel.cs | 355 +++++
.../ViewModels/InvoiceInWindowViewModel.cs | 384 +++++
.../ViewModels/InvoiceOutWindowViewModel.cs | 270 ++++
.../ViewModels/InvoiceTakeDialogViewModel.cs | 424 ++++++
DM_Weight/ViewModels/LoginWindowViewModel.cs | 396 +++++
.../MachineRecordWindowViewModel.cs | 302 ++++
DM_Weight/ViewModels/MainWindowViewModel.cs | 119 ++
.../ViewModels/OrderReturnDialogViewModel.cs | 406 +++++
.../ViewModels/OrderTakeDialogViewModel.cs | 444 ++++++
.../OrderTakeDrugWindowViewModel.cs | 265 ++++
DM_Weight/ViewModels/PremissionViewModel.cs | 36 +
.../ViewModels/ReturnDrugDialogViewModel.cs | 333 +++++
.../ViewModels/ReturnDrugWindow2ViewModel.cs | 254 ++++
.../ViewModels/ReturnDrugWindowViewModel.cs | 208 +++
.../ViewModels/ReturnEmptyDialogViewModel.cs | 358 +++++
.../ViewModels/ReturnEmptyWindowViewModel.cs | 134 ++
.../ViewModels/RoleManagerWindowViewModel.cs | 665 +++++++++
.../ViewModels/SelfAddDialogViewModel.cs | 348 +++++
.../ViewModels/SelfAddWindowViewModel.cs | 201 +++
.../ViewModels/SelfTakeDialogViewModel.cs | 327 ++++
.../ViewModels/SelfTakeDrugWindowViewModel.cs | 192 +++
.../ViewModels/SettingWindowViewModel.cs | 83 ++
.../ViewModels/ShowMessageDialogViewModel.cs | 54 +
.../ViewModels/StockListWindowViewModel.cs | 199 +++
.../ViewModels/TakeDrugControlViewModel.cs | 12 +
.../ViewModels/UserManagerWindowViewModel.cs | 198 +++
DM_Weight/Views/AddDrugControl.xaml | 395 +++++
DM_Weight/Views/AddDrugControl.xaml.cs | 41 +
DM_Weight/Views/ChangeShiftsListWindow.xaml | 136 ++
.../Views/ChangeShiftsListWindow.xaml.cs | 28 +
DM_Weight/Views/ChangeShiftsRecordWindow.xaml | 143 ++
.../Views/ChangeShiftsRecordWindow.xaml.cs | 28 +
DM_Weight/Views/ChangeShiftsWindow.xaml | 288 ++++
DM_Weight/Views/ChangeShiftsWindow.xaml.cs | 28 +
DM_Weight/Views/CheckStockWindow.xaml | 314 ++++
DM_Weight/Views/CheckStockWindow.xaml.cs | 28 +
DM_Weight/Views/DebugWindow.xaml | 23 +
DM_Weight/Views/DebugWindow.xaml.cs | 28 +
DM_Weight/Views/Dialog/AddManunoDialog.xaml | 116 ++
.../Views/Dialog/AddManunoDialog.xaml.cs | 28 +
.../Views/Dialog/BindingChannelDialog.xaml | 217 +++
.../Views/Dialog/BindingChannelDialog.xaml.cs | 28 +
.../Views/Dialog/BindingChannelNewDialog.xaml | 210 +++
.../Dialog/BindingChannelNewDialog.xaml.cs | 28 +
.../Views/Dialog/ChangeShiftsDialog.xaml | 322 ++++
.../Views/Dialog/ChangeShiftsDialog.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 +
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 | 211 +++
.../Views/Dialog/ReturnEmptyDialog.xaml.cs | 28 +
DM_Weight/Views/Dialog/SelfAddDialog.xaml | 147 ++
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 | 368 +++++
DM_Weight/Views/DrawerAddDrugWindow.xaml.cs | 46 +
DM_Weight/Views/DrawerTakeDrugWindow.xaml | 267 ++++
DM_Weight/Views/DrawerTakeDrugWindow.xaml.cs | 28 +
DM_Weight/Views/DrugListWindow.xaml | 219 +++
DM_Weight/Views/DrugListWindow.xaml.cs | 28 +
DM_Weight/Views/HomeWindow.xaml | 142 ++
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 | 203 +++
DM_Weight/Views/LoginWindow.xaml.cs | 37 +
DM_Weight/Views/MachineRecordWindow.xaml | 181 +++
DM_Weight/Views/MachineRecordWindow.xaml.cs | 54 +
DM_Weight/Views/MainWindow.xaml | 40 +
DM_Weight/Views/MainWindow.xaml.cs | 47 +
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 | 88 ++
DM_Weight/Views/ReturnEmptyWindow.xaml.cs | 28 +
DM_Weight/Views/RoleManagerWindow.xaml | 193 +++
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/SettingWindow.xaml | 38 +
DM_Weight/Views/SettingWindow.xaml.cs | 28 +
DM_Weight/Views/StockListWindow.xaml | 222 +++
DM_Weight/Views/StockListWindow.xaml.cs | 28 +
DM_Weight/Views/TakeDrugControl.xaml | 12 +
DM_Weight/Views/TakeDrugControl.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/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/SqlSugarHelper.cs | 25 +
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 +
219 files changed, 29744 insertions(+)
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/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/BoardTypeConverter.cs
create mode 100644 DM_Weight/Converter/ChangeShiftsStatusConverter.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/MachineTypeConverter.cs
create mode 100644 DM_Weight/Converter/NullableToEnabelConverter.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/CustomAttribute/MessageAttribute.cs
create mode 100644 DM_Weight/DM_Weight.csproj
create mode 100644 DM_Weight/Finger/FingerprintUtil.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/AddChannelStockManuNo.cs
create mode 100644 DM_Weight/Models/ChannelList.cs
create mode 100644 DM_Weight/Models/ChannelStock.cs
create mode 100644 DM_Weight/Models/DrugInfo.cs
create mode 100644 DM_Weight/Models/DrugManuNo.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/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/RoleDm.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/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/stock_template.grf
create mode 100644 DM_Weight/Validation/NotEmptyValidationRule.cs
create mode 100644 DM_Weight/ViewModels/AddDrugControlViewModel.cs
create mode 100644 DM_Weight/ViewModels/AddManunoDialogViewModel.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/ChangeShiftsRecordWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/ChangeShiftsWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/CheckStockWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/CollectionViewGroupInternal.cs
create mode 100644 DM_Weight/ViewModels/DebugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.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/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/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/SettingWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/ShowMessageDialogViewModel.cs
create mode 100644 DM_Weight/ViewModels/StockListWindowViewModel.cs
create mode 100644 DM_Weight/ViewModels/TakeDrugControlViewModel.cs
create mode 100644 DM_Weight/ViewModels/UserManagerWindowViewModel.cs
create mode 100644 DM_Weight/Views/AddDrugControl.xaml
create mode 100644 DM_Weight/Views/AddDrugControl.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/ChangeShiftsRecordWindow.xaml
create mode 100644 DM_Weight/Views/ChangeShiftsRecordWindow.xaml.cs
create mode 100644 DM_Weight/Views/ChangeShiftsWindow.xaml
create mode 100644 DM_Weight/Views/ChangeShiftsWindow.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/DebugWindow.xaml
create mode 100644 DM_Weight/Views/DebugWindow.xaml.cs
create mode 100644 DM_Weight/Views/Dialog/AddManunoDialog.xaml
create mode 100644 DM_Weight/Views/Dialog/AddManunoDialog.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/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/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/DrugListWindow.xaml
create mode 100644 DM_Weight/Views/DrugListWindow.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/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/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/TakeDrugControl.xaml
create mode 100644 DM_Weight/Views/TakeDrugControl.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/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/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.sln b/DM_Weight.sln
new file mode 100644
index 0000000..9c198ec
--- /dev/null
+++ b/DM_Weight.sln
@@ -0,0 +1,25 @@
+
+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
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ 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}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|Any CPU.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..1c3a5d3
--- /dev/null
+++ b/DM_Weight/App.config
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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..c6ca5dc
--- /dev/null
+++ b/DM_Weight/App.xaml.cs
@@ -0,0 +1,252 @@
+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.Models;
+
+namespace DM_Weight
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : PrismApplication
+ {
+ #region 当前登录用户的发药人信息
+ private static UserList _currentFaUserList=new UserList();
+ public static UserList CurrentFaUserList
+ {
+ get => _currentFaUserList;
+ set=> _currentFaUserList = value;
+ }
+
+ #endregion 当前登录用户的发药人信息
+
+ #region 当前登录用户的审核人信息
+ private static UserList _currentShenUserList= new UserList();
+ public static UserList CurrentShenUserList
+ {
+ get => _currentShenUserList;
+ set => _currentShenUserList = value;
+ }
+ #endregion 当前登录用户的审核人信息
+
+ 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.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.RegisterForNavigation();
+
+ #endregion
+
+ #region 加药
+ // 自选加药页面
+ containerRegistry.RegisterForNavigation();
+ // 调拨加药页面
+ containerRegistry.RegisterForNavigation();
+
+ // 调拨取药模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 抽屉加药页面
+ containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 自选加药模态框
+ containerRegistry.RegisterDialog();
+ 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();
+ #endregion
+
+ #region 库存管理
+ // 库存列表页面
+ containerRegistry.RegisterForNavigation();
+ // 库位绑定模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 库位绑定模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 库存盘点页面
+ containerRegistry.RegisterForNavigation();
+ // 药品列表页面
+ containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ #region 系统设置
+ // 用户管理页面
+ containerRegistry.RegisterForNavigation();
+ // 编辑用户模态框
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 角色管理页面
+ containerRegistry.RegisterForNavigation();
+ // 系统设置
+ containerRegistry.RegisterForNavigation();
+ // 调试页面
+ containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ // 设备记录页面
+ containerRegistry.RegisterForNavigation();
+
+ containerRegistry.RegisterForNavigation();
+
+ //交接班
+ containerRegistry.RegisterForNavigation();
+ //交接班记录
+ 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/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/BoardTypeConverter.cs b/DM_Weight/Converter/BoardTypeConverter.cs
new file mode 100644
index 0000000..2214dc8
--- /dev/null
+++ b/DM_Weight/Converter/BoardTypeConverter.cs
@@ -0,0 +1,106 @@
+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 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/ChangeShiftsStatusConverter.cs b/DM_Weight/Converter/ChangeShiftsStatusConverter.cs
new file mode 100644
index 0000000..7643da4
--- /dev/null
+++ b/DM_Weight/Converter/ChangeShiftsStatusConverter.cs
@@ -0,0 +1,25 @@
+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
+{
+ public class ChangeShiftsStatusConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ bool status = bool.Parse(value.ToString());
+ return false;
+ }
+
+ public object ConvertBack(object value, Type targetType, 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..6d4f00a
--- /dev/null
+++ b/DM_Weight/Converter/ForeColorConverter.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+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