修改调试问题

master
mzhifa 1 year ago
parent d63cb761a9
commit b9cccc595e

File diff suppressed because it is too large Load Diff

@ -0,0 +1,266 @@
2022-10-23T00:04:29.179769 4030571.23810 38397553.45455 305.4545 ML -2.54 0.005 10 9 B
2022-10-23T00:07:07.345485 4030672.57143 38397820.36364 439.8182 ML -2.17 0.008 14 11 B
2022-10-23T00:09:42.210412 4030469.14286 38397825.45455 458.0000 ML -2.57 0.009 9 8 B
2022-10-23T00:12:51.983059 4029900.00000 38398636.36364 454.5455 ML -2.77 0.009 8 8 B
2022-10-23T00:12:58.209663 4030771.61905 38397468.36364 409.4545 ML -2.76 0.003 7 6 B
2022-10-23T00:16:04.394052 4030352.57143 38397344.72727 410.3636 ML -2.76 0.007 10 8 B
2022-10-23T00:19:04.310188 4030124.76190 38398021.81818 452.7273 ML -2.87 0.020 8 8 B
2022-10-23T00:21:05.688372 4030337.33333 38398687.27273 503.4545 ML -2.81 0.015 7 7 B
2022-10-23T00:31:42.255402 4030761.71429 38397453.81818 414.9091 ML -2.14 0.007 14 14 B
2022-10-23T00:33:46.069957 4030555.23810 38397203.63636 578.1818 ML -2.85 0.008 8 7 B
2022-10-23T00:43:50.915539 4030684.00000 38397936.00000 764.5455 ML -2.89 0.006 8 7 B
2022-10-23T00:44:27.258053 4030764.76190 38399000.00000 390.0000 ML -2.52 0.004 7 6 B
2022-10-23T00:49:46.415415 4030911.04762 38397755.63636 300.0000 ML -2.76 0.004 6 6 B
2022-10-23T00:50:48.355027 4030357.14286 38399000.00000 500.0000 ML -2.82 0.008 6 6 B
2022-10-23T00:55:44.400739 4030426.47619 38397878.54545 390.5455 ML -2.92 0.013 8 8 B
2022-10-23T01:05:33.435116 4030818.09524 38397966.54545 435.6364 ML -2.92 0.014 10 9 B
2022-10-23T01:06:29.26791 4030809.71429 38397610.18182 335.4545 ML -2.48 0.012 9 7 B
2022-10-23T01:08:15.813839 4030635.23810 38397916.36364 600.9091 ML -2.72 0.008 13 13 B
2022-10-23T01:15:27.325141 4030562.85714 38397349.09091 459.8182 ML -2.81 0.011 7 6 B
2022-10-23T01:16:41.255268 4030684.76190 38397475.63636 423.4545 ML -2.87 0.008 9 6 B
2022-10-23T01:17:30.052143 4030540.00000 38397887.27273 460.9091 ML -1.46 0.007 14 12 B
2022-10-23T01:20:04.918117 4030494.28571 38397629.09091 460.1818 ML -2.62 0.009 11 11 B
2022-10-23T01:30:18.587449 4030738.09524 38397909.09091 454.5455 ML -2.76 0.004 6 6 B
2022-10-23T01:32:48.309651 4030680.19048 38397419.63636 357.6364 ML -2.74 0.011 9 8 B
2022-10-23T01:33:49.662056 4030696.19048 38397617.45455 436.0000 ML -2.01 0.007 14 13 B
2022-10-23T01:36:55.058173 4030475.23810 38397370.90909 460.1818 ML -2.78 0.010 8 8 B
2022-10-23T01:37:21.273703 4030785.33333 38397757.81818 390.5455 ML -2.62 0.015 11 10 B
2022-10-23T01:51:53.066967 4030550.66667 38397815.27273 523.6364 ML -2.48 0.009 13 11 B
2022-10-23T01:56:29.265892 4030746.47619 38397992.00000 559.4545 ML -2.00 0.008 13 11 B
2022-10-23T01:57:24.515091 4030693.14286 38397426.18182 342.3636 ML -2.58 0.015 10 7 B
2022-10-23T02:05:16.28564 4029981.52381 38398136.00000 455.6364 ML -3.19 0.020 7 7 B
2022-10-23T02:07:45.465797 4030666.47619 38398019.63636 800.0000 ML -2.77 0.018 8 7 B
2022-10-23T02:18:59.123291 4030498.09524 38397738.18182 604.5455 ML -2.68 0.007 9 7 B
2022-10-23T02:26:19.770317 4030322.09524 38397584.72727 413.2727 ML -2.31 0.010 13 13 B
2022-10-23T02:28:12.664125 4030734.28571 38397697.45455 369.8182 ML -2.04 0.010 13 13 B
2022-10-23T02:28:56.11533 4031049.71429 38397995.63636 800.0000 ML -2.78 0.008 13 13 B
2022-10-23T02:43:22.658577 4030546.09524 38397669.09091 461.0909 ML -2.58 0.013 11 11 B
2022-10-23T02:47:15.855305 4030585.71429 38397883.63636 393.6364 ML -2.67 0.019 7 7 B
2022-10-23T02:48:48.849406 4030452.38095 38397636.36364 459.0909 ML -3.01 0.009 6 6 B
2022-10-23T02:49:27.109853 4030613.14286 38397852.36364 394.3636 ML -2.47 0.008 13 12 B
2022-10-23T03:00:39.682599 4030653.52381 38397535.27273 438.9091 ML -2.79 0.010 9 9 B
2022-10-23T03:03:48.4878 4030162.09524 38398614.54545 800.0000 ML -2.92 0.011 8 7 B
2022-10-23T03:09:52.134236 4029743.80952 38397942.54545 461.6364 ML -2.60 0.005 9 9 B
2022-10-23T03:16:27.553726 4030069.14286 38397800.00000 378.7273 ML -3.10 0.010 7 5 B
2022-10-23T03:19:30.522751 4030705.33333 38397553.45455 436.9091 ML -2.64 0.009 12 11 B
2022-10-23T03:25:44.672308 4030717.52381 38398019.63636 608.1818 ML -2.20 0.010 13 13 B
2022-10-23T03:32:15.807384 4030577.33333 38397585.45455 396.5455 ML -2.84 0.007 11 9 B
2022-10-23T03:43:49.771931 4030570.47619 38397447.27273 460.9091 ML -2.84 0.007 8 8 B
2022-10-23T03:48:50.742355 4031068.00000 38397378.18182 342.0000 ML -2.69 0.014 11 10 B
2022-10-23T03:50:52.618853 4030556.00000 38397362.90909 381.6364 ML -2.55 0.006 13 12 B
2022-10-23T03:53:56.346082 4030543.04762 38397711.27273 718.9091 ML -2.30 0.014 14 13 B
2022-10-23T03:54:40.360482 4030556.00000 38397741.09091 461.0909 ML -2.68 0.009 11 10 B
2022-10-23T03:56:14.979644 4031244.00000 38397945.45455 404.0000 ML -3.24 0.007 6 4 B
2022-10-23T04:01:07.35746 4030544.57143 38397730.18182 478.1818 ML -2.84 0.013 9 6 B
2022-10-23T04:02:42.483943 4030619.23810 38397741.09091 630.9091 ML -1.88 0.009 14 14 B
2022-10-23T04:03:35.089562 4030600.95238 38397757.81818 460.1818 ML -2.71 0.009 10 8 B
2022-10-23T04:08:41.59232 4030472.19048 38397555.63636 458.0000 ML -2.70 0.009 10 10 B
2022-10-23T04:10:57.017838 4030550.66667 38397349.09091 417.4545 ML -2.56 0.010 13 12 B
2022-10-23T04:11:37.886126 4030552.19048 38397646.54545 622.1818 ML -2.39 0.013 13 12 B
2022-10-23T04:14:17.638442 4030410.47619 38397505.45455 458.0000 ML -2.76 0.008 8 7 B
2022-10-23T04:15:51.874999 4030620.00000 38397767.27273 460.1818 ML -2.44 0.007 9 8 B
2022-10-23T04:17:40.323473 4030767.80952 38397741.09091 527.6364 ML -2.98 0.007 7 5 B
2022-10-23T04:20:50.228614 4030929.33333 38397487.27273 361.6364 ML -2.83 0.013 8 7 B
2022-10-23T04:21:13.668341 4031146.47619 38397341.09091 409.4545 ML -3.23 0.020 7 5 B
2022-10-23T04:23:20.56242 4030262.66667 38398522.90909 728.1818 ML -3.05 0.010 9 9 B
2022-10-23T04:23:27.805407 4030063.04762 38397285.09091 464.1818 ML -2.54 0.019 6 6 B
2022-10-23T04:24:11.439986 4030629.90476 38397720.72727 511.0909 ML -2.38 0.010 11 11 B
2022-10-23T04:29:47.512024 4030629.14286 38397731.63636 392.0000 ML -2.61 0.011 11 9 B
2022-10-23T04:30:37.592297 4031038.28571 38397862.54545 366.1818 ML -2.70 0.022 10 10 B
2022-10-23T04:33:56.150351 4030585.71429 38397705.45455 460.1818 ML -2.64 0.006 11 11 B
2022-10-23T04:35:55.857433 4031116.00000 38398832.72727 415.8182 ML -2.96 0.007 6 6 B
2022-10-23T04:38:25.532975 4030695.42857 38397629.09091 512.5455 ML -2.68 0.009 10 10 B
2022-10-23T04:39:07.800318 4030568.19048 38397610.90909 317.2727 ML -2.60 0.013 11 10 B
2022-10-23T04:40:33.805134 4030239.04762 38397589.81818 429.2727 ML -2.44 0.021 11 10 B
2022-10-23T04:46:09.823877 4030586.47619 38397613.81818 766.3636 ML -2.82 0.004 8 7 B
2022-10-23T04:49:14.08415 4030620.00000 38397696.72727 460.1818 ML -2.87 0.007 8 6 B
2022-10-23T05:16:35.634241 4030569.71429 38397475.63636 300.9091 ML -2.34 0.010 13 12 B
2022-10-23T05:21:42.764813 4030780.00000 38397781.81818 367.0909 ML -2.81 0.008 6 4 B
2022-10-23T05:31:11.558513 4030429.52381 38397664.00000 458.0000 ML -2.63 0.006 9 8 B
2022-10-23T05:33:29.778566 4030333.52381 38397469.81818 721.8182 ML -2.77 0.011 7 6 B
2022-10-23T05:40:07.060999 4030577.33333 38397491.63636 744.7273 ML -2.78 0.006 7 7 B
2022-10-23T05:42:38.125354 4030540.00000 38397772.36364 390.5455 ML -2.78 0.009 9 7 B
2022-10-23T05:44:25.118577 4030749.52381 38397701.81818 317.2727 ML -2.81 0.006 8 7 B
2022-10-23T05:45:58.66533 4030447.80952 38397600.00000 392.0000 ML -2.51 0.015 11 11 B
2022-10-23T05:51:05.533655 4030562.85714 38397741.81818 459.8182 ML -1.43 0.008 14 13 B
2022-10-23T06:01:48.038064 4030532.38095 38397736.00000 459.8182 ML -2.71 0.005 8 6 B
2022-10-23T06:02:53.591767 4030507.23810 38397764.36364 788.5455 ML -2.66 0.007 11 10 B
2022-10-23T06:04:31.478117 4030555.23810 38397872.72727 457.2727 ML -1.93 0.011 13 12 B
2022-10-23T06:09:32.124652 4030364.00000 38397668.36364 800.0000 ML -2.93 0.010 6 6 B
2022-10-23T06:14:29.549607 4030245.90476 38398427.63636 382.5455 ML -3.02 0.003 6 5 B
2022-10-23T06:15:41.253401 4030562.09524 38397755.63636 593.6364 ML -2.79 0.013 11 11 B
2022-10-23T06:16:51.636803 4030524.00000 38397922.90909 657.4545 ML -3.16 0.007 6 4 B
2022-10-23T06:20:26.910738 4030467.61905 38397712.72727 458.3636 ML -2.57 0.008 12 10 B
2022-10-23T06:29:20.618256 4030543.04762 38397872.72727 460.1818 ML -2.79 0.015 9 7 B
2022-10-23T06:38:06.508912 4030528.57143 38397792.00000 461.0909 ML -2.58 0.011 10 6 B
2022-10-23T06:38:39.419748 4030377.71429 38397437.81818 772.7273 ML -2.71 0.008 6 6 B
2022-10-23T06:43:05.935696 4030631.42857 38398010.90909 461.8182 ML -2.76 0.005 12 11 B
2022-10-23T06:47:05.315742 4030665.71429 38397893.09091 458.7273 ML -2.76 0.005 10 10 B
2022-10-23T06:47:52.5684 4030018.09524 38397007.27273 429.0909 ML -2.84 0.008 7 5 B
2022-10-23T06:54:42.704875 4030498.85714 38397880.72727 800.0000 ML -2.75 0.008 7 7 B
2022-10-23T06:55:51.064485 4029953.33333 38398720.00000 460.9091 ML -2.61 0.012 11 10 B
2022-10-23T06:56:07.848167 4030520.95238 38397760.00000 521.8182 ML -2.51 0.007 12 11 B
2022-10-23T07:00:21.914105 4030558.28571 38397737.45455 681.6364 ML -2.59 0.013 13 12 B
2022-10-23T07:01:23.583058 4030570.47619 38397734.54545 457.2727 ML -1.89 0.010 14 13 B
2022-10-23T07:01:24.568545 4030528.57143 38398200.00000 754.5455 ML -2.07 0.029 7 2 B
2022-10-23T07:02:18.107298 4030422.66667 38397917.09091 300.0000 ML -2.65 0.015 11 9 B
2022-10-23T07:04:43.856579 4030540.00000 38397787.63636 392.0000 ML -3.01 0.010 8 5 B
2022-10-23T07:04:44.623425 4031324.00000 38397962.90909 368.0000 None -1000 0.051 6 0 B
2022-10-23T07:12:31.377872 4030661.90476 38397981.81818 540.9091 ML -1.88 0.006 14 14 B
2022-10-23T07:13:51.454792 4030494.28571 38397951.27273 458.9091 ML -2.48 0.010 13 12 B
2022-10-23T07:19:07.267719 4030600.19048 38397872.00000 414.1818 ML -2.53 0.003 6 3 B
2022-10-23T07:20:29.376024 4030518.66667 38397851.63636 459.4545 ML -2.63 0.009 10 9 B
2022-10-23T07:20:36.409819 4030847.80952 38397937.45455 472.9091 ML -2.56 0.014 10 8 B
2022-10-23T07:21:51.209666 4030619.23810 38397867.63636 560.0000 ML -1.87 0.007 14 13 B
2022-10-23T07:23:09.195035 4030376.95238 38397819.63636 340.0000 ML -2.60 0.010 11 7 B
2022-10-23T07:31:14.24681 4030627.61905 38397912.00000 459.8182 ML -2.12 0.014 14 13 B
2022-10-23T07:40:21.084836 4030512.57143 38397922.18182 503.4545 ML -2.38 0.009 13 11 B
2022-10-23T07:48:42.859163 4030425.71429 38397576.72727 800.0000 ML -2.56 0.028 9 9 B
2022-10-23T07:50:50.847828 4030711.42857 38397829.09091 372.7273 ML -2.70 0.010 8 7 B
2022-10-23T07:53:37.898135 4030645.14286 38397781.81818 427.8182 ML -2.72 0.007 6 6 B
2022-10-23T07:56:12.389489 4030520.95238 38397920.00000 604.5455 ML -2.33 0.008 14 13 B
2022-10-23T07:56:34.612438 4030735.04762 38397633.45455 800.0000 ML -2.80 0.009 7 6 B
2022-10-23T08:06:33.993701 4029689.71429 38397986.18182 776.3636 ML -2.62 0.008 7 7 B
2022-10-23T08:21:16.691203 4030635.23810 38397901.81818 800.0000 ML -2.79 0.004 7 7 B
2022-10-23T08:30:40.414669 4029971.61905 38398447.27273 628.0000 ML -2.32 0.010 14 13 B
2022-10-23T08:34:36.198949 4030599.42857 38397934.54545 463.4545 ML -2.33 0.007 13 13 B
2022-10-23T08:37:27.629426 4030124.76190 38398581.81818 388.1818 ML -2.58 0.008 6 5 B
2022-10-23T09:16:14.250138 4030540.00000 38398021.81818 460.9091 ML -2.72 0.004 9 9 B
2022-10-23T09:24:57.340625 4030544.57143 38397736.00000 390.1818 ML -2.61 0.010 13 11 B
2022-10-23T09:32:37.098941 4030642.85714 38397636.36364 390.9091 ML -2.89 0.014 7 6 B
2022-10-23T09:40:06.005964 4030684.76190 38397922.18182 460.1818 ML -2.94 0.006 8 8 B
2022-10-23T10:01:07.590738 4030764.76190 38397912.72727 369.0909 ML -2.59 0.010 12 11 B
2022-10-23T10:02:12.207072 4030562.09524 38397917.09091 760.0000 ML -1.59 0.007 14 13 B
2022-10-23T10:02:36.322558 4030395.23810 38397018.18182 370.0000 ML -2.81 0.008 10 9 B
2022-10-23T10:26:07.88408 4030773.14286 38397966.54545 800.0000 ML -2.93 0.006 10 8 B
2022-10-23T10:36:57.698403 4030213.14286 38397736.72727 462.5455 ML -2.67 0.009 8 6 B
2022-10-23T10:38:49.182315 4030551.42857 38397938.18182 461.8182 ML -2.54 0.008 9 9 B
2022-10-23T10:48:45.64282 4030589.52381 38398087.27273 453.4545 ML -2.76 0.018 7 7 B
2022-10-23T11:17:58.825491 4030098.09524 38398785.45455 459.2727 ML -1.49 0.013 13 11 B
2022-10-23T11:58:29.910385 4030764.76190 38397818.18182 464.7273 ML -2.80 0.009 6 6 B
2022-10-23T12:30:46.199805 4030348.00000 38397627.63636 459.8182 ML -3.02 0.009 9 5 B
2022-10-23T12:31:28.41917 4030452.38095 38397909.09091 618.1818 ML -2.82 0.006 7 6 B
2022-10-23T12:49:09.799512 4030315.23810 38397463.27273 459.8182 ML -2.79 0.012 8 8 B
2022-10-23T12:49:31.742318 4030700.00000 38397872.72727 460.9091 ML -2.79 0.009 10 9 B
2022-10-23T13:08:34.251522 4030405.14286 38397069.09091 458.0000 ML -2.87 0.002 6 6 B
2022-10-23T13:27:31.920241 4030664.95238 38398009.45455 553.6364 ML -2.80 0.005 11 10 B
2022-10-23T13:36:07.812977 4030600.95238 38397523.63636 436.7273 ML -2.76 0.005 6 4 B
2022-10-23T14:05:26.083903 4030695.42857 38397937.45455 489.4545 ML -2.09 0.009 14 14 B
2022-10-23T14:05:48.261857 4030635.23810 38397973.81818 455.6364 ML -3.14 0.012 7 5 B
2022-10-23T14:10:21.934319 4030037.14286 38397870.54545 461.6364 ML -1.69 0.009 14 13 B
2022-10-23T14:25:42.203677 4030592.57143 38397917.09091 341.8182 ML -1.99 0.007 14 14 B
2022-10-23T14:46:53.935646 4030631.42857 38397902.54545 382.9091 ML -3.02 0.006 8 8 B
2022-10-23T14:57:18.589022 4030521.71429 38397904.72727 800.0000 ML -2.59 0.007 7 7 B
2022-10-23T15:04:17.223645 4030619.23810 38397364.36364 438.3636 ML -2.61 0.009 10 10 B
2022-10-23T15:17:26.943357 4031004.00000 38397808.00000 365.6364 ML -2.83 0.005 8 4 B
2022-10-23T15:40:17.294989 4030376.19048 38397272.72727 300.0000 ML -2.59 0.023 6 5 B
2022-10-23T15:40:54.149331 4030556.00000 38397840.72727 608.1818 ML -1.66 0.009 13 12 B
2022-10-23T15:43:08.313449 4030533.90476 38397822.54545 368.5455 ML -2.16 0.011 12 12 B
2022-10-23T15:44:39.837132 4030656.57143 38397966.54545 437.4545 ML -1.90 0.009 14 14 B
2022-10-23T15:53:53.949799 4030561.33333 38397884.36364 459.4545 ML -2.55 0.013 11 8 B
2022-10-23T16:09:14.712707 4030601.71429 38397930.18182 517.2727 ML -2.92 0.005 9 8 B
2022-10-23T16:12:21.6592 4030789.90476 38397941.09091 368.7273 ML -2.79 0.011 7 7 B
2022-10-23T16:14:22.742977 4031167.80952 38398949.09091 405.0909 ML -2.37 0.010 7 6 B
2022-10-23T16:16:07.001178 4030040.95238 38397538.18182 417.0909 ML -2.63 0.016 10 7 B
2022-10-23T16:23:04.974095 4030549.14286 38397913.45455 800.0000 ML -2.54 0.017 9 9 B
2022-10-23T16:25:21.720188 4030493.52381 38397760.72727 458.0000 ML -2.90 0.005 6 6 B
2022-10-23T16:28:35.496621 4030250.47619 38398792.72727 677.2727 ML -3.25 0.007 6 5 B
2022-10-23T16:29:51.598743 4030555.23810 38397887.27273 435.2727 ML -2.05 0.010 13 12 B
2022-10-23T17:10:40.095315 4030673.33333 38398963.63636 461.8182 ML -2.77 0.011 6 5 B
2022-10-23T17:21:09.139959 4030733.52381 38397828.36364 718.1818 ML -2.79 0.012 8 6 B
2022-10-23T17:39:04.326775 4030457.71429 38397832.00000 703.6364 ML -2.60 0.006 7 7 B
2022-10-23T17:43:26.19536 4030559.04762 38399000.00000 760.0000 ML -2.64 0.009 9 9 B
2022-10-23T17:47:08.313189 4030466.09524 38397816.72727 460.1818 ML -2.47 0.004 7 7 B
2022-10-23T17:48:46.686471 4030782.28571 38397853.09091 376.9091 ML -3.13 0.020 6 4 B
2022-10-23T17:49:43.727089 4030797.52381 38397946.18182 800.0000 ML -2.45 0.009 11 10 B
2022-10-23T17:49:44.586009 4029614.28571 38398069.09091 429.0909 ML -2.51 0.032 6 2 B
2022-10-23T17:50:10.515828 4030683.23810 38397980.36364 770.9091 ML -2.58 0.011 13 11 B
2022-10-23T17:50:50.092274 4030492.76190 38397784.00000 330.3636 ML -2.73 0.005 7 6 B
2022-10-23T17:59:43.368379 4030549.14286 38397901.81818 503.4545 ML -2.75 0.010 9 7 B
2022-10-23T18:00:52.94097 4030488.95238 38397565.09091 432.9091 ML -2.73 0.010 10 10 B
2022-10-23T18:05:27.507225 4030490.47619 38399000.00000 502.7273 ML -2.38 0.024 7 7 B
2022-10-23T18:11:18.778145 4030247.42857 38398622.54545 637.6364 ML -2.69 0.006 8 6 B
2022-10-23T18:11:56.557357 4030512.57143 38397949.09091 458.0000 ML -3.06 0.007 10 7 B
2022-10-23T18:33:12.78389 4030463.80952 38399000.00000 752.7273 ML -2.48 0.012 8 8 B
2022-10-23T18:34:48.828289 4031435.23810 38398062.54545 451.0909 ML -2.71 0.016 7 6 B
2022-10-23T18:39:40.469039 4030380.00000 38399000.00000 502.7273 ML -3.28 0.006 6 5 B
2022-10-23T18:45:24.003089 4030608.57143 38397927.27273 456.3636 ML -2.75 0.008 12 11 B
2022-10-23T18:45:15.371105 4030280.95238 38397054.54545 429.0909 ML -2.70 0.016 8 6 B
2022-10-23T18:50:50.896368 4031013.14286 38397822.54545 355.4545 ML -2.75 0.008 8 6 B
2022-10-23T18:51:56.842429 4030452.38095 38397636.36364 459.0909 ML -2.79 0.006 9 8 B
2022-10-23T18:52:25.40496 4030469.14286 38397787.63636 458.0000 ML -2.29 0.007 13 12 B
2022-10-23T19:00:47.796237 4030380.76190 38397704.00000 300.0000 ML -2.47 0.011 10 8 B
2022-10-23T19:02:53.484119 4030402.09524 38397917.09091 413.2727 ML -2.71 0.010 12 12 B
2022-10-23T19:03:29.369825 4030379.23810 38397572.36364 300.9091 ML -2.65 0.008 7 5 B
2022-10-23T19:04:17.490735 4030647.42857 38397989.81818 794.5455 ML -2.99 0.007 9 8 B
2022-10-23T19:07:55.813354 4030425.71429 38397756.36364 461.8182 ML -2.60 0.009 10 6 B
2022-10-23T19:08:27.452415 4030556.00000 38397832.00000 794.1818 ML -2.38 0.011 13 11 B
2022-10-23T19:09:45.350651 4030881.33333 38397936.72727 435.2727 ML -2.06 0.009 13 13 B
2022-10-23T19:10:27.012103 4030562.09524 38397826.18182 737.2727 ML -2.13 0.008 13 13 B
2022-10-23T19:17:04.310676 4031229.52381 38397312.00000 346.3636 ML -3.13 0.011 7 5 B
2022-10-23T19:20:43.937386 4030515.61905 38397702.54545 458.0000 ML -2.65 0.011 11 10 B
2022-10-23T19:20:57.498414 4030506.47619 38398021.81818 503.4545 ML -2.78 0.022 12 12 B
2022-10-23T19:25:05.097591 4030530.09524 38397855.27273 744.5455 ML -1.81 0.006 14 13 B
2022-10-23T19:36:20.219807 4030551.42857 38397676.36364 388.1818 ML -2.78 0.015 11 11 B
2022-10-23T19:38:47.782076 4030467.61905 38397724.36364 458.3636 ML -2.55 0.008 12 12 B
2022-10-23T19:40:34.480698 4030558.28571 38397731.63636 460.1818 ML -2.35 0.009 13 12 B
2022-10-23T19:41:46.059229 4030847.04762 38397992.72727 460.1818 ML -2.88 0.012 13 10 B
2022-10-23T19:43:24.610136 4030705.33333 38397437.81818 342.0000 ML -2.26 0.010 14 14 B
2022-10-23T19:44:12.76454 4030170.47619 38398676.36364 455.2727 ML -3.44 0.006 6 5 B
2022-10-23T19:47:24.249765 4030805.90476 38397519.27273 342.0000 ML -2.61 0.012 13 13 B
2022-10-23T19:47:14.141507 4030809.71429 38397909.81818 608.1818 ML -3.12 0.010 10 8 B
2022-10-23T19:50:11.596476 4030524.76190 38397916.36364 460.9091 ML -1.99 0.005 14 12 B
2022-10-23T19:53:25.275442 4030546.09524 38397919.27273 581.0909 ML -2.35 0.010 12 12 B
2022-10-23T19:53:25.275442 4030546.09524 38397919.27273 581.0909 ML -2.35 0.010 12 12 B
2022-10-23T19:53:25.275442 4030546.09524 38397919.27273 581.0909 ML -2.35 0.010 12 12 B
2022-10-23T20:16:36.817285 4030112.57143 38397482.90909 417.0909 ML -2.68 0.011 8 6 B
2022-10-23T20:17:58.667016 4029609.71429 38397933.09091 439.8182 ML -2.02 0.011 13 12 B
2022-10-23T20:22:34.751309 4030269.52381 38397884.36364 460.1818 ML -2.47 0.008 13 12 B
2022-10-23T20:23:32.802892 4030494.28571 38397717.09091 458.0000 ML -2.13 0.011 12 11 B
2022-10-23T20:25:17.693083 4030628.38095 38397589.81818 503.4545 ML -2.67 0.004 7 5 B
2022-10-23T20:26:47.534904 4030109.52381 38398720.00000 457.2727 ML -2.24 0.010 13 13 B
2022-10-23T20:26:32.6906 4030638.28571 38397904.72727 558.3636 ML -2.98 0.013 10 8 B
2022-10-23T20:33:35.214114 4030500.38095 38397323.63636 458.0000 ML -2.74 0.015 7 5 B
2022-10-23T20:35:29.988897 4030532.38095 38397542.54545 367.4545 ML -1.97 0.009 14 14 B
2022-10-23T20:40:43.590614 4030475.23810 38399000.00000 502.7273 ML -2.65 0.012 6 6 B
2022-10-23T20:50:49.611807 4030556.00000 38397816.00000 508.7273 ML -2.51 0.003 13 11 B
2022-10-23T20:54:33.890708 4030658.09524 38397530.90909 459.8182 ML -2.58 0.010 13 12 B
2022-10-23T20:56:42.843617 4030596.38095 38397355.63636 366.1818 ML -2.61 0.009 10 9 B
2022-10-23T21:07:28.142229 4030495.04762 38397722.18182 719.0909 ML -2.42 0.010 13 12 B
2022-10-23T21:08:50.895271 4030761.71429 38398119.27273 380.1818 ML -2.96 0.014 7 7 B
2022-10-23T21:09:05.294283 4030550.66667 38397730.18182 503.8182 ML -2.58 0.013 11 10 B
2022-10-23T21:10:58.786311 4030543.80952 38397701.81818 433.6364 ML -2.44 0.008 11 11 B
2022-10-23T21:11:35.387588 4030571.23810 38397501.09091 438.3636 ML -2.80 0.008 8 6 B
2022-10-23T21:13:40.246558 4030639.80952 38397730.18182 780.9091 ML -2.46 0.011 12 11 B
2022-10-23T21:15:56.998428 4030417.33333 38397913.45455 435.2727 ML -2.81 0.010 13 10 B
2022-10-23T21:16:28.648374 4030315.23810 38397232.72727 458.0000 ML -2.77 0.019 9 9 B
2022-10-23T21:22:25.515861 4030577.33333 38397795.63636 763.6364 ML -2.12 0.010 14 14 B
2022-10-23T21:22:45.414415 4030588.00000 38397456.72727 415.6364 ML -2.61 0.011 11 9 B
2022-10-23T21:22:57.332063 4030986.47619 38397817.45455 426.1818 ML -2.73 0.029 8 7 B
2022-10-23T21:23:48.392477 4030645.14286 38397608.00000 413.8182 ML -2.76 0.006 10 8 B
2022-10-23T21:24:52.625144 4030608.57143 38397712.72727 388.1818 ML -2.50 0.016 12 11 B
2022-10-23T21:25:56.044532 4030353.33333 38397501.81818 304.5455 ML -2.56 0.012 12 10 B
2022-10-23T21:28:54.884003 4030194.85714 38398681.45455 394.7273 ML -3.25 0.006 7 6 B
2022-10-23T21:30:15.409398 4030517.90476 38397224.72727 430.7273 ML -2.98 0.005 6 5 B
2022-10-23T21:45:36.066011 4030684.76190 38397505.45455 441.6364 ML -2.46 0.011 14 14 B
2022-10-23T21:48:23.66977 4030646.66667 38397541.81818 440.1818 ML -2.29 0.027 14 14 B
2022-10-23T21:48:24.673895 4030185.71429 38398330.90909 420.7273 ML -2.55 0.033 7 2 B
2022-10-23T21:59:33.244656 4030543.04762 38397711.27273 697.6364 ML -2.65 0.015 9 8 B
2022-10-23T22:03:41.982436 4030518.66667 38397669.81818 458.0000 ML -2.48 0.010 11 11 B
2022-10-23T22:06:33.171337 4030600.19048 38397964.36364 800.0000 ML -2.64 0.012 13 10 B
2022-10-23T22:10:05.116234 4030547.61905 38397727.27273 459.0909 ML -2.74 0.018 10 8 B
2022-10-23T22:12:12.529362 4030485.90476 38397689.45455 468.0000 ML -2.56 0.010 11 10 B
2022-10-23T22:14:37.595813 4030536.19048 38397752.72727 762.7273 ML -2.22 0.008 14 14 B
2022-10-23T22:24:35.493371 4030581.90476 38397739.63636 370.1818 ML -2.05 0.007 13 13 B
2022-10-23T22:30:44.045138 4030454.66667 38397184.00000 387.4545 ML -2.24 0.011 10 10 B
2022-10-23T22:32:17.431979 4030632.19048 38397728.72727 437.4545 ML -2.56 0.016 13 12 B
2022-10-23T22:33:17.035209 4030562.85714 38397803.63636 459.8182 ML -2.55 0.021 14 13 B
2022-10-23T22:45:57.489213 4030604.76190 38397919.27273 458.7273 ML -1.93 0.008 14 14 B
2022-10-23T22:58:14.534944 4030730.47619 38397000.00000 540.9091 ML -2.86 0.005 6 5 B
2022-10-23T23:00:19.114919 4030760.19048 38397475.63636 341.6364 ML -2.77 0.012 10 10 B
2022-10-23T23:01:10.2165 4030590.28571 38397392.00000 366.1818 ML -2.56 0.010 12 11 B
2022-10-23T23:04:52.588562 4030585.71429 38397545.45455 430.0000 ML -2.73 0.013 10 6 B
2022-10-23T23:07:11.756325 4030533.14286 38397795.63636 658.1818 ML -2.57 0.009 11 10 B
2022-10-23T23:17:20.574048 4031351.42857 38397842.90909 503.4545 ML -2.79 0.008 7 6 B
2022-10-23T23:21:49.134927 4030913.33333 38397665.45455 800.0000 ML -2.45 0.020 6 6 B
2022-10-23T23:55:21.20637 4030662.66667 38397978.18182 437.4545 ML -2.02 0.007 13 13 B

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StartServerWPF.Modules.Main.Models
{
public class LogMessageModel
{
public DateTime OriginTime { get; set; }
public string message { get; set; }
}
}

