From c4840dff0c4adad391bbdf08cd9746670ef3e54a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=A5=E9=A3=8E=E8=BF=87=E5=AE=A2?= <3529987066@qq.com> Date: Fri, 17 May 2024 17:39:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=EF=BC=9A?= =?UTF-8?q?=201=20=E7=BC=96=E5=86=99=E6=B5=B7=E5=BA=95=E5=9F=BA=E7=AB=99?= =?UTF-8?q?=E3=80=81=E4=B8=BB/=E5=A4=87=E5=9C=B0=E9=9C=87=E4=BB=AA?= =?UTF-8?q?=E7=94=B5=E6=BA=90=E6=8E=A7=E5=88=B6=E5=8A=9F=E8=83=BD=EF=BC=9B?= =?UTF-8?q?=202=20=E7=BC=96=E5=86=99=E7=94=B5=E6=BA=90=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E3=80=81=E5=8A=9F=E8=83=BD=E5=90=AF=E5=81=9C=E7=8A=B6=E6=80=81?= =?UTF-8?q?On/Off=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=B9=B6=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=93=8D=E4=BD=9C=E6=83=85=E5=86=B5=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.vs/JiangsuEarthquake/v17/.suo | Bin 303616 -> 308736 bytes .../JiangsuEarthquake/v17/DocumentLayout.json | 144 +-- .../JiangsuEarthquake/Common/Server.cs | 7 +- .../Models/LowerComputerModel.cs | 185 +++- .../Models/SeismographModel.cs | 4 + .../JiangsuEarthquake/Models/ServerModel.cs | 17 +- .../BoosterStationStateDataViewModel.cs | 2 + .../ViewModels/MainViewModel.cs | 706 +++++++++++--- .../ViewModels/SystemStateDataViewModel.cs | 4 +- .../Views/SystemControlView.xaml | 25 +- .../obj/Debug/net6.0-windows/App.baml | Bin 4265 -> 0 bytes .../JiangsuEarthquake_MarkupCompile.cache | 2 +- .../obj/Debug/net6.0-windows/MainWindow.baml | Bin 9339 -> 0 bytes .../net6.0-windows/Views/AlarmRecordView.baml | Bin 10300 -> 0 bytes .../Views/BoosterStationStateDataView.baml | Bin 14534 -> 0 bytes .../net6.0-windows/Views/LogRecordView.baml | Bin 10277 -> 0 bytes .../Views/RealTimeDataView.baml | Bin 16130 -> 0 bytes .../Views/SystemControlView.baml | Bin 49423 -> 0 bytes .../Views/SystemControlView.g.cs | 54 +- .../Views/SystemControlView.g.i.cs | 890 +++++++++--------- .../Views/SystemStateDataView.baml | Bin 14426 -> 0 bytes .../Views/UserControls/AlarmSettingView.baml | Bin 6506 -> 0 bytes .../Views/UserControls/BaseStationModel.baml | Bin 384829 -> 0 bytes .../Views/UserControls/InitialView.baml | Bin 2454 -> 0 bytes .../Views/UserControls/InitialView1.baml | Bin 4766 -> 0 bytes .../Views/UserControls/OtherSettingView.baml | Bin 4191 -> 0 bytes .../Views/UserControls/TextDialog.baml | Bin 1799 -> 0 bytes 27 files changed, 1334 insertions(+), 706 deletions(-) delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/App.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/MainWindow.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/AlarmRecordView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/BoosterStationStateDataView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/LogRecordView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/RealTimeDataView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/SystemControlView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/SystemStateDataView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/UserControls/AlarmSettingView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/UserControls/BaseStationModel.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/UserControls/InitialView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/UserControls/InitialView1.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/UserControls/OtherSettingView.baml delete mode 100644 JiangsuEarthquake/JiangsuEarthquake/obj/Debug/net6.0-windows/Views/UserControls/TextDialog.baml diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.suo b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.suo index a615d3481b5ccbe3cf89a32d77e9ace8400c4bb7..cd4087c25472be9fe94970e4fc70b54d1ebae98e 100644 GIT binary patch delta 5883 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 delta 5053 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 KAG2Gnrhfs~e~Lc< diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json index 3376ea0..e301fb3 100644 --- a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json +++ b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json @@ -2,38 +2,54 @@ "Version": 1, "WorkspaceRootPath": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\viewmodels\\mainviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\mainviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\viewmodels\\boosterstationstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\boosterstationstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\views\\systemcontrolview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\systemcontrolview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" }, { - "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\models\\servermodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\servermodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { - "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\viewmodels\\mainviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\mainviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\models\\clientmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\clientmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\models\\lowercomputermodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\lowercomputermodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\common\\server.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\common\\server.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\base\\command.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\base\\command.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\models\\seismographmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\seismographmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\viewmodels\\systemstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\systemstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\views\\realtimedataview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\realtimedataview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\base\\command.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\base\\command.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\viewmodels\\systemstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\systemstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\views\\seismometerstatedataview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\seismometerstatedataview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" @@ -46,14 +62,6 @@ "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\viewmodels\\seismometerstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\seismometerstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\viewmodels\\boosterstationstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\boosterstationstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\models\\clientmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\clientmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\views\\boosterstationstatedataview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\boosterstationstatedataview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" @@ -94,11 +102,11 @@ "DocumentGroups": [ { "DockedWidth": 169, - "SelectedChildIndex": 16, + "SelectedChildIndex": 20, "Children": [ { "$type": "Document", - "DocumentIndex": 15, + "DocumentIndex": 17, "Title": "App.config", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\App.config", "RelativeDocumentMoniker": "JiangsuEarthquake\\App.config", @@ -109,22 +117,48 @@ "WhenOpened": "2024-04-24T08:54:53.626Z", "IsPinned": true }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "LowerComputerModel.cs", + "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\LowerComputerModel.cs", + "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\LowerComputerModel.cs", + "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\LowerComputerModel.cs", + "RelativeToolTip": "JiangsuEarthquake\\Models\\LowerComputerModel.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAGMBAAA5AAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-17T02:27:46.939Z", + "EditorCaption": "" + }, { "$type": "Document", "DocumentIndex": 3, + "Title": "ServerModel.cs", + "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ServerModel.cs", + "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\ServerModel.cs", + "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ServerModel.cs", + "RelativeToolTip": "JiangsuEarthquake\\Models\\ServerModel.cs", + "ViewState": "AQIAAHkAAAAAAAAAAAAQwJAAAAAgAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-17T01:54:39.276Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, "Title": "Server.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\Server.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Common\\Server.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\Server.cs", "RelativeToolTip": "JiangsuEarthquake\\Common\\Server.cs", - "ViewState": "AQIAAO8AAAAAAAAAAAAQwAUBAAAdAAAA", + "ViewState": "AQIAAOUAAAAAAAAAAAAzwAkBAAAqAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-16T07:49:02.5Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 4, + "DocumentIndex": 10, "Title": "Command.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Base\\Command.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Base\\Command.cs", @@ -137,7 +171,7 @@ }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 12, "Title": "SeismometerStateDataView.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SeismometerStateDataView.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SeismometerStateDataView.xaml", @@ -149,7 +183,7 @@ }, { "$type": "Document", - "DocumentIndex": 10, + "DocumentIndex": 14, "Title": "SeismometerStateDataViewModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\SeismometerStateDataViewModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\SeismometerStateDataViewModel.cs", @@ -162,7 +196,7 @@ }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 13, "Title": "SystemControlView.xaml.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemControlView.xaml.cs", @@ -175,20 +209,20 @@ }, { "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 1, "Title": "BoosterStationStateDataViewModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs", "RelativeToolTip": "JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs", - "ViewState": "AQIAAO8BAAAAAAAAAAAqwAYCAAA6AAAA", + "ViewState": "AQIAAH8AAAAAAAAAAAAAAEUBAAAwAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-14T00:25:10.523Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 15, "Title": "BoosterStationStateDataView.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml", @@ -200,7 +234,7 @@ }, { "$type": "Document", - "DocumentIndex": 14, + "DocumentIndex": 16, "Title": "CSVDownload.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\CSVDownload.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Common\\CSVDownload.cs", @@ -213,7 +247,7 @@ }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 9, "Title": "MainWindow.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\MainWindow.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\MainWindow.xaml", @@ -225,7 +259,7 @@ }, { "$type": "Document", - "DocumentIndex": 17, + "DocumentIndex": 19, "Title": "AlarmRecordViewModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\AlarmRecordViewModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\AlarmRecordViewModel.cs", @@ -237,7 +271,7 @@ }, { "$type": "Document", - "DocumentIndex": 18, + "DocumentIndex": 20, "Title": "EarthQuakeParaSetModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\EarthQuakeParaSetModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\EarthQuakeParaSetModel.cs", @@ -249,7 +283,7 @@ }, { "$type": "Document", - "DocumentIndex": 20, + "DocumentIndex": 22, "Title": "DBHelper.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\DataAccess\\DBHelper.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\DataAccess\\DBHelper.cs", @@ -261,7 +295,7 @@ }, { "$type": "Document", - "DocumentIndex": 16, + "DocumentIndex": 18, "Title": "VolCurCollectorModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\VolCurCollectorModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\VolCurCollectorModel.cs", @@ -273,7 +307,7 @@ }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 11, "Title": "SystemStateDataViewModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\SystemStateDataViewModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\SystemStateDataViewModel.cs", @@ -286,7 +320,7 @@ }, { "$type": "Document", - "DocumentIndex": 19, + "DocumentIndex": 21, "Title": "Tools.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\Tools.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Common\\Tools.cs", @@ -298,19 +332,7 @@ }, { "$type": "Document", - "DocumentIndex": 0, - "Title": "SystemControlView.xaml", - "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml", - "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemControlView.xaml", - "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml", - "RelativeToolTip": "JiangsuEarthquake\\Views\\SystemControlView.xaml", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", - "WhenOpened": "2024-05-09T08:34:40.529Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 4, "Title": "ClientModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ClientModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\ClientModel.cs", @@ -324,32 +346,44 @@ { "$type": "Document", "DocumentIndex": 2, + "Title": "SystemControlView.xaml", + "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml", + "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemControlView.xaml", + "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml", + "RelativeToolTip": "JiangsuEarthquake\\Views\\SystemControlView.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-05-09T08:34:40.529Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, "Title": "MainViewModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\MainViewModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\MainViewModel.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\MainViewModel.cs", "RelativeToolTip": "JiangsuEarthquake\\ViewModels\\MainViewModel.cs", - "ViewState": "AQIAACkAAAAAAAAAAAAUwEQFAAAAAAAA", + "ViewState": "AQIAAIMKAAAAAAAAAAAgwKcKAABHAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-03-12T06:03:03.53Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 7, "Title": "SeismographModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\SeismographModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\SeismographModel.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\SeismographModel.cs", "RelativeToolTip": "JiangsuEarthquake\\Models\\SeismographModel.cs", - "ViewState": "AQIAABkAAAAAAAAAAAAkwDoAAAAJAAAA", + "ViewState": "AQIAAEICAAAAAAAAAAAkwCsDAABVAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-14T07:44:15.338Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 8, "Title": "RealTimeDataView.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\RealTimeDataView.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\RealTimeDataView.xaml", diff --git a/JiangsuEarthquake/JiangsuEarthquake/Common/Server.cs b/JiangsuEarthquake/JiangsuEarthquake/Common/Server.cs index a7bf846..b73577b 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Common/Server.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/Common/Server.cs @@ -249,7 +249,7 @@ namespace JiangsuEarthquake.Common /// 向所有在线的客户端发送信息. /// /// 发送的byte[] - public void SendToAll(byte[] SendData) + public bool SendToAll(byte[] SendData) { try { @@ -258,10 +258,13 @@ namespace JiangsuEarthquake.Common if (item != null) SendToClient(item.Ip, SendData); }); + + return true; } catch (Exception ex) { - //Console.Write(ex.Message); + Console.Write(ex.Message); + return false; } } diff --git a/JiangsuEarthquake/JiangsuEarthquake/Models/LowerComputerModel.cs b/JiangsuEarthquake/JiangsuEarthquake/Models/LowerComputerModel.cs index 827a47a..0365f00 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Models/LowerComputerModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/Models/LowerComputerModel.cs @@ -52,11 +52,24 @@ namespace JiangsuEarthquake.Models //CRC校验失败 if (checkCodeCRC != byteList[^1]) { - //发送失败信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + try + { + //发送失败信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + } + catch + { + + } return; } @@ -77,11 +90,24 @@ namespace JiangsuEarthquake.Models byteLength = BitConverter.ToInt16(new byte[] { byteList[3], byteList[2] }, 0); if(byteLength!=106) //长度校验失败 { - //发送失败信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + try + { + //发送失败信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + } + catch + { + + } } if (byteList[7] == 0x00) //数据类型(0-hex格式,1-string) @@ -99,19 +125,46 @@ namespace JiangsuEarthquake.Models gestureY = BitConverter.ToSingle(new byte[4] { byteList[27], byteList[26], byteList[25], byteList[24] }, 0); gestureZ = BitConverter.ToSingle(new byte[4] { byteList[31], byteList[30], byteList[29], byteList[28] }, 0); - //发送成功信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); + try + { + //发送成功信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); + } + } + catch + { + + } + } catch (Exception ex) { - //发送失败信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + try + { + //发送失败信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + } + catch + { + + } } //数据存储 @@ -134,11 +187,24 @@ namespace JiangsuEarthquake.Models byteLength = BitConverter.ToInt16(new byte[] { byteList[3], byteList[2] }, 0); if (byteLength != 45) //长度校验失败 { - //发送失败信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + try + { + //发送失败信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + } + catch + { + + } } try @@ -206,19 +272,45 @@ namespace JiangsuEarthquake.Models voltage121 = BitConverter.ToSingle(new byte[] { byteList[18], byteList[17], byteList[16], byteList[15] }, 0); voltage122 = BitConverter.ToSingle(new byte[] { byteList[18], byteList[17], byteList[16], byteList[15] }, 0); - //发送成功信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); + try + { + //发送成功信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x01).ToArray()); + } + } + catch + { + + } } catch(Exception ex) { - //发送失败信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + try + { + //发送失败信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + } + catch + { + + } } //数据存储 @@ -231,11 +323,24 @@ namespace JiangsuEarthquake.Models byteLength = BitConverter.ToInt16(new byte[] { byteList[3], byteList[2] }, 0); if (byteLength != 8) //长度校验失败 { - //发送失败信息 - if (id == 1) - MainWindow.mainViewModel.serverModel1.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); - else if (id == 2) - MainWindow.mainViewModel.serverModel2.SendMess(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + try + { + //发送失败信息 + if (id == 1) + { + if (MainWindow.mainViewModel.serverModel1 != null && MainWindow.mainViewModel.serverModel1.IsOpened) + MainWindow.mainViewModel.serverModel1.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + else if (id == 2) + { + if (MainWindow.mainViewModel.serverModel2 != null && MainWindow.mainViewModel.serverModel2.IsOpened) + MainWindow.mainViewModel.serverModel2.SendMessage(ServerReplyData(byteList[5], byteList[6], 0x00).ToArray()); + } + } + catch + { + + } } List SendData = new List(); diff --git a/JiangsuEarthquake/JiangsuEarthquake/Models/SeismographModel.cs b/JiangsuEarthquake/JiangsuEarthquake/Models/SeismographModel.cs index 25d89ba..5f30271 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Models/SeismographModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/Models/SeismographModel.cs @@ -642,6 +642,7 @@ namespace JiangsuEarthquake.Models MainWindow.mainViewModel.timerOpenSetMsgHidden.Start(); MainWindow.mainViewModel.OpenSetMsgForeground = new SolidColorBrush(Colors.Green); MainWindow.mainViewModel.timerSeisZeroSetStart.Stop(); + MainWindow.mainViewModel.ImageSourceSetZero = (ImageSource)Application.Current.FindResource("DeviceOn"); MainWindow.mainViewModel.SeisZeroSetStartButtonIsEnabled = true; MainWindow.mainViewModel.SeisZeroSetStopButtonIsEnabled = true; } @@ -658,6 +659,7 @@ namespace JiangsuEarthquake.Models MainWindow.mainViewModel.timerCloseSetMsgHidden.Start(); MainWindow.mainViewModel.CloseSetMsgForeground = new SolidColorBrush(Colors.Green); MainWindow.mainViewModel.timerSeisZeroSetStop.Stop(); + MainWindow.mainViewModel.ImageSourceSetZero = (ImageSource)Application.Current.FindResource("DeviceOff"); MainWindow.mainViewModel.SeisZeroSetStopButtonIsEnabled = true; MainWindow.mainViewModel.SeisZeroSetStartButtonIsEnabled = true; } @@ -788,6 +790,7 @@ namespace JiangsuEarthquake.Models MainWindow.mainViewModel.timerOpenSetMsgHidden.Start(); MainWindow.mainViewModel.OpenSetMsgForeground = new SolidColorBrush(Colors.Green); MainWindow.mainViewModel.timerSeisLevelSetStart.Stop(); + MainWindow.mainViewModel.ImageSourceSetLevel = (ImageSource)Application.Current.FindResource("DeviceOn"); MainWindow.mainViewModel.SeisLevelSetStartButtonIsEnabled = true; MainWindow.mainViewModel.SeisLevelSetStopButtonIsEnabled = true; } @@ -804,6 +807,7 @@ namespace JiangsuEarthquake.Models MainWindow.mainViewModel.timerCloseSetMsgHidden.Start(); MainWindow.mainViewModel.CloseSetMsgForeground = new SolidColorBrush(Colors.Green); MainWindow.mainViewModel.timerSeisLevelSetStop.Stop(); + MainWindow.mainViewModel.ImageSourceSetLevel = (ImageSource)Application.Current.FindResource("DeviceOff"); MainWindow.mainViewModel.SeisLevelSetStopButtonIsEnabled = true; MainWindow.mainViewModel.SeisLevelSetStartButtonIsEnabled = true; } diff --git a/JiangsuEarthquake/JiangsuEarthquake/Models/ServerModel.cs b/JiangsuEarthquake/JiangsuEarthquake/Models/ServerModel.cs index 127532b..dbdb420 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Models/ServerModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/Models/ServerModel.cs @@ -140,12 +140,21 @@ namespace JiangsuEarthquake.Models /// /// 推送消息 /// - public void SendMess(byte[] SendData) + public bool SendMessage(byte[] SendData) { - Task.Factory.StartNew(new Action(() => + bool result = false; + try { - _server.SendToAll(SendData); - })); + Task.Factory.StartNew(new Action(() => + { + result = _server.SendToAll(SendData); + })); + } + catch + { + result = false; + } + return result; } } } diff --git a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs index d047c68..a4fbe7c 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs @@ -323,6 +323,8 @@ namespace JiangsuEarthquake.ViewModels } #endregion + public BoosterStationStateDataViewModel() + { } public BoosterStationStateDataViewModel(int id) { diff --git a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs index 47b21a8..79abc09 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs @@ -187,6 +187,24 @@ namespace JiangsuEarthquake.ViewModels public DispatcherTimer timerMainSeis2ConnectMsgHidden = new DispatcherTimer(); public DispatcherTimer timerBackupSeis2ConnectMsgHidden = new DispatcherTimer(); + + public DispatcherTimer timerBaseStationMsgHidden = new DispatcherTimer(); + + public DispatcherTimer timerMainSeisMsgHidden = new DispatcherTimer(); + + public DispatcherTimer timerBackupSeisMsgHidden = new DispatcherTimer(); + + public DispatcherTimer timerBaseStationPowerOn = new DispatcherTimer(); + + public DispatcherTimer timerBaseStationPowerOff = new DispatcherTimer(); + + public DispatcherTimer timerMainSeisPowerOn = new DispatcherTimer(); + + public DispatcherTimer timerMainSeisPowerOff = new DispatcherTimer(); + + public DispatcherTimer timerBackupSeisPowerOn = new DispatcherTimer(); + + public DispatcherTimer timerBackupSeisPowerOff = new DispatcherTimer(); #endregion @@ -403,6 +421,33 @@ namespace JiangsuEarthquake.ViewModels timerBackupSeis2ConnectMsgHidden.Interval = TimeSpan.FromSeconds(2); timerBackupSeis2ConnectMsgHidden.Tick += TimerBackupSeis2ConnectMsgHidden_Tick; + + timerBaseStationMsgHidden.Interval = TimeSpan.FromSeconds(2); + timerBaseStationMsgHidden.Tick += TimerBaseStationMsgHidden_Tick; + + timerMainSeisMsgHidden.Interval = TimeSpan.FromSeconds(2); + timerMainSeisMsgHidden.Tick += TimerMainSeisMsgHidden_Tick; + + timerBackupSeisMsgHidden.Interval = TimeSpan.FromSeconds(2); + timerBackupSeisMsgHidden.Tick += TimerBackupSeisMsgHidden_Tick; + + timerBaseStationPowerOn.Interval = TimeSpan.FromSeconds(20); + timerBaseStationPowerOn.Tick += TimerBaseStationPowerOn_Tick; + + timerBaseStationPowerOff.Interval = TimeSpan.FromSeconds(20); + timerBaseStationPowerOff.Tick += TimerBaseStationPowerOff_Tick; + + timerMainSeisPowerOn.Interval = TimeSpan.FromSeconds(20); + timerMainSeisPowerOn.Tick += TimerMainSeisPowerOn_Tick; + + timerMainSeisPowerOff.Interval = TimeSpan.FromSeconds(20); + timerMainSeisPowerOff.Tick += TimerMainSeisPowerOff_Tick; + + timerBackupSeisPowerOn.Interval = TimeSpan.FromSeconds(20); + timerBackupSeisPowerOn.Tick += TimerBackupSeisPowerOn_Tick; + + timerBackupSeisPowerOff.Interval = TimeSpan.FromSeconds(20); + timerBackupSeisPowerOff.Tick += TimerBackupSeisPowerOff_Tick; #endregion @@ -1942,16 +1987,129 @@ namespace JiangsuEarthquake.ViewModels #endregion - List sendDataSeis = new List(); - - private byte[] checkCode { get; set; } = new byte[2]; //从CMD到DATA结束的CRC16校验和 - - private List checkByte { get; set; } = new List(); //校验码Byte - - #region Remote Control #region BaseStation Set + private void TimerBaseStationPowerOn_Tick(object sender, EventArgs e) + { + if (!BaseStationPowerOnIsReceived) + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "开启海底基站电源发送成功,但未接收到数据!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + } + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerBaseStationPowerOff_Tick(object sender, EventArgs e) + { + if (!BaseStationPowerOffIsReceived) + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "关闭海底基站电源发送成功,但未接收到数据!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + } + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerMainSeisPowerOn_Tick(object sender, EventArgs e) + { + if (!MainSeisPowerOnIsReceived) + { + MainSeisMsgVisibility = Visibility.Visible; + MainSeisMsg = "开启主地震仪电源发送成功,但未接收到数据!"; + timerMainSeisMsgHidden.Start(); + MainSeisMsgForeground = new SolidColorBrush(Colors.Red); + MainSeisPowerOpenBtnIsEnabled = true; + MainSeisPowerCloseBtnIsEnabled = true; + } + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerMainSeisPowerOff_Tick(object sender, EventArgs e) + { + if (!MainSeisPowerOffIsReceived) + { + MainSeisMsgVisibility = Visibility.Visible; + MainSeisMsg = "关闭主地震仪电源发送成功,但未接收到数据!"; + timerMainSeisMsgHidden.Start(); + MainSeisMsgForeground = new SolidColorBrush(Colors.Red); + MainSeisPowerOpenBtnIsEnabled = true; + MainSeisPowerCloseBtnIsEnabled = true; + } + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerBackupSeisPowerOn_Tick(object sender, EventArgs e) + { + if (!BackupSeisPowerOnIsReceived) + { + BackupSeisMsgVisibility = Visibility.Visible; + BackupSeisMsg = "开启备地震仪电源发送成功,但未接收到数据!"; + timerBackupSeisMsgHidden.Start(); + BackupSeisMsgForeground = new SolidColorBrush(Colors.Red); + BackupSeisPowerOpenBtnIsEnabled = true; + BackupSeisPowerCloseBtnIsEnabled = true; + } + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerBackupSeisPowerOff_Tick(object sender, EventArgs e) + { + if (!BackupSeisPowerOffIsReceived) + { + BackupSeisMsgVisibility = Visibility.Visible; + BackupSeisMsg = "关闭备地震仪电源发送成功,但未接收到数据!"; + timerBackupSeisMsgHidden.Start(); + BackupSeisMsgForeground = new SolidColorBrush(Colors.Red); + BackupSeisPowerOpenBtnIsEnabled = true; + BackupSeisPowerCloseBtnIsEnabled = true; + } + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerBaseStationMsgHidden_Tick(object sender, EventArgs e) + { + BaseStationMsgVisibility = Visibility.Hidden; + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerMainSeisMsgHidden_Tick(object sender, EventArgs e) + { + MainSeisMsgVisibility = Visibility.Hidden; + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + + private void TimerBackupSeisMsgHidden_Tick(object sender, EventArgs e) + { + BackupSeisMsgVisibility = Visibility.Hidden; + + // 停止定时器 + (sender as DispatcherTimer).Stop(); + } + private Brush baseStationPowerBackground = new SolidColorBrush(Colors.Red); public Brush BaseStationPowerBackground @@ -1960,6 +2118,14 @@ namespace JiangsuEarthquake.ViewModels set { baseStationPowerBackground = value; this.DoNotify(); } } + private ImageSource imageSourceBaseStation = (ImageSource)Application.Current.FindResource("DeviceOff"); + + public ImageSource ImageSourceBaseStation + { + get { return imageSourceBaseStation; } + set { imageSourceBaseStation = value; this.DoNotify(); } + } + private string baseStationMsg; public string BaseStationMsg @@ -1992,6 +2158,14 @@ namespace JiangsuEarthquake.ViewModels set { mainSeisPowerBackground = value; this.DoNotify(); } } + private ImageSource imageSourceMainSeis = (ImageSource)Application.Current.FindResource("DeviceOff"); + + public ImageSource ImageSourceMainSeis + { + get { return imageSourceMainSeis; } + set { imageSourceMainSeis = value; this.DoNotify(); } + } + private string mainSeisMsg; public string MainSeisMsg @@ -2024,6 +2198,14 @@ namespace JiangsuEarthquake.ViewModels set { backupSeisPowerBackground = value; this.DoNotify(); } } + private ImageSource imageSourceBackupSeis = (ImageSource)Application.Current.FindResource("DeviceOff"); + + public ImageSource ImageSourceBackupSeis + { + get { return imageSourceBackupSeis; } + set { imageSourceBackupSeis = value; this.DoNotify(); } + } + private string backupSeisMsg; public string BackupSeisMsg @@ -2048,6 +2230,54 @@ namespace JiangsuEarthquake.ViewModels set { backupSeisMsgVisibility = value; this.DoNotify(); } } + private bool baseStationPowerOnIsReceived = false; + + public bool BaseStationPowerOnIsReceived + { + get { return baseStationPowerOnIsReceived; } + set { baseStationPowerOnIsReceived = value; this.DoNotify(); } + } + + private bool baseStationPowerOffIsReceived = false; + + public bool BaseStationPowerOffIsReceived + { + get { return baseStationPowerOffIsReceived; } + set { baseStationPowerOffIsReceived = value; this.DoNotify(); } + } + + private bool mainSeisPowerOnIsReceived = false; + + public bool MainSeisPowerOnIsReceived + { + get { return mainSeisPowerOnIsReceived; } + set { mainSeisPowerOnIsReceived = value; this.DoNotify(); } + } + + private bool mainSeisPowerOffIsReceived = false; + + public bool MainSeisPowerOffIsReceived + { + get { return mainSeisPowerOffIsReceived; } + set { mainSeisPowerOffIsReceived = value; this.DoNotify(); } + } + + private bool backupSeisPowerOnIsReceived = false; + + public bool BackupSeisPowerOnIsReceived + { + get { return backupSeisPowerOnIsReceived; } + set { backupSeisPowerOnIsReceived = value; this.DoNotify(); } + } + + private bool backupSeisPowerOffIsReceived = false; + + public bool BackupSeisPowerOffIsReceived + { + get { return backupSeisPowerOffIsReceived; } + set { backupSeisPowerOffIsReceived = value; this.DoNotify(); } + } + private bool baseStationPowerOpenBtnIsEnabled = true; public bool BaseStationPowerOpenBtnIsEnabled @@ -2095,7 +2325,6 @@ namespace JiangsuEarthquake.ViewModels get { return backupSeisPowerCloseBtnIsEnabled; } set { backupSeisPowerCloseBtnIsEnabled = value; this.DoNotify(); } } - #endregion @@ -2204,6 +2433,14 @@ namespace JiangsuEarthquake.ViewModels set { openSetMsgForeground = value; this.DoNotify(); } } + private ImageSource imageSourceSetZero = (ImageSource)Application.Current.FindResource("DeviceOff"); + + public ImageSource ImageSourceSetZero + { + get { return imageSourceSetZero; } + set { imageSourceSetZero = value; this.DoNotify(); } + } + private Visibility openSetMsgVisibility = Visibility.Visible; public Visibility OpenSetMsgVisibility @@ -2228,6 +2465,14 @@ namespace JiangsuEarthquake.ViewModels set { closeSetMsgForeground = value; this.DoNotify(); } } + private ImageSource imageSourceSetLevel = (ImageSource)Application.Current.FindResource("DeviceOff"); + + public ImageSource ImageSourceSetLevel + { + get { return imageSourceSetLevel; } + set { imageSourceSetLevel = value; this.DoNotify(); } + } + private Visibility closeSetMsgVisibility = Visibility.Visible; public Visibility CloseSetMsgVisibility @@ -2301,6 +2546,29 @@ namespace JiangsuEarthquake.ViewModels } #endregion + + private List RemoteControl(byte SensorKind, byte SensorId, byte ActionKind, byte ActionType) + { + List sendData = new List(); + + sendData.Clear(); + sendData.AddRange(new byte[] { 0xFE, 0xEF }); // 帧头(H=0xFE 0xEF) + sendData.AddRange(new byte[] { 0x00, 0x09 }); //长度(L=9)(MSH MSL) + sendData.Add(0x00); //地址码(ADDR=00) + sendData.Add(0x03); //功能码(FUNC=03) + sendData.Add(0x01); //操作功能(OPERATION = 0x01) + sendData.Add(SensorKind); //传感器数据类型KIND + sendData.Add(SensorId); //传感器ID + sendData.Add(ActionKind); //动作类型(ACT,0-关闭;1-开启) + sendData.Add(ActionType); //动作种类(0x00-电源,0x01-数据回传) + + byte checkCode = Tools.CheckSum(sendData.ToArray()); + sendData.Add(checkCode); //校验(CS = 帧头 ...+... 批量设置) + sendData.Add(0x16); //结束符(0x16) + + return sendData; + } + //各个开关 public async void Btn_Switch(object o) { @@ -2309,19 +2577,193 @@ namespace JiangsuEarthquake.ViewModels switch (msg[0]) { case "BaseStationPowerPicker": - if(msg[1].Equals("True")) //打开 + if (msg[1].Equals("True")) //打开 { + BaseStationPowerOpenBtnIsEnabled = false; + BaseStationPowerCloseBtnIsEnabled = false; + BaseStationPowerOnIsReceived = false; + List sendDataPower = RemoteControl(0x30, 0x06, 0x01, 0x00); + + bool result = false; + if (station_id == 1) + { + if (serverModel1!=null&&serverModel1.IsOpened) + { + result = serverModel1.SendMessage(sendDataPower.ToArray()); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "通信未连接!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + break; + } + } + else + { + if (serverModel2 != null && serverModel2.IsOpened) + { + result = serverModel2.SendMessage(sendDataPower.ToArray()); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "通信未连接!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + break; + } + } + + if (result) + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "打开海底基站电源发送成功!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Green); + timerBaseStationPowerOn.Start(); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "打开海底基站电源发送失败!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + } } else { + BaseStationPowerOpenBtnIsEnabled = false; + BaseStationPowerCloseBtnIsEnabled = false; + BaseStationPowerOffIsReceived = false; + List sendDataPower = RemoteControl(0x30, 0x06, 0x00, 0x00); + + bool result = false; + if (station_id == 1) + { + if (serverModel1 != null && serverModel1.IsOpened) + { + result = serverModel1.SendMessage(sendDataPower.ToArray()); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "通信未连接!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + break; + } + } + else + { + if (serverModel2 != null && serverModel2.IsOpened) + { + result = serverModel2.SendMessage(sendDataPower.ToArray()); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "通信未连接!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + break; + } + } + + if (result) + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "关闭海底基站电源发送成功!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Green); + timerBaseStationPowerOff.Start(); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "关闭海底基站电源发送失败!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + } } break; case "MainSeisPowerPicker": if (msg[1].Equals("True")) //打开 { + MainSeisPowerOpenBtnIsEnabled = false; + MainSeisPowerCloseBtnIsEnabled = false; + MainSeisPowerOnIsReceived = false; + List sendDataPower = RemoteControl(0x30, 0x06, 0x01, 0x08); + + bool result = false; + if (station_id == 1) + { + if (serverModel1 != null && serverModel1.IsOpened) + { + result = serverModel1.SendMessage(sendDataPower.ToArray()); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "通信未连接!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + break; + } + } + else + { + if (serverModel2 != null && serverModel2.IsOpened) + { + result = serverModel2.SendMessage(sendDataPower.ToArray()); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "通信未连接!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + break; + } + } + + if (result) + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "打开海底基站电源发送成功!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Green); + timerBaseStationPowerOn.Start(); + } + else + { + BaseStationMsgVisibility = Visibility.Visible; + BaseStationMsg = "打开海底基站电源发送失败!"; + timerBaseStationMsgHidden.Start(); + BaseStationMsgForeground = new SolidColorBrush(Colors.Red); + BaseStationPowerOpenBtnIsEnabled = true; + BaseStationPowerCloseBtnIsEnabled = true; + } } else { @@ -2345,10 +2787,14 @@ namespace JiangsuEarthquake.ViewModels SeisZeroSetStopButtonIsEnabled = false; SeisZeroSetStartIsReceived = false; - sendDataSeis.Clear(); - sendDataSeis.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC - sendDataSeis.AddRange(new byte[] { 0xA0, 0x50 }); //CMD - sendDataSeis.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + List sendDataSeisZero = new List(); + byte[] checkCodeSeisZero = new byte[2]; + List checkByteSeisZero = new List(); + + sendDataSeisZero.Clear(); + sendDataSeisZero.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC + sendDataSeisZero.AddRange(new byte[] { 0xA0, 0x50 }); //CMD + sendDataSeisZero.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH //地震计号 byte[] numDZJ = new byte[2]; @@ -2368,22 +2814,22 @@ namespace JiangsuEarthquake.ViewModels } numDZJ = Tools.PadArrayWithZeros(numDZJ, 2); - sendDataSeis.AddRange(numDZJ); //DATA - checkByte.Clear(); - checkByte.AddRange(new byte[] { 0xA0, 0x50 }); //CMD - checkByte.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH - checkByte.AddRange(numDZJ); //DATA - checkCode = Tools.CRCCalc(checkByte.ToArray()); //CHK_SUM - sendDataSeis.AddRange(checkCode); + sendDataSeisZero.AddRange(numDZJ); //DATA + checkByteSeisZero.Clear(); + checkByteSeisZero.AddRange(new byte[] { 0xA0, 0x50 }); //CMD + checkByteSeisZero.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + checkByteSeisZero.AddRange(numDZJ); //DATA + checkCodeSeisZero = Tools.CRCCalc(checkByteSeisZero.ToArray()); //CHK_SUM + sendDataSeisZero.AddRange(checkCodeSeisZero); bool result = false; if (station_id == 1) { if (MainSeisIsChecked) { - if (clientModelMainSeis1.IsConnected&&IsMainSeis1CertSucs) + if (clientModelMainSeis1.IsConnected && IsMainSeis1CertSucs) { - result = clientModelMainSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis1.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2400,7 +2846,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis1.IsConnected && IsBackupSeis1CertSucs) { - result = clientModelBackupSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis1.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2420,7 +2866,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis2.IsConnected && IsMainSeis2CertSucs) { - result = clientModelMainSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis2.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2437,7 +2883,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis2.IsConnected && IsBackupSeis2CertSucs) { - result = clientModelBackupSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis2.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2478,10 +2924,14 @@ namespace JiangsuEarthquake.ViewModels SeisZeroSetStartButtonIsEnabled = false; SeisZeroSetStopIsReceived = false; - sendDataSeis.Clear(); - sendDataSeis.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC - sendDataSeis.AddRange(new byte[] { 0xA0, 0x51 }); //CMD - sendDataSeis.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + List sendDataSeisZero = new List(); + byte[] checkCodeSeisZero = new byte[2]; + List checkByteSeisZero = new List(); + + sendDataSeisZero.Clear(); + sendDataSeisZero.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC + sendDataSeisZero.AddRange(new byte[] { 0xA0, 0x51 }); //CMD + sendDataSeisZero.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH //地震计号 byte[] numDZJ = new byte[2]; @@ -2501,13 +2951,13 @@ namespace JiangsuEarthquake.ViewModels } numDZJ = Tools.PadArrayWithZeros(numDZJ, 2); - sendDataSeis.AddRange(numDZJ); //DATA - checkByte.Clear(); - checkByte.AddRange(new byte[] { 0xA0, 0x51 }); //CMD - checkByte.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH - checkByte.AddRange(numDZJ); //DATA - checkCode = Tools.CRCCalc(checkByte.ToArray()); //CHK_SUM - sendDataSeis.AddRange(checkCode); + sendDataSeisZero.AddRange(numDZJ); //DATA + checkByteSeisZero.Clear(); + checkByteSeisZero.AddRange(new byte[] { 0xA0, 0x51 }); //CMD + checkByteSeisZero.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + checkByteSeisZero.AddRange(numDZJ); //DATA + checkCodeSeisZero = Tools.CRCCalc(checkByteSeisZero.ToArray()); //CHK_SUM + sendDataSeisZero.AddRange(checkCodeSeisZero); bool result = false; if (station_id == 1) @@ -2516,7 +2966,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis1.IsConnected && IsMainSeis1CertSucs) { - result = clientModelMainSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis1.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2533,7 +2983,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis1.IsConnected && IsBackupSeis1CertSucs) { - result = clientModelBackupSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis1.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2553,7 +3003,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis2.IsConnected && IsMainSeis2CertSucs) { - result = clientModelMainSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis2.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2570,7 +3020,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis2.IsConnected && IsBackupSeis2CertSucs) { - result = clientModelBackupSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis2.SendMessage(sendDataSeisZero.ToArray()); } else { @@ -2611,10 +3061,14 @@ namespace JiangsuEarthquake.ViewModels SeisLevelSetStopButtonIsEnabled = false; SeisLevelSetStartIsReceived = false; - sendDataSeis.Clear(); - sendDataSeis.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC - sendDataSeis.AddRange(new byte[] { 0xA0, 0x90 }); //CMD - sendDataSeis.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + List sendDataSeisLevel = new List(); + byte[] checkCodeSeisLevel = new byte[2]; + List checkByteSeisLevel = new List(); + + sendDataSeisLevel.Clear(); + sendDataSeisLevel.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC + sendDataSeisLevel.AddRange(new byte[] { 0xA0, 0x90 }); //CMD + sendDataSeisLevel.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH //地震计号 byte[] numDZJ = new byte[2]; @@ -2634,13 +3088,13 @@ namespace JiangsuEarthquake.ViewModels } numDZJ = Tools.PadArrayWithZeros(numDZJ, 2); - sendDataSeis.AddRange(numDZJ); //DATA - checkByte.Clear(); - checkByte.AddRange(new byte[] { 0xA0, 0x90 }); //CMD - checkByte.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH - checkByte.AddRange(numDZJ); //DATA - checkCode = Tools.CRCCalc(checkByte.ToArray()); //CHK_SUM - sendDataSeis.AddRange(checkCode); + sendDataSeisLevel.AddRange(numDZJ); //DATA + checkByteSeisLevel.Clear(); + checkByteSeisLevel.AddRange(new byte[] { 0xA0, 0x90 }); //CMD + checkByteSeisLevel.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + checkByteSeisLevel.AddRange(numDZJ); //DATA + checkCodeSeisLevel = Tools.CRCCalc(checkByteSeisLevel.ToArray()); //CHK_SUM + sendDataSeisLevel.AddRange(checkCodeSeisLevel); bool result = false; if (station_id == 1) @@ -2649,7 +3103,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis1.IsConnected && IsMainSeis1CertSucs) { - result = clientModelMainSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis1.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -2666,7 +3120,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis1.IsConnected && IsBackupSeis1CertSucs) { - result = clientModelBackupSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis1.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -2686,7 +3140,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis2.IsConnected && IsMainSeis2CertSucs) { - result = clientModelMainSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis2.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -2703,7 +3157,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis2.IsConnected && IsBackupSeis2CertSucs) { - result = clientModelBackupSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis2.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -2744,10 +3198,14 @@ namespace JiangsuEarthquake.ViewModels SeisLevelSetStartButtonIsEnabled = false; SeisLevelSetStopIsReceived = false; - sendDataSeis.Clear(); - sendDataSeis.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC - sendDataSeis.AddRange(new byte[] { 0xA0, 0x91 }); //CMD - sendDataSeis.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + List sendDataSeisLevel = new List(); + byte[] checkCodeSeisLevel = new byte[2]; + List checkByteSeisLevel = new List(); + + sendDataSeisLevel.Clear(); + sendDataSeisLevel.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC + sendDataSeisLevel.AddRange(new byte[] { 0xA0, 0x91 }); //CMD + sendDataSeisLevel.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH //地震计号 byte[] numDZJ = new byte[2]; @@ -2767,13 +3225,13 @@ namespace JiangsuEarthquake.ViewModels } numDZJ = Tools.PadArrayWithZeros(numDZJ, 2); - sendDataSeis.AddRange(numDZJ); //DATA - checkByte.Clear(); - checkByte.AddRange(new byte[] { 0xA0, 0x91 }); //CMD - checkByte.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH - checkByte.AddRange(numDZJ); //DATA - checkCode = Tools.CRCCalc(checkByte.ToArray()); //CHK_SUM - sendDataSeis.AddRange(checkCode); + sendDataSeisLevel.AddRange(numDZJ); //DATA + checkByteSeisLevel.Clear(); + checkByteSeisLevel.AddRange(new byte[] { 0xA0, 0x91 }); //CMD + checkByteSeisLevel.AddRange(new byte[] { 0x00, 0x04 }); //LENGTH + checkByteSeisLevel.AddRange(numDZJ); //DATA + checkCodeSeisLevel = Tools.CRCCalc(checkByteSeisLevel.ToArray()); //CHK_SUM + sendDataSeisLevel.AddRange(checkCodeSeisLevel); bool result = false; if (station_id == 1) @@ -2782,7 +3240,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis1.IsConnected && IsMainSeis1CertSucs) { - result = clientModelMainSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis1.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -2799,7 +3257,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis1.IsConnected && IsBackupSeis1CertSucs) { - result = clientModelBackupSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis1.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -2819,7 +3277,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis2.IsConnected && IsMainSeis2CertSucs) { - result = clientModelMainSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis2.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -2836,7 +3294,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis2.IsConnected && IsBackupSeis2CertSucs) { - result = clientModelBackupSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis2.SendMessage(sendDataSeisLevel.ToArray()); } else { @@ -3018,6 +3476,10 @@ namespace JiangsuEarthquake.ViewModels EarthQuakeParaSetIsSend = false; EarthQuakeParaReadIsSend = false; + List sendDataSeisPara = new List(); + byte[] checkCodeSeisPara = new byte[2]; + List checkByteSeisPara = new List(); + byte[] sationNo = Tools.IntToBytes(int.Parse(msg[1])); //台号 byte[] stationName = Encoding.UTF8.GetBytes(msg[2]); //台站名称 stationName = Tools.PadArrayWithZeros(stationName, 32); @@ -3037,38 +3499,38 @@ namespace JiangsuEarthquake.ViewModels byte[] software_version = BitConverter.GetBytes(short.Parse(msg[11])); //软件版本 software_version = Tools.PadArrayWithZeros(software_version, 32); - sendDataSeis.Clear(); - sendDataSeis.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC - sendDataSeis.AddRange(new byte[] { 0xA0, 0x00 }); //CMD - sendDataSeis.AddRange(new byte[] { 0x00, 0x82 }); //LENGTH - sendDataSeis.AddRange(sationNo); - sendDataSeis.AddRange(stationName); - sendDataSeis.AddRange(stationShortName); - sendDataSeis.AddRange(earthQuakeCount); - sendDataSeis.AddRange(channelsNo); - sendDataSeis.AddRange(wd); - sendDataSeis.AddRange(jd); - sendDataSeis.AddRange(gaoCheng); - sendDataSeis.AddRange(startTime); - sendDataSeis.AddRange(stationid); - sendDataSeis.AddRange(software_version); - checkByte.Clear(); - checkByte.AddRange(new byte[] { 0xA0, 0x00 }); //CMD - checkByte.AddRange(new byte[] { 0x00, 0x82 }); //LENGTH - checkByte.AddRange(sationNo); - checkByte.AddRange(stationName); - checkByte.AddRange(stationShortName); - checkByte.AddRange(earthQuakeCount); - checkByte.AddRange(channelsNo); - checkByte.AddRange(wd); - checkByte.AddRange(jd); - checkByte.AddRange(gaoCheng); - checkByte.AddRange(startTime); - checkByte.AddRange(stationid); - checkByte.AddRange(software_version); - checkCode = Tools.CRCCalc(checkByte.ToArray()); //CHK_SUM + sendDataSeisPara.Clear(); + sendDataSeisPara.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC + sendDataSeisPara.AddRange(new byte[] { 0xA0, 0x00 }); //CMD + sendDataSeisPara.AddRange(new byte[] { 0x00, 0x82 }); //LENGTH + sendDataSeisPara.AddRange(sationNo); + sendDataSeisPara.AddRange(stationName); + sendDataSeisPara.AddRange(stationShortName); + sendDataSeisPara.AddRange(earthQuakeCount); + sendDataSeisPara.AddRange(channelsNo); + sendDataSeisPara.AddRange(wd); + sendDataSeisPara.AddRange(jd); + sendDataSeisPara.AddRange(gaoCheng); + sendDataSeisPara.AddRange(startTime); + sendDataSeisPara.AddRange(stationid); + sendDataSeisPara.AddRange(software_version); + checkByteSeisPara.Clear(); + checkByteSeisPara.AddRange(new byte[] { 0xA0, 0x00 }); //CMD + checkByteSeisPara.AddRange(new byte[] { 0x00, 0x82 }); //LENGTH + checkByteSeisPara.AddRange(sationNo); + checkByteSeisPara.AddRange(stationName); + checkByteSeisPara.AddRange(stationShortName); + checkByteSeisPara.AddRange(earthQuakeCount); + checkByteSeisPara.AddRange(channelsNo); + checkByteSeisPara.AddRange(wd); + checkByteSeisPara.AddRange(jd); + checkByteSeisPara.AddRange(gaoCheng); + checkByteSeisPara.AddRange(startTime); + checkByteSeisPara.AddRange(stationid); + checkByteSeisPara.AddRange(software_version); + checkCodeSeisPara = Tools.CRCCalc(checkByteSeisPara.ToArray()); //CHK_SUM - sendDataSeis.AddRange(checkCode); + sendDataSeisPara.AddRange(checkCodeSeisPara); bool result = false; if (station_id == 1) @@ -3077,7 +3539,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis1.IsConnected && IsMainSeis1CertSucs) { - result = clientModelMainSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis1.SendMessage(sendDataSeisPara.ToArray()); } else { @@ -3094,7 +3556,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis1.IsConnected && IsBackupSeis1CertSucs) { - result = clientModelBackupSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis1.SendMessage(sendDataSeisPara.ToArray()); } else { @@ -3114,7 +3576,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis2.IsConnected && IsMainSeis2CertSucs) { - result = clientModelMainSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis2.SendMessage(sendDataSeisPara.ToArray()); } else { @@ -3131,7 +3593,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis2.IsConnected && IsBackupSeis2CertSucs) { - result = clientModelBackupSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis2.SendMessage(sendDataSeisPara.ToArray()); } else { @@ -3173,10 +3635,14 @@ namespace JiangsuEarthquake.ViewModels EarthQuakeParaSetIsSend = false; EarthQuakeParaReadIsSend = false; - sendDataSeis.Clear(); - sendDataSeis.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC - sendDataSeis.AddRange(new byte[] { 0xB0, 0x00 }); //CMD - sendDataSeis.AddRange(new byte[] { 0x00, 0x02 }); //LENGTH + List sendDataSeisParaRead = new List(); + byte[] checkCodeSeisParaRead = new byte[2]; + List checkByteSeisParaRead = new List(); + + sendDataSeisParaRead.Clear(); + sendDataSeisParaRead.AddRange(new byte[] { 0xBF, 0x13, 0x97, 0x74 }); //SYNC + sendDataSeisParaRead.AddRange(new byte[] { 0xB0, 0x00 }); //CMD + sendDataSeisParaRead.AddRange(new byte[] { 0x00, 0x02 }); //LENGTH //地震计号 byte[] numDZJ = new byte[2]; @@ -3196,14 +3662,14 @@ namespace JiangsuEarthquake.ViewModels } numDZJ = Tools.PadArrayWithZeros(numDZJ, 2); - sendDataSeis.AddRange(numDZJ); //地震计号 - checkByte.Clear(); - checkByte.AddRange(new byte[] { 0xB0, 0x00 }); //CMD - checkByte.AddRange(new byte[] { 0x00, 0x02 }); //LENGTH - checkByte.AddRange(numDZJ); //地震计号 - checkCode = Tools.CRCCalc(checkByte.ToArray()); //CHK_SUM + sendDataSeisParaRead.AddRange(numDZJ); //地震计号 + checkByteSeisParaRead.Clear(); + checkByteSeisParaRead.AddRange(new byte[] { 0xB0, 0x00 }); //CMD + checkByteSeisParaRead.AddRange(new byte[] { 0x00, 0x02 }); //LENGTH + checkByteSeisParaRead.AddRange(numDZJ); //地震计号 + checkCodeSeisParaRead = Tools.CRCCalc(checkByteSeisParaRead.ToArray()); //CHK_SUM - sendDataSeis.AddRange(checkCode); + sendDataSeisParaRead.AddRange(checkCodeSeisParaRead); result = false; if (station_id == 1) @@ -3212,7 +3678,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis1.IsConnected && IsMainSeis1CertSucs) { - result = clientModelMainSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis1.SendMessage(sendDataSeisParaRead.ToArray()); } else { @@ -3229,7 +3695,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis1.IsConnected && IsBackupSeis1CertSucs) { - result = clientModelBackupSeis1.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis1.SendMessage(sendDataSeisParaRead.ToArray()); } else { @@ -3249,7 +3715,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelMainSeis2.IsConnected && IsMainSeis2CertSucs) { - result = clientModelMainSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelMainSeis2.SendMessage(sendDataSeisParaRead.ToArray()); } else { @@ -3266,7 +3732,7 @@ namespace JiangsuEarthquake.ViewModels { if (clientModelBackupSeis2.IsConnected && IsBackupSeis2CertSucs) { - result = clientModelBackupSeis2.SendMessage(sendDataSeis.ToArray()); + result = clientModelBackupSeis2.SendMessage(sendDataSeisParaRead.ToArray()); } else { diff --git a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemStateDataViewModel.cs b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemStateDataViewModel.cs index 45231c6..4362533 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemStateDataViewModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemStateDataViewModel.cs @@ -243,12 +243,12 @@ namespace JiangsuEarthquake.ViewModels if (station_id == 1) { if (MainWindow.mainViewModel.serverModel1.IsOpened) - MainWindow.mainViewModel.serverModel1.SendMess(new byte[4] { 0x00, 0x01, 0x02, 0x04 }); + MainWindow.mainViewModel.serverModel1.SendMessage(new byte[4] { 0x00, 0x01, 0x02, 0x04 }); } else { if (MainWindow.mainViewModel.serverModel2.IsOpened) - MainWindow.mainViewModel.serverModel2.SendMess(new byte[4] { 0x00, 0x01, 0x02, 0x03 }); + MainWindow.mainViewModel.serverModel2.SendMessage(new byte[4] { 0x00, 0x01, 0x02, 0x03 }); } } #endregion diff --git a/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml b/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml index 792e428..9e05ad2 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml +++ b/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml @@ -853,9 +853,12 @@ - + Background="{Binding BaseStationPowerBackground}"/>--> + +