新增功能:
1 完成对所有地震仪的操作均区分主备地震仪,包括运行状态数据请求、参数读取/设置、调平、凋零等; 2 开始编写地震仪连接认证部分通信逻辑;
This commit is contained in:
parent
188f694afa
commit
d8b23992a2
Binary file not shown.
@ -2,10 +2,18 @@
|
|||||||
"Version": 1,
|
"Version": 1,
|
||||||
"WorkspaceRootPath": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\",
|
"WorkspaceRootPath": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\",
|
||||||
"Documents": [
|
"Documents": [
|
||||||
|
{
|
||||||
|
"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\\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\\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}"
|
"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\\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}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"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\\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}"
|
"RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\views\\boosterstationstatedataview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
|
||||||
@ -30,14 +38,6 @@
|
|||||||
"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}",
|
"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}"
|
"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}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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\\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\\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}"
|
"RelativeMoniker": "D:0:0:{51CD2C1B-B7CD-4AC0-8087-846E14D316AD}|JiangsuEarthquake\\JiangsuEarthquake.csproj|solutionrelative:jiangsuearthquake\\viewmodels\\seismometerstatedataviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
@ -86,7 +86,7 @@
|
|||||||
"DocumentGroups": [
|
"DocumentGroups": [
|
||||||
{
|
{
|
||||||
"DockedWidth": 138,
|
"DockedWidth": 138,
|
||||||
"SelectedChildIndex": 17,
|
"SelectedChildIndex": 2,
|
||||||
"Children": [
|
"Children": [
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
@ -103,7 +103,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 7,
|
"DocumentIndex": 2,
|
||||||
"Title": "SeismometerStateDataView.xaml",
|
"Title": "SeismometerStateDataView.xaml",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SeismometerStateDataView.xaml",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SeismometerStateDataView.xaml",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SeismometerStateDataView.xaml",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SeismometerStateDataView.xaml",
|
||||||
@ -115,15 +115,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 8,
|
"DocumentIndex": 0,
|
||||||
"Title": "SeismographModel.cs",
|
"Title": "SeismographModel.cs",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\SeismographModel.cs",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\SeismographModel.cs",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\SeismographModel.cs",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\Models\\SeismographModel.cs",
|
||||||
"ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\SeismographModel.cs",
|
"ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Models\\SeismographModel.cs",
|
||||||
"RelativeToolTip": "JiangsuEarthquake\\Models\\SeismographModel.cs",
|
"RelativeToolTip": "JiangsuEarthquake\\Models\\SeismographModel.cs",
|
||||||
"ViewState": "AQIAAHIAAAAAAAAAAAAswIwAAAApAAAA",
|
"ViewState": "AQIAAIgAAAAAAAAAAAAuwJwAAAAAAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2024-05-14T07:44:15.338Z"
|
"WhenOpened": "2024-05-14T07:44:15.338Z",
|
||||||
|
"EditorCaption": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
@ -151,7 +152,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 2,
|
"DocumentIndex": 4,
|
||||||
"Title": "BoosterStationStateDataViewModel.cs",
|
"Title": "BoosterStationStateDataViewModel.cs",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\BoosterStationStateDataViewModel.cs",
|
||||||
@ -164,7 +165,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 1,
|
"DocumentIndex": 3,
|
||||||
"Title": "BoosterStationStateDataView.xaml",
|
"Title": "BoosterStationStateDataView.xaml",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\BoosterStationStateDataView.xaml",
|
||||||
@ -176,7 +177,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 3,
|
"DocumentIndex": 5,
|
||||||
"Title": "CSVDownload.cs",
|
"Title": "CSVDownload.cs",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\CSVDownload.cs",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Common\\CSVDownload.cs",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\Common\\CSVDownload.cs",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\Common\\CSVDownload.cs",
|
||||||
@ -248,7 +249,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 6,
|
"DocumentIndex": 8,
|
||||||
"Title": "SystemStateDataViewModel.cs",
|
"Title": "SystemStateDataViewModel.cs",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\SystemStateDataViewModel.cs",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\SystemStateDataViewModel.cs",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\SystemStateDataViewModel.cs",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\SystemStateDataViewModel.cs",
|
||||||
@ -273,7 +274,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 5,
|
"DocumentIndex": 7,
|
||||||
"Title": "SystemControlView.xaml",
|
"Title": "SystemControlView.xaml",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemControlView.xaml",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemControlView.xaml",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemControlView.xaml",
|
||||||
@ -285,7 +286,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 4,
|
"DocumentIndex": 6,
|
||||||
"Title": "SystemStateDataView.xaml",
|
"Title": "SystemStateDataView.xaml",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemStateDataView.xaml",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\Views\\SystemStateDataView.xaml",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemStateDataView.xaml",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\Views\\SystemStateDataView.xaml",
|
||||||
@ -297,13 +298,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 0,
|
"DocumentIndex": 1,
|
||||||
"Title": "MainViewModel.cs",
|
"Title": "MainViewModel.cs",
|
||||||
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
"DocumentMoniker": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
||||||
"RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
"RelativeDocumentMoniker": "JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
||||||
"ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
"ToolTip": "F:\\Code\\JSEQ\\20240301_JSEQ_upperpc\\JiangsuEarthquake\\JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
||||||
"RelativeToolTip": "JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
"RelativeToolTip": "JiangsuEarthquake\\ViewModels\\MainViewModel.cs",
|
||||||
"ViewState": "AQIAAOsHAAAAAAAAAAAUwAgIAAAdAAAA",
|
"ViewState": "AQIAAMgFAAAAAAAAAAAAANwFAAANAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2024-03-12T06:03:03.53Z",
|
"WhenOpened": "2024-03-12T06:03:03.53Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
|
|||||||
@ -142,6 +142,61 @@ namespace JiangsuEarthquake.Models
|
|||||||
{
|
{
|
||||||
//没有空闲连接
|
//没有空闲连接
|
||||||
//重新尝试连接
|
//重新尝试连接
|
||||||
|
//先断开连接
|
||||||
|
if(id==1)
|
||||||
|
{
|
||||||
|
if(isMain)
|
||||||
|
{
|
||||||
|
if (MainWindow.mainViewModel.clientModelMainSeis1.IsConnected)
|
||||||
|
{
|
||||||
|
Task.Run(new Action(async () =>
|
||||||
|
{
|
||||||
|
await Task.Delay(100);
|
||||||
|
MainWindow.mainViewModel.clientModelMainSeis1.DisConnect();
|
||||||
|
|
||||||
|
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (MainWindow.mainViewModel.clientModelBackupSeis1.IsConnected)
|
||||||
|
{
|
||||||
|
Task.Run(new Action(async () =>
|
||||||
|
{
|
||||||
|
await Task.Delay(100);
|
||||||
|
MainWindow.mainViewModel.clientModelBackupSeis1.DisConnect();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (isMain)
|
||||||
|
{
|
||||||
|
if (MainWindow.mainViewModel.clientModelMainSeis2.IsConnected)
|
||||||
|
{
|
||||||
|
Task.Run(new Action(async () =>
|
||||||
|
{
|
||||||
|
await Task.Delay(100);
|
||||||
|
MainWindow.mainViewModel.clientModelMainSeis2.DisConnect();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (MainWindow.mainViewModel.clientModelBackupSeis1.IsConnected)
|
||||||
|
{
|
||||||
|
Task.Run(new Action(async () =>
|
||||||
|
{
|
||||||
|
await Task.Delay(100);
|
||||||
|
MainWindow.mainViewModel.clientModelBackupSeis1.DisConnect();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//10s后重新连接
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (response == 200)
|
else if (response == 200)
|
||||||
|
|||||||
@ -179,6 +179,14 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
public DispatcherTimer timerEarthQuakeParaSet = new DispatcherTimer();
|
public DispatcherTimer timerEarthQuakeParaSet = new DispatcherTimer();
|
||||||
|
|
||||||
public DispatcherTimer timerEarthQuakeParaRead = new DispatcherTimer();
|
public DispatcherTimer timerEarthQuakeParaRead = new DispatcherTimer();
|
||||||
|
|
||||||
|
public DispatcherTimer timerMainSeis1ConnectMsgHidden = new DispatcherTimer();
|
||||||
|
|
||||||
|
public DispatcherTimer timerBackupSeis1ConnectMsgHidden = new DispatcherTimer();
|
||||||
|
|
||||||
|
public DispatcherTimer timerMainSeis2ConnectMsgHidden = new DispatcherTimer();
|
||||||
|
|
||||||
|
public DispatcherTimer timerBackupSeis2ConnectMsgHidden = new DispatcherTimer();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@ -383,6 +391,18 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
|
|
||||||
timerEarthQuakeParaRead.Interval = TimeSpan.FromSeconds(20);
|
timerEarthQuakeParaRead.Interval = TimeSpan.FromSeconds(20);
|
||||||
timerEarthQuakeParaRead.Tick += TimerEarthQuakeParaRead_Tick;
|
timerEarthQuakeParaRead.Tick += TimerEarthQuakeParaRead_Tick;
|
||||||
|
|
||||||
|
timerMainSeis1ConnectMsgHidden.Interval = TimeSpan.FromSeconds(2);
|
||||||
|
timerMainSeis1ConnectMsgHidden.Tick += TimerMainSeis1ConnectMsgHidden_Tick;
|
||||||
|
|
||||||
|
timerBackupSeis1ConnectMsgHidden.Interval = TimeSpan.FromSeconds(2);
|
||||||
|
timerBackupSeis1ConnectMsgHidden.Tick += TimerBackupSeis1ConnectMsgHidden_Tick;
|
||||||
|
|
||||||
|
timerMainSeis2ConnectMsgHidden.Interval = TimeSpan.FromSeconds(2);
|
||||||
|
timerMainSeis2ConnectMsgHidden.Tick += TimerMainSeis2ConnectMsgHidden_Tick;
|
||||||
|
|
||||||
|
timerBackupSeis2ConnectMsgHidden.Interval = TimeSpan.FromSeconds(2);
|
||||||
|
timerBackupSeis2ConnectMsgHidden.Tick += TimerBackupSeis2ConnectMsgHidden_Tick;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@ -1421,6 +1441,41 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
|
|
||||||
|
|
||||||
#region Seismograph
|
#region Seismograph
|
||||||
|
|
||||||
|
#region MainSeis1ConnectMsg
|
||||||
|
private void TimerMainSeis1ConnectMsgHidden_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MainSeis1ConnectMsgVisibility = Visibility.Hidden;
|
||||||
|
|
||||||
|
// 停止定时器
|
||||||
|
(sender as DispatcherTimer).Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private string mainSeis1ConnectMsg;
|
||||||
|
|
||||||
|
public string MainSeis1ConnectMsg
|
||||||
|
{
|
||||||
|
get { return mainSeis1ConnectMsg; }
|
||||||
|
set { mainSeis1ConnectMsg = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Brush mainSeis1ConnectMsgForeground;
|
||||||
|
|
||||||
|
public Brush MainSeis1ConnectMsgForeground
|
||||||
|
{
|
||||||
|
get { return mainSeis1ConnectMsgForeground; }
|
||||||
|
set { mainSeis1ConnectMsgForeground = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Visibility mainSeis1ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
|
||||||
|
public Visibility MainSeis1ConnectMsgVisibility
|
||||||
|
{
|
||||||
|
get { return mainSeis1ConnectMsgVisibility; }
|
||||||
|
set { mainSeis1ConnectMsgVisibility = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DoSocketMainSeis1Connect连接
|
/// DoSocketMainSeis1Connect连接
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -1433,6 +1488,10 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
{
|
{
|
||||||
await Task.Delay(100);
|
await Task.Delay(100);
|
||||||
clientModelMainSeis1.DisConnect();
|
clientModelMainSeis1.DisConnect();
|
||||||
|
|
||||||
|
MainSeis1ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
MainSeis1ConnectMsg = "连接断开!";
|
||||||
|
MainSeis1ConnectMsgForeground = new SolidColorBrush(Colors.Red);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1443,6 +1502,10 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
|
|
||||||
if (clientModelMainSeis1.DoConnect(SocketInfoMainSeis1))
|
if (clientModelMainSeis1.DoConnect(SocketInfoMainSeis1))
|
||||||
{
|
{
|
||||||
|
MainSeis1ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
MainSeis1ConnectMsg = "初步连接,等待消息帧!";
|
||||||
|
MainSeis1ConnectMsgForeground = new SolidColorBrush(Colors.Green);
|
||||||
|
|
||||||
//EM.Socket1ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo1.IP, SocketInfo1.Port.ToString());
|
//EM.Socket1ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo1.IP, SocketInfo1.Port.ToString());
|
||||||
//更新下App.config中的配置信息
|
//更新下App.config中的配置信息
|
||||||
Tools.UpdateAppSettings("MainSeis_Client_IP1", SocketInfoMainSeis1.IP);
|
Tools.UpdateAppSettings("MainSeis_Client_IP1", SocketInfoMainSeis1.IP);
|
||||||
@ -1452,6 +1515,39 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region MainSeis2ConnectMsg
|
||||||
|
private void TimerMainSeis2ConnectMsgHidden_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MainSeis2ConnectMsgVisibility = Visibility.Hidden;
|
||||||
|
|
||||||
|
// 停止定时器
|
||||||
|
(sender as DispatcherTimer).Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private string mainSeis2ConnectMsg;
|
||||||
|
|
||||||
|
public string MainSeis2ConnectMsg
|
||||||
|
{
|
||||||
|
get { return mainSeis2ConnectMsg; }
|
||||||
|
set { mainSeis2ConnectMsg = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Brush mainSeis2ConnectMsgForeground;
|
||||||
|
|
||||||
|
public Brush MainSeis2ConnectMsgForeground
|
||||||
|
{
|
||||||
|
get { return mainSeis2ConnectMsgForeground; }
|
||||||
|
set { mainSeis2ConnectMsgForeground = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Visibility mainSeis2ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
|
||||||
|
public Visibility MainSeis2ConnectMsgVisibility
|
||||||
|
{
|
||||||
|
get { return mainSeis2ConnectMsgVisibility; }
|
||||||
|
set { mainSeis2ConnectMsgVisibility = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DoSocketMainSeis2Connect连接
|
/// DoSocketMainSeis2Connect连接
|
||||||
@ -1465,6 +1561,10 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
{
|
{
|
||||||
await Task.Delay(100);
|
await Task.Delay(100);
|
||||||
clientModelMainSeis2.DisConnect();
|
clientModelMainSeis2.DisConnect();
|
||||||
|
|
||||||
|
MainSeis2ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
MainSeis2ConnectMsg = "连接断开!";
|
||||||
|
MainSeis2ConnectMsgForeground = new SolidColorBrush(Colors.Red);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1475,6 +1575,10 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
|
|
||||||
if (clientModelMainSeis2.DoConnect(SocketInfoMainSeis2))
|
if (clientModelMainSeis2.DoConnect(SocketInfoMainSeis2))
|
||||||
{
|
{
|
||||||
|
MainSeis2ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
MainSeis2ConnectMsg = "初步连接,等待消息帧!";
|
||||||
|
MainSeis2ConnectMsgForeground = new SolidColorBrush(Colors.Green);
|
||||||
|
|
||||||
//EM.Socket1ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo1.IP, SocketInfo1.Port.ToString());
|
//EM.Socket1ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo1.IP, SocketInfo1.Port.ToString());
|
||||||
//更新下App.config中的配置信息
|
//更新下App.config中的配置信息
|
||||||
Tools.UpdateAppSettings("MainSeis_Client_IP2", SocketInfoMainSeis2.IP);
|
Tools.UpdateAppSettings("MainSeis_Client_IP2", SocketInfoMainSeis2.IP);
|
||||||
@ -1484,6 +1588,39 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region BackupSeis1ConnectMsg
|
||||||
|
private void TimerBackupSeis1ConnectMsgHidden_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
BackupSeis1ConnectMsgVisibility = Visibility.Hidden;
|
||||||
|
|
||||||
|
// 停止定时器
|
||||||
|
(sender as DispatcherTimer).Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private string backupSeis1ConnectMsg;
|
||||||
|
|
||||||
|
public string BackupSeis1ConnectMsg
|
||||||
|
{
|
||||||
|
get { return backupSeis1ConnectMsg; }
|
||||||
|
set { backupSeis1ConnectMsg = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Brush backupSeis1ConnectMsgForeground;
|
||||||
|
|
||||||
|
public Brush BackupSeis1ConnectMsgForeground
|
||||||
|
{
|
||||||
|
get { return backupSeis1ConnectMsgForeground; }
|
||||||
|
set { backupSeis1ConnectMsgForeground = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Visibility backupSeis1ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
|
||||||
|
public Visibility BackupSeis1ConnectMsgVisibility
|
||||||
|
{
|
||||||
|
get { return backupSeis1ConnectMsgVisibility; }
|
||||||
|
set { backupSeis1ConnectMsgVisibility = value; this.DoNotify(); }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DoSocketBackupSeis1Connect连接
|
/// DoSocketBackupSeis1Connect连接
|
||||||
@ -1497,6 +1634,10 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
{
|
{
|
||||||
await Task.Delay(100);
|
await Task.Delay(100);
|
||||||
clientModelBackupSeis1.DisConnect();
|
clientModelBackupSeis1.DisConnect();
|
||||||
|
|
||||||
|
BackupSeis1ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
BackupSeis1ConnectMsg = "连接断开!";
|
||||||
|
BackupSeis1ConnectMsgForeground = new SolidColorBrush(Colors.Red);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1507,6 +1648,10 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
|
|
||||||
if (clientModelBackupSeis1.DoConnect(SocketInfoBackupSeis1))
|
if (clientModelBackupSeis1.DoConnect(SocketInfoBackupSeis1))
|
||||||
{
|
{
|
||||||
|
BackupSeis1ConnectMsgVisibility = Visibility.Visible;
|
||||||
|
BackupSeis1ConnectMsg = "初步连接,等待消息帧!";
|
||||||
|
BackupSeis1ConnectMsgForeground = new SolidColorBrush(Colors.Green);
|
||||||
|
|
||||||
// EM.Socket2ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo2.IP, SocketInfo2.Port.ToString());
|
// EM.Socket2ConMessage = string.Format("IP:{0} \r\n端口号:{1}", SocketInfo2.IP, SocketInfo2.Port.ToString());
|
||||||
//更新下App.config中的配置信息
|
//更新下App.config中的配置信息
|
||||||
Tools.UpdateAppSettings("BackupSeis_Client_IP1", SocketInfoBackupSeis1.IP);
|
Tools.UpdateAppSettings("BackupSeis_Client_IP1", SocketInfoBackupSeis1.IP);
|
||||||
|
|||||||
@ -272,7 +272,7 @@ namespace JiangsuEarthquake.ViewModels
|
|||||||
|
|
||||||
private void TimerAskDataMsgHidden_Tick(object sender, EventArgs e)
|
private void TimerAskDataMsgHidden_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//DownloadDataMsgVisibility = Visibility.Hidden;
|
AskDataMsgVisibility = Visibility.Hidden;
|
||||||
|
|
||||||
// 停止定时器
|
// 停止定时器
|
||||||
(sender as DispatcherTimer).Stop();
|
(sender as DispatcherTimer).Stop();
|
||||||
|
|||||||
@ -549,6 +549,12 @@
|
|||||||
</TextBox.Text>
|
</TextBox.Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="4" Name="MainSeis1ConnectMsg" Text="{Binding MainSeis1ConnectMsg}"
|
||||||
|
Foreground="{Binding MainSeis1ConnectMsgForeground}" Margin="255,0,0,8"
|
||||||
|
VerticalAlignment="Bottom" FontSize="12"
|
||||||
|
Visibility="{Binding MainSeis1ConnectMsgVisibility}"/>
|
||||||
|
|
||||||
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
||||||
@ -624,6 +630,12 @@
|
|||||||
</TextBox.Text>
|
</TextBox.Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="4" Name="BackupSeis1ConnectMsg" Text="{Binding MainSeis1ConnectMsg}"
|
||||||
|
Foreground="{Binding MainSeis1ConnectMsgForeground}" Margin="255,0,0,8"
|
||||||
|
VerticalAlignment="Bottom" FontSize="12"
|
||||||
|
Visibility="{Binding MainSeis1ConnectMsgVisibility}"/>
|
||||||
|
|
||||||
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
||||||
@ -699,6 +711,12 @@
|
|||||||
</TextBox.Text>
|
</TextBox.Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="4" Name="MainSeis2ConnectMsg" Text="{Binding MainSeis1ConnectMsg}"
|
||||||
|
Foreground="{Binding MainSeis1ConnectMsgForeground}" Margin="255,0,0,8"
|
||||||
|
VerticalAlignment="Bottom" FontSize="12"
|
||||||
|
Visibility="{Binding MainSeis1ConnectMsgVisibility}"/>
|
||||||
|
|
||||||
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
||||||
@ -774,6 +792,12 @@
|
|||||||
</TextBox.Text>
|
</TextBox.Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="4" Name="BackupSeis2ConnectMsg" Text="{Binding MainSeis1ConnectMsg}"
|
||||||
|
Foreground="{Binding MainSeis1ConnectMsgForeground}" Margin="255,0,0,8"
|
||||||
|
VerticalAlignment="Bottom" FontSize="12"
|
||||||
|
Visibility="{Binding MainSeis1ConnectMsgVisibility}"/>
|
||||||
|
|
||||||
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
<Button Width="100" Height="30" Margin="10,0" HorizontalAlignment="Left"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Updated by XamlIntelliSenseFileGenerator 2024/5/14 16:02:28
|
// Updated by XamlIntelliSenseFileGenerator 2024/5/15 14:11:12
|
||||||
#pragma checksum "..\..\..\..\Views\SystemControlView.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6D2C6BC2FB0DB58F8CDEC5E57F4AC1D7AA8B95FB"
|
#pragma checksum "..\..\..\..\Views\SystemControlView.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6D2C6BC2FB0DB58F8CDEC5E57F4AC1D7AA8B95FB"
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
@ -605,6 +605,10 @@ namespace JiangsuEarthquake.Views
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal System.Windows.Controls.UserControl SystemControlPage;
|
internal System.Windows.Controls.UserControl SystemControlPage;
|
||||||
|
internal System.Windows.Controls.TextBlock MainSeis1ConnectMsg;
|
||||||
|
internal System.Windows.Controls.TextBlock BackupSeis1ConnectMsg;
|
||||||
|
internal System.Windows.Controls.TextBlock MainSeis2ConnectMsg;
|
||||||
|
internal System.Windows.Controls.TextBlock BackupSeis2ConnectMsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user