@ -0,0 +1,39 @@
using System;
using System.Reflection;
using System.Windows.Forms;
namespace StartServerWPF.Modules.Main.Models
{
public class MsEventModel
{
public int ID { get; set; }
public DateTime CurrentTime { get; set; }
public DateTime OriginTime { get; set; }
public double EastCoordinate { get; set; }
public double NorthCoordinate { get; set; }
public double Depth { get; set; }
public double ML { get; set; }
public double Energy { get; set; }
public int EarthquakeSource { get; set; }
public bool IsSend { get; set; } = false;
public MsEventModel(string message)
{
this.eventMessage = message;
string[] evtS = message.Trim(' ').Split(new char[] { ' ' });
OriginTime = DateTime.Parse(evtS[0]);
EastCoordinate = double.Parse(evtS[2]);
NorthCoordinate = double.Parse(evtS[1]);
Depth = double.Parse(evtS[3]);
ML = (evtS.Length == 7) ?- 10: double.Parse(evtS[5]);
}
private string eventMessage;
public override string ToString()
{
return eventMessage;
}
}
}

@ -1,83 +0,0 @@
using System;
namespace StartServerWPF.Modules.Main
{
public class MsEvent
{
public int ID { get; set; }
public DateTime OriginTime { get; set; }
public double ShowX { get; set; }
public double ShowY { get; set; }
public double ShowZ { get; set; }
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
/// <summary>
/// 震级
/// </summary>
public double ML { get; set; }
/// <summary>
/// 定位台站数量
/// </summary>
public int NFP { get; set; }
/// <summary>
/// 计算震级的台站数量
/// </summary>
public int NFM { get; set; }
/// <summary>
/// 残差
/// </summary>
public double Residual { get; set; }
/// <summary>
/// 文件路径
/// </summary>
public string FilePath { get; set; }
public MsEvent()
{
}
public MsEvent(string str)
{
string[] evtS = str.Trim(' ').Split(new char[] { ' ' });
OriginTime = DateTime.Parse(evtS[0]);
X = double.Parse(evtS[2]);
Y = double.Parse(evtS[1]);
Z = double.Parse(evtS[3]);
int off = 0;
if (evtS.Length == 7)
{
ML = -10;
}
else
{
ML = double.Parse(evtS[5]);
off = 2;
}
NFP = int.Parse(evtS[4 + off]);
NFM = int.Parse(evtS[5 + off]);
Residual = double.Parse(evtS[6 + off]);
}
//public DateTime JsonDataFormatConvert(string jdf)
//{
// DateTime cd;
// string[] strs = jdf.Trim().Split(new char[] { 'T' });
// cd=new DateTime()
//}
public override string ToString()
{
string MLSTR = "";
if (ML != -10)
{
MLSTR = "ML" + " ";
}
string str = OriginTime.ToString("yyyy-MM-dd HH:mm:ss:fff") + " " +
Y.ToString() + " " +
X.ToString() + " " +
Z.ToString() + " " +
MLSTR +
ML.ToString() + " " + NFP.ToString() + " " + NFM.ToString() + " " +
Residual.ToString();
return str;
}
}
}

