diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/DesignTimeBuild/.dtbcache.v2 b/JiangsuEarthquake/.vs/JiangsuEarthquake/DesignTimeBuild/.dtbcache.v2 index 95141a0..8a46e87 100644 Binary files a/JiangsuEarthquake/.vs/JiangsuEarthquake/DesignTimeBuild/.dtbcache.v2 and b/JiangsuEarthquake/.vs/JiangsuEarthquake/DesignTimeBuild/.dtbcache.v2 differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/2ca6184a-415e-446f-8a85-e375855f9113.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/2ca6184a-415e-446f-8a85-e375855f9113.vsidx new file mode 100644 index 0000000..212276b Binary files /dev/null and b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/2ca6184a-415e-446f-8a85-e375855f9113.vsidx differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/2e1f988a-3049-4446-b811-6e2789969dfd.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/2e1f988a-3049-4446-b811-6e2789969dfd.vsidx new file mode 100644 index 0000000..352cc3e Binary files /dev/null and b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/2e1f988a-3049-4446-b811-6e2789969dfd.vsidx differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/963a2330-d03d-4a48-8704-f8f44efd935e.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/963a2330-d03d-4a48-8704-f8f44efd935e.vsidx deleted file mode 100644 index f4617c2..0000000 Binary files a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/963a2330-d03d-4a48-8704-f8f44efd935e.vsidx and /dev/null differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/bfd80d1a-e9b9-499f-93f9-ec0f6fa3f37f.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/bfd80d1a-e9b9-499f-93f9-ec0f6fa3f37f.vsidx deleted file mode 100644 index f6996b7..0000000 Binary files a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/bfd80d1a-e9b9-499f-93f9-ec0f6fa3f37f.vsidx and /dev/null differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/c19d841a-7977-4067-8cb2-02e43d00a8b0.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/c19d841a-7977-4067-8cb2-02e43d00a8b0.vsidx deleted file mode 100644 index f68a3eb..0000000 Binary files a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/c19d841a-7977-4067-8cb2-02e43d00a8b0.vsidx and /dev/null differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/e7e23125-ab0d-45ce-a27a-4ca0e8f38942.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/e7e23125-ab0d-45ce-a27a-4ca0e8f38942.vsidx new file mode 100644 index 0000000..33841ad Binary files /dev/null and b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/e7e23125-ab0d-45ce-a27a-4ca0e8f38942.vsidx differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/e838c1f5-6327-4928-9b0e-dc57f825f266.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/e838c1f5-6327-4928-9b0e-dc57f825f266.vsidx deleted file mode 100644 index 566acc5..0000000 Binary files a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/e838c1f5-6327-4928-9b0e-dc57f825f266.vsidx and /dev/null differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/fd2e5b2b-7b42-4a07-899b-7da839923c51.vsidx b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/fd2e5b2b-7b42-4a07-899b-7da839923c51.vsidx new file mode 100644 index 0000000..888faf0 Binary files /dev/null and b/JiangsuEarthquake/.vs/JiangsuEarthquake/FileContentIndex/fd2e5b2b-7b42-4a07-899b-7da839923c51.vsidx differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.futdcache.v2 b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.futdcache.v2 index a393d7f..9eef631 100644 Binary files a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.futdcache.v2 and b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.futdcache.v2 differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.suo b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.suo index 0a8955b..72a8e4e 100644 Binary files a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.suo and b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/.suo differ diff --git a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json index a7ecc6a..8e212be 100644 --- a/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json +++ b/JiangsuEarthquake/.vs/JiangsuEarthquake/v17/DocumentLayout.json @@ -2,69 +2,77 @@ "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\\views\\usercontrols\\alarmsettingview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\usercontrols\\alarmsettingview.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\\views\\usercontrols\\alarmsettingview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\usercontrols\\alarmsettingview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|" - }, { "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\\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\\views\\usercontrols\\textdialog.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\usercontrols\\textdialog.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\\viewmodels\\systemcontrolviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\systemcontrolviewmodel.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}", + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\views\\systemcontrolview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\systemcontrolview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|" + }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\views\\usercontrols\\alarmsettingview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\usercontrols\\alarmsettingview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|" + }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|f:\\code\\jseq\\20240301_jseq_upperpc\\jiangsuearthquake\\jiangsuearthquake\\views\\usercontrols\\alarmsettingview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\usercontrols\\alarmsettingview.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\\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}" }, { - "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\views\\systemcontrolview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\systemcontrolview.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|" + "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\\commodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\commodel.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\\models\\commodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\commodel.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\\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\\dataaccess\\dbhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\dataaccess\\dbhelper.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\\commodel2.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\commodel2.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\\volcurcollectormodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\volcurcollectormodel.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\\volcurcollectormodel2.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\\connectconvert2.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\common\\connectconvert2.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\\mainwindow.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\mainwindow.xaml.cs||{8B382828-6202-11D1-8870-0000F87579D2}|" + }, + { + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\models\\volcurcollectormodel2.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\volcurcollectormodel2.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\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + "AbsoluteMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\jiangsuearthquake\\models\\volcurcollectormodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\models\\volcurcollectormodel.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\\tools.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\common\\tools.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\\usercontrols\\textdialog.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\usercontrols\\textdialog.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\\dataaccess\\dbhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\dataaccess\\dbhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -74,11 +82,63 @@ "DocumentGroups": [ { "DockedWidth": 196, - "SelectedChildIndex": 1, + "SelectedChildIndex": 14, "Children": [ { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 10, + "Title": "ComModel2.cs", + "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ComModel2.cs", + "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\ComModel2.cs", + "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ComModel2.cs", + "RelativeToolTip": "JiangsuEarthquake\\Models\\ComModel2.cs", + "ViewState": "AQIAAAMAAAAAAAAAAAAAADQAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-18T06:56:29.71Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "MainWindow.xaml.cs", + "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\MainWindow.xaml.cs", + "RelativeDocumentMoniker": "JiangsuEarthquake\\MainWindow.xaml.cs", + "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\MainWindow.xaml.cs", + "RelativeToolTip": "JiangsuEarthquake\\MainWindow.xaml.cs", + "ViewState": "AQIAAAEAAAAAAAAAAAAAAC0AAAAIAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-18T06:41:01.564Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "ConnectConvert2.cs", + "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\ConnectConvert2.cs", + "RelativeDocumentMoniker": "JiangsuEarthquake\\Common\\ConnectConvert2.cs", + "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\ConnectConvert2.cs", + "RelativeToolTip": "JiangsuEarthquake\\Common\\ConnectConvert2.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABIAAAAQAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-18T06:29:04.315Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "ClientModel.cs", + "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ClientModel.cs", + "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\ClientModel.cs", + "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ClientModel.cs", + "RelativeToolTip": "JiangsuEarthquake\\Models\\ClientModel.cs", + "ViewState": "AQIAACcAAAAAAAAAAIAzwDIAAAAyAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-18T06:28:41.516Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 16, "Title": "TextDialog.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\UserControls\\TextDialog.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\UserControls\\TextDialog.xaml", @@ -90,7 +150,7 @@ }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 4, "Title": "AlarmSettingView.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\UserControls\\AlarmSettingView.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\UserControls\\AlarmSettingView.xaml", @@ -102,72 +162,72 @@ }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 3, "Title": "AlarmSettingView.xaml.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\UserControls\\AlarmSettingView.xaml.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\UserControls\\AlarmSettingView.xaml.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\UserControls\\AlarmSettingView.xaml.cs", "RelativeToolTip": "JiangsuEarthquake\\Views\\UserControls\\AlarmSettingView.xaml.cs", - "ViewState": "AQIAADcAAAAAAAAAAAAiwF8AAAAmAAAA", + "ViewState": "AQIAABgAAAAAAAAAAAAzwCsAAAANAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-17T07:52:06.944Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 17, "Title": "DBHelper.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\DataAccess\\DBHelper.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\DataAccess\\DBHelper.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\DataAccess\\DBHelper.cs", "RelativeToolTip": "JiangsuEarthquake\\DataAccess\\DBHelper.cs", - "ViewState": "AQIAAAMAAAAAAAAAAAAAABQAAAAPAAAA", + "ViewState": "AQIAAAAAAAAAAAAAAABOwBQAAAAPAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-17T01:04:50.395Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 15, "Title": "VolCurCollectorModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\VolCurCollectorModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\VolCurCollectorModel.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\VolCurCollectorModel.cs", "RelativeToolTip": "JiangsuEarthquake\\Models\\VolCurCollectorModel.cs", - "ViewState": "AQIAAF4AAAAAAAAAAAAkwG0AAAAoAAAA", + "ViewState": "AQIAAAYAAAAAAAAAAAAAABMAAABGAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-17T00:28:01.438Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 14, "Title": "VolCurCollectorModel2.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\VolCurCollectorModel2.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\VolCurCollectorModel2.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\VolCurCollectorModel2.cs", "RelativeToolTip": "JiangsuEarthquake\\Models\\VolCurCollectorModel2.cs", - "ViewState": "AQIAADIAAAAAAAAAAAAiwGoAAAANAAAA", + "ViewState": "AQIAADIAAAAAAAAAAAA4wGoAAAANAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-17T06:28:24.849Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 10, + "DocumentIndex": 7, "Title": "ComModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ComModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\ComModel.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\ComModel.cs", "RelativeToolTip": "JiangsuEarthquake\\Models\\ComModel.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAABAAAA", + "ViewState": "AQIAAA4AAAAAAAAAAAAUwCMAAAAMAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-16T08:15:26.979Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 8, "Title": "SystemControlView.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemControlView.xaml", @@ -179,72 +239,46 @@ }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 2, "Title": "SystemControlView.xaml.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemControlView.xaml.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml.cs", "RelativeToolTip": "JiangsuEarthquake\\Views\\SystemControlView.xaml.cs", - "ViewState": "AQIAAAkAAAAAAAAAAAAAAC8AAAAIAAAA", + "ViewState": "AQIAAAwAAAAAAAAAAAAAABEAAAAhAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-16T07:45:39.593Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 1, "Title": "SystemControlViewModel.cs", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\SystemControlViewModel.cs", "RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\SystemControlViewModel.cs", "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\SystemControlViewModel.cs", "RelativeToolTip": "JiangsuEarthquake\\ViewModels\\SystemControlViewModel.cs", - "ViewState": "AQIAABUAAAAAAAAAAAAzwEgAAAAqAAAA", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAA8AAAAnAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-16T07:54:58.266Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 2, + "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": "AQIAANUAAAAAAAAAAAAAADkDAAAMAAAA", + "ViewState": "AQIAABQCAAAAAAAAAAAiwPkFAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-03-12T06:03:03.53Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 14, - "Title": "App.config", - "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\App.config", - "RelativeDocumentMoniker": "JiangsuEarthquake\\App.config", - "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\App.config", - "RelativeToolTip": "JiangsuEarthquake\\App.config", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAB8AAAAbAAAA", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", - "WhenOpened": "2024-04-09T07:40:07.536Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 15, - "Title": "Tools.cs", - "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\Tools.cs", - "RelativeDocumentMoniker": "JiangsuEarthquake\\Common\\Tools.cs", - "ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\Tools.cs", - "RelativeToolTip": "JiangsuEarthquake\\Common\\Tools.cs", - "ViewState": "AQIAAPYAAAAAAAAAAABBwA4BAAAJAAAA", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-04-10T11:03:39.252Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 4, + "DocumentIndex": 9, "Title": "MainWindow.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\MainWindow.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\MainWindow.xaml", @@ -256,7 +290,7 @@ }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 5, "Title": "BoosterStationStateDataView.xaml", "DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml", "RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml", @@ -268,13 +302,13 @@ }, { "$type": "Document", - "DocumentIndex": 3, + "DocumentIndex": 6, "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": "AQIAAKwAAAAAAAAAAAAkwLsAAAA9AAAA", + "ViewState": "AQIAAA8AAAAAAAAAAAAAABIAAAAmAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-17T08:04:49.029Z", "EditorCaption": "" diff --git a/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.metadata.v7.bin b/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.metadata.v7.bin index fe67896..537eccb 100644 Binary files a/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.metadata.v7.bin and b/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.metadata.v7.bin differ diff --git a/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.projects.v7.bin b/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.projects.v7.bin index 0de7c02..3cfc157 100644 Binary files a/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.projects.v7.bin and b/JiangsuEarthquake/.vs/ProjectEvaluation/jiangsuearthquake.projects.v7.bin differ diff --git a/JiangsuEarthquake/JiangsuEarthquake/App.config b/JiangsuEarthquake/JiangsuEarthquake/App.config index a1585a8..74143b7 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/App.config +++ b/JiangsuEarthquake/JiangsuEarthquake/App.config @@ -20,11 +20,11 @@ - + - + diff --git a/JiangsuEarthquake/JiangsuEarthquake/App.xaml b/JiangsuEarthquake/JiangsuEarthquake/App.xaml index 781c301..2e85f93 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/App.xaml +++ b/JiangsuEarthquake/JiangsuEarthquake/App.xaml @@ -16,9 +16,10 @@ - + + - + diff --git a/JiangsuEarthquake/JiangsuEarthquake/Common/ConnectConvert2.cs b/JiangsuEarthquake/JiangsuEarthquake/Common/ConnectConvert2.cs new file mode 100644 index 0000000..968ac0e --- /dev/null +++ b/JiangsuEarthquake/JiangsuEarthquake/Common/ConnectConvert2.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace JiangsuEarthquake.Common +{ + public class ConnectConvert2 : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value.ToString() == "True") + { + return "断开"; + } + else + { + return "连接"; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/JiangsuEarthquake/JiangsuEarthquake/Models/ComModel.cs b/JiangsuEarthquake/JiangsuEarthquake/Models/ComModel.cs index 38e5eef..a8371be 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Models/ComModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/Models/ComModel.cs @@ -11,12 +11,9 @@ namespace JiangsuEarthquake.Models { public class ComModel : NotifyBase { - RTU rtuInstance = null; - - SerialInfo serialInfo = new SerialInfo(); + private RTU rtuInstance = null; private VolCurCollectorModel volCurCollectorModel { get; set; } = new VolCurCollectorModel(); - private VolCurCollectorModel2 volCurCollectorModel2 { get; set; } = new VolCurCollectorModel2(); private bool isConnected; @@ -34,13 +31,10 @@ namespace JiangsuEarthquake.Models /// 建立连接 /// /// - public bool DoConnect(SerialInfo serialInfo, int stationId) + public bool DoConnect(SerialInfo serialInfo) { rtuInstance = RTU.GetInstance(serialInfo); - if (stationId == 1) - rtuInstance.ResponseData = new Action>(volCurCollectorModel.ParsingData); - else - rtuInstance.ResponseData = new Action>(volCurCollectorModel2.ParsingData); + rtuInstance.ResponseData = new Action>(volCurCollectorModel.ParsingData); IsConnected = rtuInstance.Connection(); return IsConnected; } diff --git a/JiangsuEarthquake/JiangsuEarthquake/Models/ComModel2.cs b/JiangsuEarthquake/JiangsuEarthquake/Models/ComModel2.cs new file mode 100644 index 0000000..52877e1 --- /dev/null +++ b/JiangsuEarthquake/JiangsuEarthquake/Models/ComModel2.cs @@ -0,0 +1,78 @@ +using Communication.Modbus; +using Communication; +using JiangsuEarthquake.Common; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiangsuEarthquake.Models +{ + public class ComModel2 : NotifyBase + { + private RTU rtuInstance2 = null; + + private VolCurCollectorModel2 volCurCollectorModel2 { get; set; } = new VolCurCollectorModel2(); + + private bool isConnected; + + /// + /// 是否连接 + /// + public bool IsConnected + { + get { return isConnected; } + set { isConnected = value; this.DoNotify(); } + } + + + /// + /// 建立连接 + /// + /// + public bool DoConnect(SerialInfo serialInfo) + { + rtuInstance2 = RTU.GetInstance(serialInfo); + rtuInstance2.ResponseData = new Action>(volCurCollectorModel2.ParsingData); + IsConnected = rtuInstance2.Connection(); + return IsConnected; + } + + + /// + /// 断开连接 + /// + /// + public bool DisConnect() + { + rtuInstance2.Dispose(); + IsConnected = false; + return IsConnected; + } + + + public bool SendMessage(byte[] _send) + { + if (_send.Length == 0) + return false; + try + { + if (IsConnected) + { + rtuInstance2.Send(_send); + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + return false; + } + + } + } +} diff --git a/JiangsuEarthquake/JiangsuEarthquake/Models/VolCurCollectorModel.cs b/JiangsuEarthquake/JiangsuEarthquake/Models/VolCurCollectorModel.cs index 04b3f8d..e225119 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Models/VolCurCollectorModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/Models/VolCurCollectorModel.cs @@ -119,7 +119,27 @@ namespace JiangsuEarthquake.Models return; //需要判断发送内容和接收内容是否相同,相同则设置成功 + //根据寄存器地址判断接收的到信息是对什么进行设置的 + if (byteList[2] ==0x01 && byteList[3]==0x2C) //继电器报警参数 + { + } + else if(byteList[2] == 0x01 && byteList[3] == 0x2D) //继电器报警阀值 1 + { + + } + else if(byteList[2] == 0x01 && byteList[3] == 0x2E) //继电器报警阀值 2 + { + + } + else if(byteList[2] == 0x01 && byteList[3] == 0x2F) //继电器报警功能 + { + + } + else if (byteList[2] == 0x01 && byteList[3] == 0x30) //继电器输出 + { + + } } } diff --git a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs index e73144a..1ed2d0f 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/BoosterStationStateDataViewModel.cs @@ -24,6 +24,9 @@ namespace JiangsuEarthquake.ViewModels public BoosterStationStateDataView boosterStationStateDataView { get; set; } = new BoosterStationStateDataView(); + + #region SearchData + private DateTime _startDateTime; public DateTime StartDateTime @@ -65,7 +68,10 @@ namespace JiangsuEarthquake.ViewModels get { return boosterStationStateMsg; } set { boosterStationStateMsg = value; this.DoNotify(); } } + #endregion + + #region Coordinate Axis public SeriesCollection seriesCollection; public SeriesCollection SeriesCollection @@ -113,6 +119,8 @@ namespace JiangsuEarthquake.ViewModels this.DoNotify(); } } + #endregion + private ObservableCollection boosterStationStateDataList = new ObservableCollection(); @@ -134,12 +142,10 @@ namespace JiangsuEarthquake.ViewModels public CommandBase NextBoosterStationStateCommand { get; set; } //读取日志信息 - public CommandBase AlarmSettingCommand { get; set; } - int station_id = 1; - + #region Data Filtering public static DialogViewModel vm; private bool _isChecked; @@ -258,6 +264,7 @@ namespace JiangsuEarthquake.ViewModels YFormatter2 = val => val.ToString("F2") + " A"; } } + #endregion public BoosterStationStateDataViewModel(int id) @@ -281,12 +288,10 @@ namespace JiangsuEarthquake.ViewModels this.NextBoosterStationStateCommand = new CommandBase(); this.NextBoosterStationStateCommand.DoExcute = new Action(NextBoosterStationState); this.NextBoosterStationStateCommand.DoCanExcute = new Func((o) => true); - - this.AlarmSettingCommand = new CommandBase(); - this.AlarmSettingCommand.DoExcute = new Action(AlarmSetting); - this.AlarmSettingCommand.DoCanExcute = new Func((o) => true); } + + #region Page Switching public void ForwordBoosterStationState(object o) { if (PageIndex == 1) @@ -314,10 +319,7 @@ namespace JiangsuEarthquake.ViewModels } BoosterStationStateMsg = string.Format("共计{0}页,当前第{1}页", TotalPage, PageIndex); } + #endregion - public void AlarmSetting(object o) - { - HandyControl.Controls.Dialog.Show(new AlarmSettingView()); - } } } diff --git a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs index 27f998b..6390c8e 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/MainViewModel.cs @@ -18,6 +18,10 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Windows.Threading; +using Communication; +using System.IO.Ports; +using JiangsuEarthquake.Views.UserControls; +using HandyControl.Tools.Extension; namespace JiangsuEarthquake.ViewModels { @@ -201,14 +205,107 @@ namespace JiangsuEarthquake.ViewModels }; + #region Communication + public CommandBase Com1DoConnectCommand { get; set; } //串口连接/断开操作 + public CommandBase Com2DoConnectCommand { get; set; } //串口连接/断开操作 + + public CommandBase Socket1DoConnectCommand { get; set; } //客户端连接/断开操作 + public CommandBase Socket2DoConnectCommand { get; set; } //客户端连接/断开操作 + + public ClientModel clientModel1 { get; set; } = new ClientModel(); + public ClientModel clientModel2 { get; set; } = new ClientModel(); + + public ComModel comModel1 { get; set; } = new ComModel(); + + public ComModel2 comModel2 { get; set; } = new ComModel2(); + #endregion + + + #region VolCurCollectorModel + private byte fromDeviceAddress { get; set; } //从设备地址 + + private byte functionCode { get; set; } //功能码 + + private byte[] startingRegisterAddress { get; set; } //起始寄存器地址 + + private byte[] registerNumber { get; set; } //寄存器个数 + + private byte[] registerAddress { get; set; } //寄存器地址 + + private byte[] checkCodeCRC { get; set; } //校验码 + + private List checkByte { get; set; } = new List(); //校验码Byte + + private byte[] writeData { get; set; } //数据 + + private List sendBytes { get; set; } = new List(); //发送数据 + + #endregion + + + #region AlarmSet + public CommandBase AlarmSettingCommand { get; set; } //显示报警设置窗体 + + public CommandBase AlarmSetButtonCommand { get; set; } //发送报警设置信息 + + public CommandBase AskDataCommand { get; set; } //获取数据 + + public string alarmParaComSelectedItem; + + public string AlarmParaComSelectedItem + { + get { return alarmParaComSelectedItem; } + set + { + alarmParaComSelectedItem = value; + this.DoNotify(); + } + } + + public string alarmFuncComSelectedItem; + + public string AlarmFuncComSelectedItem + { + get { return alarmFuncComSelectedItem; } + set + { + alarmFuncComSelectedItem = value; + this.DoNotify(); + } + } + + public string alarmUpTBText; + + public string AlarmUpTBText + { + get { return alarmUpTBText; } + set + { + alarmUpTBText = value; + this.DoNotify(); + } + } + + public string alarmDownTBText; + + public string AlarmDownTBText + { + get { return alarmDownTBText; } + set + { + alarmDownTBText = value; + this.DoNotify(); + } + } + #endregion + + public MainViewModel() { this.NavChangedCommand = new CommandBase(); this.NavChangedCommand.DoExcute = new Action(DoNavChanged); this.NavChangedCommand.DoCanExcute = new Func((o) => true); - - this.Switch = new CommandBase(); this.Switch.DoExcute = new Action(Btn_Switch); this.Switch.DoCanExcute = new Func((o) => true); @@ -217,6 +314,34 @@ namespace JiangsuEarthquake.ViewModels this.ParaSetSwitch.DoExcute = new Action(Btn_ParaSet); this.ParaSetSwitch.DoCanExcute = new Func((o) => true); + this.Socket1DoConnectCommand = new CommandBase(); + this.Socket1DoConnectCommand.DoExcute = new Action(DoSocket1Connect); + this.Socket1DoConnectCommand.DoCanExcute = new Func((o) => true); + + this.Socket2DoConnectCommand = new CommandBase(); + this.Socket2DoConnectCommand.DoExcute = new Action(DoSocket2Connect); + this.Socket2DoConnectCommand.DoCanExcute = new Func((o) => true); + + this.Com1DoConnectCommand = new CommandBase(); + this.Com1DoConnectCommand.DoExcute = new Action(Com1DoConnect); + this.Com1DoConnectCommand.DoCanExcute = new Func((o) => { return true; }); + + this.Com2DoConnectCommand = new CommandBase(); + this.Com2DoConnectCommand.DoExcute = new Action(Com2DoConnect); + this.Com2DoConnectCommand.DoCanExcute = new Func((o) => { return true; }); + + this.AlarmSettingCommand = new CommandBase(); + this.AlarmSettingCommand.DoExcute = new Action(AlarmSetting); + this.AlarmSettingCommand.DoCanExcute = new Func((o) => true); + + this.AlarmSetButtonCommand = new CommandBase(); + this.AlarmSetButtonCommand.DoExcute = new Action(AlarmSetButton); + this.AlarmSetButtonCommand.DoCanExcute = new Func((o) => true); + + this.AskDataCommand = new CommandBase(); + this.AskDataCommand.DoExcute = new Action(AskData); + this.AskDataCommand.DoCanExcute = new Func((o) => true); + #region 日志页面初始化 string sql = String.Format("select * from logrecordhis where StationID = {0} ORDER by id desc limit 100", 1); @@ -1044,6 +1169,368 @@ namespace JiangsuEarthquake.ViewModels } + #region Communication Command + /// + /// Socket1连接 + /// + /// + public void DoSocket1Connect(object o) + { + if (clientModel1.IsConnected) + { + Task.Run(new Action(async () => + { + await Task.Delay(100); + clientModel1.DisConnect(); + })); + } + else + { + Task.Run(new Action(async () => + { + await Task.Delay(150); + + //if (clientModel1.DoConnect(SocketInfo1)) + //{ + // EM.Socket1ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo1.IP, SocketInfo1.Port.ToString()); + // //更新下App.config中的配置信息 + // Tools.UpdateAppSettings("PLC_IP1", SocketInfo1.IP); + // Tools.UpdateAppSettings("PLC_Service_Port1", SocketInfo1.Port.ToString()); + //} + })); + } + } + + /// + /// Socket2连接 + /// + /// + public void DoSocket2Connect(object o) + { + if (clientModel2.IsConnected) + { + Task.Run(new Action(async () => + { + await Task.Delay(100); + clientModel2.DisConnect(); + })); + } + else + { + Task.Run(new Action(async () => + { + await Task.Delay(200); + + //if (clientModel2.DoConnect(SocketInfo2)) + //{ + // EM.Socket2ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo2.IP, SocketInfo2.Port.ToString()); + // //更新下App.config中的配置信息 + // Tools.UpdateAppSettings("PLC_IP2", SocketInfo2.IP); + // Tools.UpdateAppSettings("PLC_Service_Port2", SocketInfo2.Port.ToString()); + //} + })); + } + } + + public static SerialInfo SerialInfo1 { get; set; } = new SerialInfo() //初始化串口连接信息 + { + PortName = Tools.GetAppSetting("PortName1"), + BaudRate = Convert.ToInt32(Tools.GetAppSetting("BaudRate1")), + DataBit = 8, + Parity = Parity.None, + StopBits = StopBits.One + }; + + public void Com1DoConnect(object o) + { + if (comModel1.IsConnected) + { + Task.Run(new Action(async () => + { + await Task.Delay(100); + comModel1.DisConnect(); + })); + + } + else + { + Task.Run(new Action(async () => + { + await Task.Delay(100); + + if (comModel1.DoConnect(SerialInfo1)) + { + //EM.ComConMessage = string.Format("串口号:{0} \r\n波特率:{1}", SerialInfo.PortName, SerialInfo.BaudRate.ToString()); + //更新下App.config中的配置信息 + //Tools.UpdateAppSettings("PortName", SerialInfo1.PortName); + //Tools.UpdateAppSettings("BaudRate", SerialInfo1.BaudRate.ToString()); + } + })); + } + } + + public static SerialInfo SerialInfo2 { get; set; } = new SerialInfo() //初始化串口连接信息 + { + PortName = Tools.GetAppSetting("PortName2"), + BaudRate = Convert.ToInt32(Tools.GetAppSetting("BaudRate2")), + DataBit = 8, + Parity = Parity.None, + StopBits = StopBits.One + }; + + public void Com2DoConnect(object o) + { + if (comModel2.IsConnected) + { + Task.Run(new Action(async () => + { + await Task.Delay(100); + comModel2.DisConnect(); + })); + + } + else + { + Task.Run(new Action(async () => + { + await Task.Delay(100); + + if (comModel2.DoConnect(SerialInfo2)) + { + //EM.ComConMessage = string.Format("串口号:{0} \r\n波特率:{1}", SerialInfo.PortName, SerialInfo.BaudRate.ToString()); + //更新下App.config中的配置信息 + //Tools.UpdateAppSettings("PortName", SerialInfo2.PortName); + //Tools.UpdateAppSettings("BaudRate", SerialInfo2.BaudRate.ToString()); + } + })); + } + } + #endregion + + + #region AlarmSetCommand + public void AlarmSetting(object o) + { + HandyControl.Controls.Dialog.Show(new AlarmSettingView()); + } + + + public void AlarmSetButton(object o) + { + //对从设备单个寄存器置数 + fromDeviceAddress = 0x01; //从设备地址 + + //先设置报警参数(300 寄存器)即对应哪个参数报警 + functionCode = 0x06; //功能码 + registerAddress = new byte[] { 0x01, 0x2C }; + + if (AlarmParaComSelectedItem == "电压") + writeData = new byte[] { 0x00, 0x07 }; + else if (AlarmParaComSelectedItem == "电流") + writeData = new byte[] { 0x00, 0x08 }; + + //校验码计算 + checkByte.Clear(); + checkByte.Add(fromDeviceAddress); + checkByte.Add(functionCode); + checkByte.AddRange(registerAddress); + checkByte.AddRange(writeData); + checkCodeCRC = Tools.CRCCalc(checkByte.ToArray()); + //发送指令 + sendBytes.Clear(); + sendBytes.Add(fromDeviceAddress); + sendBytes.Add(functionCode); + sendBytes.AddRange(registerAddress); + sendBytes.AddRange(writeData); + sendBytes.AddRange(checkCodeCRC); + if (station_id == 1) + { + if (comModel1.IsConnected) + comModel1.SendMessage(sendBytes.ToArray()); + } + else if (station_id == 2) + { + if (comModel2.IsConnected) + comModel2.SendMessage(sendBytes.ToArray()); + } + + //再设置报警功能(303 寄存器)即需要上 / 下限等报警功能 + functionCode = 0x06; //功能码 + registerAddress = new byte[] { 0x01, 0x2F }; + + if (AlarmFuncComSelectedItem == "下限报警") + writeData = new byte[] { 0x00, 0x01 }; + else if (AlarmFuncComSelectedItem == "上限报警") + writeData = new byte[] { 0x00, 0x02 }; + else if (AlarmFuncComSelectedItem == "上下限报警") + writeData = new byte[] { 0x00, 0x03 }; + else if (AlarmFuncComSelectedItem == "区间内报警") + writeData = new byte[] { 0x00, 0x04 }; + + //校验码计算 + checkByte.Clear(); + checkByte.Add(fromDeviceAddress); + checkByte.Add(functionCode); + checkByte.AddRange(registerAddress); + checkByte.AddRange(writeData); + checkCodeCRC = Tools.CRCCalc(checkByte.ToArray()); + //发送指令 + sendBytes.Clear(); + sendBytes.Add(fromDeviceAddress); + sendBytes.Add(functionCode); + sendBytes.AddRange(registerAddress); + sendBytes.AddRange(writeData); + sendBytes.AddRange(checkCodeCRC); + if (station_id == 1) + { + if (comModel1.IsConnected) + comModel1.SendMessage(sendBytes.ToArray()); + } + else if (station_id == 2) + { + if (comModel2.IsConnected) + comModel2.SendMessage(sendBytes.ToArray()); + } + + //再设置报警阀值(301 与 302 寄存器),根据报警功能设置对应的下/ 下限报警值(报警阀值设置为量程的百分比方式) + if (AlarmFuncComSelectedItem == "下限报警"|| AlarmFuncComSelectedItem == "上限报警") + { + functionCode = 0x06; //功能码 + + if (AlarmFuncComSelectedItem == "下限报警") + { + registerAddress = new byte[] { 0x01, 0x2D }; + ushort down = ushort.Parse(AlarmDownTBText); + if (AlarmParaComSelectedItem == "电流") + down = (ushort)(ushort.Parse(AlarmDownTBText) * 5); + writeData = new byte[2]; + writeData[0] = (byte)((down & 0xFF00) >> 8); + writeData[1] = (byte)(down & 0x00FF); + } + else if (AlarmParaComSelectedItem == "上限报警") + { + registerAddress = new byte[] { 0x01, 0x2D }; + ushort up = ushort.Parse(AlarmUpTBText); + if (AlarmParaComSelectedItem == "电流") + up = (ushort)(ushort.Parse(AlarmDownTBText) * 5); + writeData = new byte[2]; + writeData[0] = (byte)((up & 0xFF00) >> 8); + writeData[1] = (byte)(up & 0x00FF); + } + + //校验码计算 + checkByte.Clear(); + checkByte.Add(fromDeviceAddress); + checkByte.Add(functionCode); + checkByte.AddRange(registerAddress); + checkByte.AddRange(writeData); + checkCodeCRC = Tools.CRCCalc(checkByte.ToArray()); + //发送指令 + sendBytes.Clear(); + sendBytes.Add(fromDeviceAddress); + sendBytes.Add(functionCode); + sendBytes.AddRange(registerAddress); + sendBytes.AddRange(writeData); + sendBytes.AddRange(checkCodeCRC); + if (station_id == 1) + { + if (comModel1.IsConnected) + comModel1.SendMessage(sendBytes.ToArray()); + } + else if (station_id == 2) + { + if (comModel2.IsConnected) + comModel2.SendMessage(sendBytes.ToArray()); + } + } + else if(AlarmFuncComSelectedItem == "上下限报警"|| AlarmFuncComSelectedItem == "区间内报警") + { + functionCode = 0x10; //功能码 + startingRegisterAddress = new byte[2] { 0x01, 0x2D }; //起始寄存器地址 + registerNumber = new byte[2] { 0x00, 0x02 }; //寄存器个数 + byte dataNumber = 0x04; + ushort down = ushort.Parse(AlarmDownTBText); + ushort up = ushort.Parse(AlarmUpTBText); + if (AlarmParaComSelectedItem == "电流") + { + down = (ushort)(ushort.Parse(AlarmDownTBText) * 5); + up = (ushort)(ushort.Parse(AlarmDownTBText) * 5); + } + writeData = new byte[4]; + writeData[0] = (byte)((down & 0xFF00) >> 8); + writeData[1] = (byte)(down & 0x00FF); + writeData[2] = (byte)((up & 0xFF00) >> 8); + writeData[3] = (byte)(up & 0x00FF); + + //校验码计算 + checkByte.Clear(); + checkByte.Add(fromDeviceAddress); + checkByte.Add(functionCode); + checkByte.AddRange(startingRegisterAddress); + checkByte.AddRange(registerNumber); + checkByte.Add(dataNumber); + checkByte.AddRange(writeData); + checkCodeCRC = Tools.CRCCalc(checkByte.ToArray()); + //发送指令 + sendBytes.Clear(); + sendBytes.Add(fromDeviceAddress); + sendBytes.Add(functionCode); + sendBytes.AddRange(startingRegisterAddress); + sendBytes.AddRange(registerNumber); + sendBytes.Add(dataNumber); + sendBytes.AddRange(writeData); + sendBytes.AddRange(checkCodeCRC); + + if (station_id == 1) + { + if (comModel1.IsConnected) + comModel1.SendMessage(sendBytes.ToArray()); + } + else if (station_id == 2) + { + if (comModel2.IsConnected) + comModel2.SendMessage(sendBytes.ToArray()); + } + } + } + + + public void AskData(object o) + { + //查询从设备寄存器内容 + fromDeviceAddress = 0x01; //从设备地址 + functionCode = 0x03; //功能码 + startingRegisterAddress = new byte[2] { 0x00, 0x00 }; //起始寄存器地址 + registerNumber = new byte[2] { 0x00, 0x10 }; //寄存器个数 + //校验码计算 + checkByte.Clear(); + checkByte.Add(fromDeviceAddress); + checkByte.Add(functionCode); + checkByte.AddRange(startingRegisterAddress); + checkByte.AddRange(registerNumber); + checkCodeCRC = Tools.CRCCalc(checkByte.ToArray()); + //发送指令 + sendBytes.Clear(); + sendBytes.Add(fromDeviceAddress); + sendBytes.Add(functionCode); + sendBytes.AddRange(startingRegisterAddress); + sendBytes.AddRange(registerNumber); + sendBytes.AddRange(checkCodeCRC); + + if (station_id == 1) + { + if (comModel1.IsConnected) + comModel1.SendMessage(sendBytes.ToArray()); + } + else if (station_id == 2) + { + if (comModel2.IsConnected) + comModel2.SendMessage(sendBytes.ToArray()); + } + } + #endregion + + //各个开关 public async void Btn_Switch(object o) { diff --git a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemControlViewModel.cs b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemControlViewModel.cs index 7026142..5048387 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemControlViewModel.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/ViewModels/SystemControlViewModel.cs @@ -1,7 +1,9 @@ -using JiangsuEarthquake.Common; +using Communication; +using JiangsuEarthquake.Common; using JiangsuEarthquake.Models; using System; using System.Collections.Generic; +using System.IO.Ports; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -10,85 +12,10 @@ namespace JiangsuEarthquake.ViewModels { public class SystemControlViewModel { - public CommandBase Com1DoConnectCommand { get; set; } //串口连接/断开操作 - public CommandBase Com2DoConnectCommand { get; set; } //串口连接/断开操作 - - public CommandBase Socket1DoConnectCommand { get; set; } //客户端连接/断开操作 - public CommandBase Socket2DoConnectCommand { get; set; } //客户端连接/断开操作 - - public ClientModel clientModel1 { get; set; } = new ClientModel(); - public ClientModel clientModel2 { get; set; } = new ClientModel(); public SystemControlViewModel() { - this.Socket1DoConnectCommand = new CommandBase(); - this.Socket1DoConnectCommand.DoExcute = new Action(DoSocket1Connect); - this.Socket1DoConnectCommand.DoCanExcute = new Func((o) => true); - - this.Socket2DoConnectCommand = new CommandBase(); - this.Socket2DoConnectCommand.DoExcute = new Action(DoSocket2Connect); - this.Socket2DoConnectCommand.DoCanExcute = new Func((o) => true); - } - - /// - /// Socket1连接 - /// - /// - public void DoSocket1Connect(object o) - { - if (clientModel1.IsConnected) - { - Task.Run(new Action(async () => - { - await Task.Delay(100); - clientModel1.DisConnect(); - })); - } - else - { - Task.Run(new Action(async () => - { - await Task.Delay(150); - - //if (clientModel1.DoConnect(SocketInfo1)) - //{ - // EM.Socket1ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo1.IP, SocketInfo1.Port.ToString()); - // //更新下App.config中的配置信息 - // Tools.UpdateAppSettings("PLC_IP1", SocketInfo1.IP); - // Tools.UpdateAppSettings("PLC_Service_Port1", SocketInfo1.Port.ToString()); - //} - })); - } - } - /// - /// Socket2连接 - /// - /// - public void DoSocket2Connect(object o) - { - if (clientModel2.IsConnected) - { - Task.Run(new Action(async () => - { - await Task.Delay(100); - clientModel2.DisConnect(); - })); - } - else - { - Task.Run(new Action(async () => - { - await Task.Delay(200); - - //if (clientModel2.DoConnect(SocketInfo2)) - //{ - // EM.Socket2ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo2.IP, SocketInfo2.Port.ToString()); - // //更新下App.config中的配置信息 - // Tools.UpdateAppSettings("PLC_IP2", SocketInfo2.IP); - // Tools.UpdateAppSettings("PLC_Service_Port2", SocketInfo2.Port.ToString()); - //} - })); - } - } + + } } } diff --git a/JiangsuEarthquake/JiangsuEarthquake/Views/AlarmRecordView.xaml b/JiangsuEarthquake/JiangsuEarthquake/Views/AlarmRecordView.xaml index 10cec73..2b05938 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Views/AlarmRecordView.xaml +++ b/JiangsuEarthquake/JiangsuEarthquake/Views/AlarmRecordView.xaml @@ -207,9 +207,11 @@ HorizontalAlignment="Right" Margin="0,0,10,0"> - - + @@ -317,7 +402,7 @@ + Text="{Binding SerialInfo1.PortName}" + HorizontalContentAlignment="Center" > + + + @@ -1016,7 +1108,7 @@ - + @@ -1048,7 +1140,7 @@ @@ -1088,7 +1180,7 @@ @@ -1112,8 +1204,8 @@ + Background="Transparent" BorderBrush="#FF424242" CaretBrush="White" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.EarthQuakeCount}"/> @@ -1127,8 +1219,8 @@ + Background="Transparent" BorderBrush="#FF424242" Margin="10,0,0,0" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.ChannelsNo}"/> @@ -1142,8 +1234,8 @@ + Background="Transparent" BorderBrush="#FF424242" CaretBrush="White" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.WD}"/> @@ -1166,8 +1258,8 @@ + Background="Transparent" BorderBrush="#FF424242" CaretBrush="White" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.EarthQuakeCount}"/> @@ -1181,8 +1273,8 @@ + Background="Transparent" BorderBrush="#FF424242" Margin="10,0,0,0" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.GaoCheng}"/> @@ -1196,8 +1288,8 @@ + Background="Transparent" BorderBrush="#FF424242" CaretBrush="White" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.StartTime}"/> @@ -1220,8 +1312,8 @@ + Background="Transparent" BorderBrush="#FF424242" CaretBrush="White" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.Station_Id}"/> @@ -1235,8 +1327,8 @@ + Background="Transparent" BorderBrush="#FF424242" Margin="10,0,0,0" + BorderThickness="0,0,0,1.2" Text="{Binding EQPS.Software_Version}"/> @@ -1324,10 +1416,10 @@ - + - + diff --git a/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml.cs b/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml.cs index fe5b01f..55cedd2 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml.cs +++ b/JiangsuEarthquake/JiangsuEarthquake/Views/SystemControlView.xaml.cs @@ -1,4 +1,5 @@ using JiangsuEarthquake.Common; +using JiangsuEarthquake.ViewModels; using System; using System.Collections.Generic; using System.Linq; @@ -21,9 +22,11 @@ namespace JiangsuEarthquake.Views /// public partial class SystemControlView : UserControl { + public SystemControlView() { InitializeComponent(); + this.DataContext = MainWindow.mainViewModel; //串口号赋值 for (int i = 0; i < Tools.GetSerialPort().Length; i++) @@ -39,15 +42,9 @@ namespace JiangsuEarthquake.Views this.SYZBTL1.Items.Add(btl[i]); this.SYZBTL2.Items.Add(btl[i]); } - - this.SYZBTL1.SelectedItem = "9600"; - this.SYZBTL2.SelectedItem = "9600"; } - - - private void Button_MouseEnter(object sender, MouseEventArgs e) { Button button = (Button)sender; diff --git a/JiangsuEarthquake/JiangsuEarthquake/Views/SystemStateDataView.xaml b/JiangsuEarthquake/JiangsuEarthquake/Views/SystemStateDataView.xaml index bd2fb94..b0d1fd6 100644 --- a/JiangsuEarthquake/JiangsuEarthquake/Views/SystemStateDataView.xaml +++ b/JiangsuEarthquake/JiangsuEarthquake/Views/SystemStateDataView.xaml @@ -247,9 +247,10 @@ HorizontalAlignment="Right" Margin="0,0,10,0"> -