@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
using StartServerWPF.Modules.Main.Models;
namespace StartServerWPF.Modules.Main
{
@ -43,7 +44,7 @@ namespace StartServerWPF.Modules.Main
conn.Close();
return rtn;
}
public bool InsertEvent(MsEvent msEvent)
public bool InsertEvent(MsEventModel msEvent)
{
conn.Open();
//检查是否有重复记录
@ -58,13 +59,10 @@ namespace StartServerWPF.Modules.Main
string insStr = "insert into " + rdb.TableName + "(ETime,X,Y,Z,ML,LocSta,MLSta,Rms)" +
"values('" +
msEvent.OriginTime.ToString("yyyy-MM-ddTHH:mm:ss.fff") + "','" +
msEvent.X.ToString() + "','" +
msEvent.Y.ToString() + "','" +
msEvent.Z.ToString() + "','" +
msEvent.ML.ToString() + "','" +
msEvent.NFP.ToString() + "','" +
msEvent.NFM.ToString() + "','" +
msEvent.Residual.ToString() + "')";
msEvent.EastCoordinate.ToString() + "','" +
msEvent.NorthCoordinate.ToString() + "','" +
msEvent.Depth.ToString() + "','" +
msEvent.ML.ToString() + "','" ;
mcmd = new MySqlCommand(insStr, conn);
int insertRow = mcmd.ExecuteNonQuery();
if (insertRow > 0)

@ -56,11 +56,6 @@ namespace StartServerWPF.Modules.Main.ViewModels
set { SetProperty(ref selectedIndex, value); }
}
public DelegateCommand StartCommand => new(Start);
public DelegateCommand StopCommand => new(Stop);
@ -198,15 +193,6 @@ namespace StartServerWPF.Modules.Main.ViewModels
Data = lastLine,
IsSend = false
});
//CSDevicePublish cSDevicePublish = new CSDevicePublish()
//{
// type = CSMessage.publish,
// message = lastLine,
// serialNumber = DataList.Count,
//};
//string jsonStr = JsonSerializer.Serialize(cSDevicePublish);
//_websocketClient.SendMes(jsonStr);
}));
}
watcher.EnableRaisingEvents = true;

@ -25,7 +25,7 @@ namespace StartServerWPF.Modules.Main.ViewModels
{
this._websocketClient = websocketClient;
}
private string _title = "应用列表";
private string _title = "登录";
public string Title => _title;
private string account = "admin";

@ -39,10 +39,8 @@ namespace StartServerWPF.Modules.Main.ViewModels
InitializeParams();
JsonParser.UpdateApmsJson(sc.proApms.ProPath + "apms.json", sc.vpnInfo.DataSavePath);
JsonParser.UpdateRecvJson(sc.proRecv.ProPath + "gw.recvftp.json", sc.vpnInfo.DataSavePath);
// sc.proMonitor.ProParams = JsonParser.CreateMonitorStartParam(sc.vpnInfo.DataSavePath, MoniStartTime);
// sc.proMonitor.ProParams = JsonParser.CreateMonitorStartParam(sc.vpnInfo.DataSavePath, MoniStartTime);
StartTime = DateTime.Now;
// labelStartTime.Text = "启动时间:" + StartTime.ToString();
remDb = new MySqlHelper(sc.remoteDb);
Console.WriteLine(System.Environment.CurrentDirectory);
Console.WriteLine(sc.remoteDb.ServerAddress + "\t" + sc.remoteDb.ServerPort
+ "\t" + sc.remoteDb.UserName + "\t" + sc.remoteDb.Password);
@ -50,7 +48,6 @@ namespace StartServerWPF.Modules.Main.ViewModels
this._websocket = websocket;
this._loginViewDialogViewModel = loginViewDialogViewModel;
_websocket.WebSocketInit(sc.remoteDb.WebsocketUrl);
CurrentItemsList = ApmsProcessSliceList;
_websocket.WebsocketError = WebSocket_Error;
_websocket.WebSocketMessageReceived = WebSocket4Net_MessageReceived;
@ -98,10 +95,10 @@ namespace StartServerWPF.Modules.Main.ViewModels
HandyControl.Controls.MessageBox.Show(user.message, "提示");
if (user.code == 200)
{
_websocket.SendMes(JsonSerializer.Serialize(new CSUserSubscribeMessage { type = CSMessage.subscribe }));
_loginViewDialogViewModel.CloseDialog(new DialogResult(ButtonResult.OK));
}
});
// this.HideLoading();
break;
case CSMessage.subscribe:
var sub = JsonSerializer.Deserialize<SCUserSubscribeMessage>(message, new JsonSerializerOptions
@ -120,16 +117,21 @@ namespace StartServerWPF.Modules.Main.ViewModels
//重新编码,解决中文乱码问题
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
});
var data= ApmsEventSource.Where(e => e.ToString() == publish.message).FirstOrDefault();
if (data!=null)
{
data.IsSend = true;
}
break;
default:
break;
}
}
}
}
void WebSocket_Error(SuperSocket.ClientEngine.ErrorEventArgs e)
{
_loginViewDialogViewModel.OnShowLoading(new LoadingPayload { IsShow = false });
//出错后隐藏加载窗口
Debug.WriteLine("websocket_Error:" + e.Exception.ToString());
}
@ -190,12 +192,12 @@ namespace StartServerWPF.Modules.Main.ViewModels
get { return isIndeterminate; }
set { SetProperty(ref isIndeterminate, value); }
}
private ObservableCollection<ProcessModel> reciveDataSource=new ObservableCollection<ProcessModel>();
private ObservableCollection<ProcessModel> _processDataSource =new ObservableCollection<ProcessModel>();
public ObservableCollection<ProcessModel> ReciveDataSource
public ObservableCollection<ProcessModel> ProcessDataSource
{
get { return reciveDataSource; }
set { reciveDataSource = value; }
get { return _processDataSource ; }
set { _processDataSource = value; }
}
private ObservableCollection<int> intervalTimesSource=new ObservableCollection<int>();
@ -218,60 +220,48 @@ namespace StartServerWPF.Modules.Main.ViewModels
set => SetProperty(ref proMonInterval, value);
}
private ObservableCollection<ProcessingInformationModel> _OutPutItemsSource = new ObservableCollection<ProcessingInformationModel>();
public ObservableCollection<ProcessingInformationModel> OutPutItemsSource
{
get => _OutPutItemsSource;
set => SetProperty(ref _OutPutItemsSource, value);
}
private List<ProcessingInformationModel> _apmsProcessSliceList= new List<ProcessingInformationModel>();
public List<ProcessingInformationModel> ApmsProcessSliceList
private ObservableCollection<ProcessingInformationModel> _apmsProcessSliceSource= new ObservableCollection<ProcessingInformationModel>();
public ObservableCollection<ProcessingInformationModel> ApmsProcessSliceSource
{
get => _apmsProcessSliceList;
set=> SetProperty(ref _apmsProcessSliceList, value);
get => _apmsProcessSliceSource;
set=> SetProperty(ref _apmsProcessSliceSource, value);
}
private List<ProcessingInformationModel> _apmsEventList = new List<ProcessingInformationModel>();
public List<ProcessingInformationModel> ApmsEventList
private ObservableCollection<MsEventModel> _apmsEventSource = new ObservableCollection<MsEventModel>();
public ObservableCollection<MsEventModel> ApmsEventSource
{
get => _apmsEventList;
set => SetProperty(ref _apmsEventList, value);
get => _apmsEventSource;
set => SetProperty(ref _apmsEventSource, value);
}
private List<ProcessingInformationModel> _toolsProcessSliceList = new List<ProcessingInformationModel>() {
new ProcessingInformationModel { ProcessMes = "outLine.Data", MonitorTime = DateTime.Now.ToString()},
new ProcessingInformationModel { ProcessMes = "outLine.Data666", MonitorTime = DateTime.Now.ToString()}
};
public List<ProcessingInformationModel> ToolsProcessSliceList
private ObservableCollection<ProcessingInformationModel> _toolsProcessSliceSource = new ObservableCollection<ProcessingInformationModel>();
public ObservableCollection<ProcessingInformationModel> ToolsProcessSliceSource
{
get => _toolsProcessSliceList;
set => SetProperty(ref _toolsProcessSliceList, value);
get => _toolsProcessSliceSource;
set => SetProperty(ref _toolsProcessSliceSource, value);
}
private List<ProcessingInformationModel> _toolsEventList = new List<ProcessingInformationModel>();
public List<ProcessingInformationModel> ToolsEventList
private ObservableCollection<MsEventModel> _toolsEventSource = new ObservableCollection<MsEventModel>();
public ObservableCollection<MsEventModel> ToolsEventSource
{
get => _toolsEventList;
set => SetProperty(ref _toolsEventList, value);
get => _toolsEventSource;
set => SetProperty(ref _toolsEventSource, value);
}
public static void AddItems<T>(List<T> list, T t1)
public static void AddItems<T>(ObservableCollection<T> list, T t1)
{
if (list == null)
{
return;
}
list.Add(t1);
if (list.Count > 20)
if (list.Count > 30)
{
T item = list[0];
list.RemoveAt(0);
}
}
#endregion
private List<ProcessingInformationModel> CurrentItemsList;
#region 事件
public DelegateCommand LoadedCommand => new(Loaded);
public DelegateCommand UnloadedCommand => new(Unloaded);
@ -284,51 +274,13 @@ namespace StartServerWPF.Modules.Main.ViewModels
public DelegateCommand<object> StartCommand => new(Start);
// public DelegateCommand OneKeyStopCommand => new(OneKeyStop);
public DelegateCommand DisplayRealWavesCommand => new(DisplayRealWaves);
public DelegateCommand QueryDataCommand => new(QueryData);
public DelegateCommand InsertDataCommand => new(InsertData);
public DelegateCommand<object> OutputItemsCommand => new((obj)=>
{
switch (obj.ToString())
{
case "apmsProcessSlice":
CurrentItemsList = ApmsProcessSliceList;
break;
case "apmsEvent":
CurrentItemsList = ApmsEventList;
OutPutItemsSource.Clear();
break;
case "toolsProcessSlice":
CurrentItemsList = ToolsProcessSliceList;
break;
case "toolsEvent":
CurrentItemsList = ToolsEventList;
break;
default:
break;
}
OutPutItemsSource.Clear();
CurrentItemsList.ForEach((item) =>
{
OutPutItemsSource.Add(item);
});
});
private void Loaded()
{
{
}
public void Unloaded()
{
//KillProcess(sc.proServer);
//KillProcess(sc.proRecv);
//KillProcess(sc.proApms);
//KillProcess(sc.proMonitor);
//KillProcess(sc.proTools);
//string logStr = DateTime.Now.ToString("s") + "\t程序关闭";
//WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
OneKeyStop();
}
private void ConnectVPN(object obj)
{
@ -367,6 +319,21 @@ namespace StartServerWPF.Modules.Main.ViewModels
private void GetVPNStatus()
{
string str = "2022-10-23T18:34:48.828289 4031435.23810 38398062.54545 451.0909 ML -2.71 0.016 7 6 B";
var ms = new MsEventModel(str) { CurrentTime = DateTime.Now };
var data = ApmsEventSource.Where(f => f.OriginTime == ms.OriginTime).FirstOrDefault();
if (data == null)
{
AddItems(ApmsEventSource, ms);
CSDevicePublish cSDevicePublish = new CSDevicePublish()
{
type = CSMessage.publish,
message = str,
};
string jsonStr = JsonSerializer.Serialize(cSDevicePublish);
_websocket.SendMes(jsonStr);
}
if (vpn.CheckVpnStatus(sc.vpnInfo.VpnName))
{
MessageBox.Show("VPN已经连接!");
@ -414,7 +381,7 @@ namespace StartServerWPF.Modules.Main.ViewModels
private void OneKeyStart()
{
ReciveDataSource.Clear();
ProcessDataSource.Clear();
foreach (var item in sc.GetType().GetProperties())
{
var pro = item.GetValue(sc) as ProcessInfo;
@ -422,33 +389,25 @@ namespace StartServerWPF.Modules.Main.ViewModels
{
StartTime = DateTime.Now;
pro.Pid= StartProcess(pro);
ReciveDataSource.Add(new ProcessModel
ProcessDataSource.Add(new ProcessModel
{
ProName = pro.ProName,
ProcessTile = pro.ProTitle,
MonitorTime = DateTime.Now.ToString(),
ProcessStatus = sc.proServer.Pid == 0 ? "正常运行" : "未运行"
}) ;
//if (sc.proServer.Pid < 32)
//{
// ReciveDataSource.Add( pro.ProName+"服务器程序启动失败:" + StartTime.ToString());
//}
Thread.Sleep(10);
}
}
// labelStartTime.Text = "启动时间:" + StartTime.ToString();
RunTime = DateDiff(DateTime.Now, StartTime);
string logStr = StartTime.ToString("s") + "\t服务器程序启动";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
IsIndeterminate =true;
// btnSetParams.Enabled = false;
timer1.Interval = TimeSpan.FromSeconds(ProMonInterval);
timer1.Start();
}
private void OneKeyStop()
public void OneKeyStop()
{
foreach (var item in sc.GetType().GetProperties())
{
@ -456,23 +415,17 @@ namespace StartServerWPF.Modules.Main.ViewModels
if (pro != null)
{
int indexPro = KillProcess(pro);
var model= ReciveDataSource.Where(x => x.ProcessTile == pro.ProName).FirstOrDefault();
var model= ProcessDataSource.Where(x => x.ProcessTile == pro.ProName).FirstOrDefault();
if (model == null) continue;
model.MonitorTime= DateTime.Now.ToString();
model.ProcessStatus = "已停止";
}
}
// ReciveDataSource.Add("服务停止于:" + DateTime.Now.ToString());
timer1.Stop();
IsIndeterminate = false;
string logStr = DateTime.Now.ToString("s") + "\t服务器程序关闭";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
// labelStartTime.Text = "启动时间:";
StartTime = new DateTime();
// buttonOneKeyStart.Enabled = true;
// btnSetParams.Enabled = true;
}
private void DisplayRealWaves()
@ -480,27 +433,6 @@ namespace StartServerWPF.Modules.Main.ViewModels
StartProcess(sc.proPlot);
}
private void QueryData()
{
string str = "2021-05-09T00:15:34.530406 -0.60000 -0.07969 0.6000 ML -3.05 14 13 0.048 ";
MsEvent me = new MsEvent(str);
// dataGridView1.DataSource = remDb.MySqlSelect("select ETime,X,Y,Z,ML,LocSta,MLSta,Rms from " + sc.remoteDb.TableName).Tables[sc.remoteDb.TableName];
}
private void InsertData()
{
string str = "2021-05-09T00:15:34.900406 -0.60000 -0.07969 0.6000 ML -3.05 14 13 0.048 ";
MsEvent me = new MsEvent(str);
bool insStat = remDb.InsertEvent(me);
if (insStat)
{
Console.WriteLine("新增成功");
}
else
{
Console.WriteLine("已有该记录");
}
}
#endregion
private void ConnectVpn()
{
@ -542,14 +474,11 @@ namespace StartServerWPF.Modules.Main.ViewModels
[DllImport("shell32.dll")]
public static extern int ShellExecute(IntPtr hwnd, StringBuilder lpszOp, StringBuilder lpszFile, StringBuilder lpszParams, StringBuilder lpszDir, int FsShowCmd);
public VPNHelper vpn;
public bool vpnStatus = false;
public SystemConfig sc;
MySqlHelper remDb;
private DispatcherTimer timer1= new DispatcherTimer();
private readonly IDialogService _dialogService;
private readonly WebsocketClient _websocket;
@ -594,9 +523,8 @@ namespace StartServerWPF.Modules.Main.ViewModels
bool res= process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
return res;
// process.WaitForExit();
return res;
}
private void Process_Exited(object? sender, EventArgs e)
@ -613,14 +541,17 @@ namespace StartServerWPF.Modules.Main.ViewModels
var pro = sendingProcess as Process;
if (pro != null)
{
if (pro.MainModule.ModuleName.Contains(sc.proApms.ProName))
{
AddItems(ApmsProcessSliceList, new ProcessingInformationModel { ProcessMes= outLine.Data, MonitorTime=DateTime.Now.ToString() });
}
else if (pro.MainModule.ModuleName.Contains(sc.proTools.ProName))
Application.Current.Dispatcher.BeginInvoke(() =>
{
AddItems(ToolsProcessSliceList, new ProcessingInformationModel { ProcessMes = outLine.Data, MonitorTime = DateTime.Now.ToString() });
}
if (pro.MainModule.ModuleName.Contains(sc.proApms.ProName))
{
AddItems(ApmsProcessSliceSource, new ProcessingInformationModel { ProcessMes = outLine.Data, MonitorTime = DateTime.Now.ToString() });
}
else if (pro.MainModule.ModuleName.Contains(sc.proTools.ProName))
{
AddItems(ToolsProcessSliceSource, new ProcessingInformationModel { ProcessMes = outLine.Data, MonitorTime = DateTime.Now.ToString() });
}
});
}
}
else if (outLine.Data.Contains("ML "))
@ -628,28 +559,33 @@ namespace StartServerWPF.Modules.Main.ViewModels
var pro = sendingProcess as Process;
if (pro != null)
{
if (pro.MainModule.ModuleName.Contains(sc.proApms.ProName))
Application.Current.Dispatcher.BeginInvoke(() =>
{
AddItems(ApmsEventList, new ProcessingInformationModel { ProcessMes = outLine.Data, MonitorTime = DateTime.Now.ToString() });
}
else if (pro.MainModule.ModuleName.Contains(sc.proTools.ProName))
{
AddItems(ToolsEventList, new ProcessingInformationModel { ProcessMes = outLine.Data, MonitorTime = DateTime.Now.ToString() });
}
if (pro.MainModule.ModuleName.Contains(sc.proApms.ProName))
{
var ms = new MsEventModel(outLine.Data) { CurrentTime = DateTime.Now };
AddItems(ApmsEventSource, ms);
var data = ApmsEventSource.Where(f => f.OriginTime == ms.OriginTime).FirstOrDefault();
if (data == null)
{
CSDevicePublish cSDevicePublish = new CSDevicePublish()
{
type = CSMessage.publish,
message = outLine.Data,
};
string jsonStr = JsonSerializer.Serialize(cSDevicePublish);
_websocket.SendMes(jsonStr);
}
}
else if (pro.MainModule.ModuleName.Contains(sc.proTools.ProName))
{
AddItems(ToolsEventSource, new MsEventModel(outLine.Data) { CurrentTime = DateTime.Now });
}
});
}
}
Application.Current.Dispatcher.BeginInvoke(() =>
{
OutPutItemsSource.Clear();
CurrentItemsList.ForEach((item) =>
{
OutPutItemsSource.Add(item);
});
});
}
/// <summary>
/// 启动进程
/// </summary>
@ -659,10 +595,7 @@ namespace StartServerWPF.Modules.Main.ViewModels
{
bool res= CMDStartProcess(proInfo);
int seInd = res ? 37 : 0;
//int seInd = ShellExecute(IntPtr.Zero, new StringBuilder("open"), new StringBuilder(proInfo.ProName + ".exe")
// , new StringBuilder(proInfo.ProParams), new StringBuilder(proInfo.ProPath), proInfo.ShowState);
return seInd;
}
/// <summary>
/// 结束进程
@ -678,7 +611,6 @@ namespace StartServerWPF.Modules.Main.ViewModels
{
try
{
Process[] localByName = Process.GetProcessesByName(processInfo.ProName);
if (localByName.Length == 0)
{
@ -763,7 +695,7 @@ namespace StartServerWPF.Modules.Main.ViewModels
if (pro != null)
{
int sfp = FindProcess(pro);
var model = ReciveDataSource.Where(x => x.ProcessTile == pro.ProName).FirstOrDefault();
var model = ProcessDataSource.Where(x => x.ProcessTile == pro.ProName).FirstOrDefault();
if (sfp == 0)
{
model.ProcessStatus = "正常运行";
@ -896,8 +828,7 @@ namespace StartServerWPF.Modules.Main.ViewModels
}
//return AddressIP;
}
public void SetControlstatus()
{
vpnStatus = vpn.CheckVpnStatus(sc.vpnInfo.VpnName);

@ -52,24 +52,8 @@ namespace StartServerWPF.Modules.Main.ViewModels
}
}));
});
#endregion
//private void OnLogin(LoginPayload loginPayload)
//{
// Menus = new ObservableCollection<MenuItemModel>();
// if (!loginPayload.IsLogingIn) //
// {
// //登录完成更新措菜单
// if (GlobalEntity.CurrentUserInfo != null)
// {
// origMenus = GlobalEntity.CurrentUserInfo.Menus;
// this.FillMenus(Menus, 0);
// }
// }
//}
///递归
#endregion
/// <summary>
/// 递归
/// </summary>
@ -89,7 +73,7 @@ namespace StartServerWPF.Modules.Main.ViewModels
menus.Add(menuItem);
}
}
List<string> menuNames = new List<string>() {"首页","实时波形","波形回放","设置","日志","文件监控" };
List<string> viewName = new List<string>() { "MainView", "RealTimeWaveformView", "WaveformPlayBackView", "SetParamView", "LogManagementView","FilesWatcherView" };
List<string> menuNames = new List<string>() {"首页","实时波形","波形回放","设置","日志", };
List<string> viewName = new List<string>() { "MainView", "RealTimeWaveformView", "WaveformPlayBackView", "SetParamView", "LogManagementView"};
}
}

@ -107,7 +107,7 @@
<StackPanel >
<TextBlock Text="程序运行状态" FontSize="22" Margin="20,10,0,10"/>
<Grid Margin="10">
<DataGrid ItemsSource="{Binding ReciveDataSource}" Background="White" IsReadOnly="True" AutoGenerateColumns="False">
<DataGrid ItemsSource="{Binding ProcessDataSource}" Background="White" IsReadOnly="True" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="程序" Width="120" Binding="{Binding ProcessTile}"/>
<DataGridTextColumn Header="进程" Width="100" Binding="{Binding ProName}"/>
@ -127,17 +127,17 @@
<RowDefinition Height="61*"/>
</Grid.RowDefinitions>
<TextBlock Text="实时处理事件" FontSize="15" VerticalAlignment="Center" />
<DataGrid Grid.Row="1" Background="White" IsReadOnly="True" AutoGenerateColumns="False">
<DataGrid Grid.Row="1" ItemsSource="{Binding ApmsEventSource}" Background="White" IsReadOnly="True" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="消息时间" Width="100" Binding="{Binding ProcessTile,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
<DataGridTextColumn Header="发震时刻" Width="*" Binding="{Binding ProName}"/>
<DataGridTextColumn Header="东坐标(m)" Width="*" Binding="{Binding MonitorTime}"/>
<DataGridTextColumn Header="北坐标(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="深度(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="震级(ML)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="能量(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="震源性质(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="发送状态(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="消息时间" Width="*" Binding="{Binding CurrentTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
<DataGridTextColumn Header="发震时刻" Width="*" Binding="{Binding OriginTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
<DataGridTextColumn Header="东坐标(m)" Width="*" Binding="{Binding EastCoordinate}"/>
<DataGridTextColumn Header="北坐标(m)" Width="*" Binding="{Binding NorthCoordinate}"/>
<DataGridTextColumn Header="深度(m)" Width="*" Binding="{Binding Depth}"/>
<DataGridTextColumn Header="震级(ML)" Width="*" Binding="{Binding ML}"/>
<DataGridTextColumn Header="能量(m)" Width="*" Binding="{Binding Energy}"/>
<DataGridTextColumn Header="震源性质(m)" Width="*" Binding="{Binding NorthCoordinate}"/>
<DataGridTextColumn Header="发送状态(m)" Width="*" Binding="{Binding IsSend}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
@ -149,17 +149,16 @@
<RowDefinition Height="61*"/>
</Grid.RowDefinitions>
<TextBlock Text="后处理事件" FontSize="15"/>
<DataGrid Grid.Row="1" Background="White" IsReadOnly="True" AutoGenerateColumns="False">
<DataGrid Grid.Row="1" ItemsSource="{Binding ToolsEventSource}" Background="White" IsReadOnly="True" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="消息时间" Width="100" Binding="{Binding ProcessTile,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
<DataGridTextColumn Header="发震时刻" Width="*" Binding="{Binding ProName}"/>
<DataGridTextColumn Header="东坐标(m)" Width="*" Binding="{Binding MonitorTime}"/>
<DataGridTextColumn Header="北坐标(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="深度(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="震级(ML)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="能量(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="震源性质(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="发送状态(m)" Width="*" Binding="{Binding ProcessStatus}"/>
<DataGridTextColumn Header="消息时间" Width="*" Binding="{Binding CurrentTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
<DataGridTextColumn Header="发震时刻" Width="*" Binding="{Binding OriginTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
<DataGridTextColumn Header="东坐标(m)" Width="*" Binding="{Binding EastCoordinate}"/>
<DataGridTextColumn Header="北坐标(m)" Width="*" Binding="{Binding NorthCoordinate}"/>
<DataGridTextColumn Header="深度(m)" Width="*" Binding="{Binding Depth}"/>
<DataGridTextColumn Header="震级(ML)" Width="*" Binding="{Binding ML}"/>
<DataGridTextColumn Header="能量(m)" Width="*" Binding="{Binding Energy}"/>
<DataGridTextColumn Header="震源性质(m)" Width="*" Binding="{Binding EarthquakeSource}"/>
</DataGrid.Columns>
</DataGrid>
@ -181,7 +180,7 @@
<TextBlock Text="消息时间" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="消息内容" HorizontalAlignment="Center"/>
</Grid>
<ListBox Grid.Row="2" ItemsSource="{Binding ApmsProcessSliceList}" BorderThickness="0">
<ListBox Grid.Row="2" ItemsSource="{Binding ApmsProcessSliceSource}" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
@ -214,7 +213,7 @@
<TextBlock Text="消息时间" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="消息内容" HorizontalAlignment="Center"/>
</Grid>
<ListBox Grid.Row="2" ItemsSource="{Binding ToolsProcessSliceList}" BorderThickness="0">
<ListBox Grid.Row="2" ItemsSource="{Binding ToolsProcessSliceSource}" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>

@ -3,9 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:prism="http://prismlibrary.com/"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
mc:Ignorable="d" Background="#FFEEF1F3"
d:DesignHeight="300" d:DesignWidth="500">
<UserControl.Resources>
<ResourceDictionary>
@ -14,74 +14,84 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid Margin="100,0,0,0">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="20*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="60"/>
<RowDefinition Height="4*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Title}" FontSize="20" VerticalAlignment="Center" Foreground="#888" Margin="10,0,10,0"/>
<Grid Grid.Row="1" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<TextBlock Text="IP地址" Grid.Row="0" Grid.Column="0"/>
<TextBox Text="{Binding MainModel.VpnIP}" Grid.Row="0" Grid.Column="1"/>
<TextBlock Text="VPN名称" Grid.Row="1" Grid.Column="0"/>
<TextBox Text="{Binding MainModel.VpnName}" Grid.Row="1" Grid.Column="1" />
<TextBlock Text="用户名:" Grid.Row="2" Grid.Column="0" />
<TextBox Text="{Binding MainModel.VpnPsw}" Grid.Row="2" Grid.Column="1" />
<TextBlock Text="密码:" Grid.Row="3" Grid.Column="0" />
<TextBox Text="{Binding MainModel.VpnPsw}" Grid.Row="3" Grid.Column="1" />
</Grid>
<Grid Grid.Row="2" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="存储路径:" Grid.Row="0" Grid.Column="0"/>
<TextBox Text="{Binding MainModel.DataSavePath}" IsReadOnly="True" Grid.Row="0" Grid.Column="1"/>
<Button Content="..." Command="{Binding FilePathSaveCommand}" Grid.Row="0" Grid.Column="2"/>
<TextBlock Text="日志路径:" Grid.Row="1" Grid.Column="0" />
<TextBox Text="{Binding MainModel.SystemLogPath}" IsReadOnly="True" Grid.Row="1" Grid.Column="1"/>
<Button Content="..." Command="{Binding LogPathSaveCommand}" Grid.Row="1" Grid.Column="2"/>
</Grid>
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<TextBlock>
<Border Background="White">
<TextBlock Text="{Binding Title}" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" Margin="10,0,10,0"/>
</Border>
<Border Background="White" Grid.Row="1" CornerRadius="5" Margin="10">
<Grid Margin="100,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="5*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="1" >
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<TextBlock Text="IP地址" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" />
<TextBox Text="{Binding MainModel.VpnIP}" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" />
<TextBlock Text="VPN名称" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
<TextBox Text="{Binding MainModel.VpnName}" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" />
<TextBlock Text="用户名:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" />
<TextBox Text="{Binding MainModel.VpnPsw}" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" />
<TextBlock Text="密码:" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" />
<TextBox Text="{Binding MainModel.VpnPsw}" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" />
</Grid>
<Grid Grid.Row="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="存储路径:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"/>
<TextBox Text="{Binding MainModel.DataSavePath}" IsReadOnly="True" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
<Button Content="..." Command="{Binding FilePathSaveCommand}" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBlock Text="日志路径:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
<TextBox Text="{Binding MainModel.SystemLogPath}" IsReadOnly="True" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" />
<Button Content="..." Command="{Binding LogPathSaveCommand}" Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left"/>
</Grid>
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Visibility="Collapsed">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<TextBlock>
<Run Text="监控日期:"/>
<Run Text="{Binding MoniTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
</TextBlock>
<Image Name="tb_calendar_img" Source="/Images/calendar.png" Grid.Column="1" Width="18" Height="18" Margin="0,0,0,0" PreviewMouseLeftButtonUp="tb_calendar_img_MouseLeftButtonUp"/>
</StackPanel>
<Popup x:Name="Pop" PopupAnimation="None" Width="200" Height="210" PlacementTarget="{Binding ElementName=tb_calendar}" Placement="Bottom" AllowsTransparency="True" StaysOpen="False" VerticalAlignment="Top" Margin="-200,0,0,0">
<Calendar Name="calendar" SelectedDate="{Binding MoniTime}" HorizontalAlignment="Left" Margin="0,44,0,0" VerticalAlignment="Top" />
</Popup>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="4" >
<Button Content="应用" Width="100" Height="30" Margin="5,0"
</TextBlock>
<Image Name="tb_calendar_img" Source="/Images/calendar.png" Grid.Column="1" Width="18" Height="18" Margin="0,0,0,0" PreviewMouseLeftButtonUp="tb_calendar_img_MouseLeftButtonUp"/>
</StackPanel>
<Popup x:Name="Pop" PopupAnimation="None" Width="200" Height="210" PlacementTarget="{Binding ElementName=tb_calendar}" Placement="Bottom" AllowsTransparency="True" StaysOpen="False" VerticalAlignment="Top" Margin="-200,0,0,0">
<Calendar Name="calendar" SelectedDate="{Binding MoniTime}" HorizontalAlignment="Left" Margin="0,44,0,0" VerticalAlignment="Top" />
</Popup>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="3" >
<Button Content="应用" Width="100" Height="30" Margin="150,0"
Background="#FF0ABEFF"
Command="{Binding ConfirmCommand}"/>
<Button Content="取消" Width="100" Height="30"
<!--<Button Content="取消" Width="100" Height="30"
Background="#DDD" Foreground="#666"
Command="{Binding CancelCommand}"/>
</StackPanel>
Command="{Binding CancelCommand}"/>-->
</StackPanel>
</Grid>
</Border>
</Grid>
</UserControl>

@ -65,8 +65,8 @@ namespace StartServerWPF.Modules.Main
}
else if (webSocket4Net.State == WebSocketState.Closed)
{
Thread.Sleep(TimeSpan.FromSeconds(10));
webSocket4Net.Open();
Thread.Sleep(TimeSpan.FromSeconds(10));
}
Thread.Sleep(TimeSpan.FromSeconds(5));
}

@ -1,19 +1,37 @@
using Prism.Mvvm;
using Prism.Commands;
using Prism.Ioc;
using Prism.Mvvm;
using StartServerWPF.Modules.Main.ViewModels;
using System.Windows;
namespace StartServerWPF.ViewModels
{
public class MainWindowViewModel : BindableBase
{
private string _title = "StartServerWPF";
private readonly IContainerProvider _containerProvider;
public string Title
{
get { return _title; }
set { SetProperty(ref _title, value); }
}
public MainWindowViewModel()
}
public DelegateCommand ExitCommand => new(() =>
{
if (MessageBox.Show("是否退出程序?", "警告", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
{
var main = _containerProvider.Resolve<MainViewModel>();
main.OneKeyStop();
Application.Current.Shutdown();
}
});
public MainWindowViewModel(IContainerProvider containerProvider)
{
this._containerProvider = containerProvider;
}
}
}

@ -2,8 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/"
WindowStyle="None" WindowStartupLocation="CenterScreen"
prism:ViewModelLocator.AutoWireViewModel="True" Closing="Window_Closing"
Title="{Binding Title}" Height="900" Width="1700" >
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/StartServerWPF.Modules.Main;component/Styles/BaseResources.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
@ -13,10 +21,11 @@
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="100*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Background="#FF5E83FF" Orientation="Horizontal">
<DockPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Background="#FF5E83FF">
<Image Source="/StartServerWPF.Modules.Main;component/Images/Union.png" Height="32" Stretch="Uniform" Margin="20,0,30,0"/>
<TextBlock Text="微地震预警系统管理后台" FontSize="30px" Foreground="White" VerticalAlignment="Center"/>
</StackPanel>
<Button Content="&#xe603;" FontFamily="{StaticResource Iconfont}" FontSize="20" BorderBrush="Transparent" Command="{Binding ExitCommand}" HorizontalAlignment="Right" Width="58" Height="58" Foreground="White" Background="Black"/>
</DockPanel>
<ContentControl prism:RegionManager.RegionName="LeftMenuTreeRegion" Grid.Column="0" Grid.Row="1"/>
<ContentControl prism:RegionManager.RegionName="MainContentRegion" Grid.Column="1" Grid.Row="1" />
</Grid>

@ -1,4 +1,5 @@
using Prism.Ioc;
using Org.BouncyCastle.Tls.Crypto;
using Prism.Ioc;
using Prism.Regions;
using StartServerWPF.Modules.Main.ViewModels;
using System.Windows;
@ -10,26 +11,24 @@ namespace StartServerWPF.Views
/// </summary>
public partial class MainWindow : Window
{
private readonly IContainerProvider containerProvider;
public MainWindow(IContainerProvider containerProvider)
public MainWindow()
{
InitializeComponent();
this.containerProvider = containerProvider;
}
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (MessageBox.Show("是否退出程序?", "warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
{
var main= containerProvider.Resolve<MainViewModel>();
//if (MessageBox.Show("是否退出程序?", "warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
//{
// // var main= containerProvider.Resolve<MainViewModel>();
main.Unloaded();
}
else
{
e.Cancel = true;
}
//// main.Unloaded();
//}
//else
//{
//// e.Cancel = true;
//}
}
}

Loading…
Cancel
Save