| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -187,6 +187,8 @@ namespace mseedChart.MainModule.ViewModels
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                string asciiSavePath = openFileDialog.FileName.Replace("Mseed", "Txt");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                asciiSavePath = Path.ChangeExtension(asciiSavePath, ".txt");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                string JsonPath = Path.ChangeExtension(openFileDialog.FileName, "Json");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                Stopwatch st = new Stopwatch();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                st.Start();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                //读取.json文件
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                CurrentEventTime = _wavesModel.ReadChartJsonFile(JsonPath);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                //读取.mseed文件
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -195,6 +197,8 @@ namespace mseedChart.MainModule.ViewModels
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                CurrentTime = smList.First().BeginTime.ToShortDateString();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                StationsName = smList.Select(a => new StationAxis{Name= a.Name,IsChecked=true,SelectCommand =new DelegateCommand<object>(StationsNameVisible)}).ToList();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                StartChart();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                st.Stop();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                Debug.WriteLine("统计时间StartChart************:{0}", st.Elapsed);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                FeedDatasToChart();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -429,9 +433,12 @@ namespace mseedChart.MainModule.ViewModels
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            DisposeAllAndClear(_chartAxisY);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            ViewXY v = LChartALL.ViewXY;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            LChartALL.SizeChanged -= LChartALL_SizeChanged;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            LChartALL.SizeChanged += LChartALL_SizeChanged;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            DisposeAllAndClear(v.YAxes);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            DisposeAllAndClear(v.SampleDataSeries);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            DisposeAllAndClear(v.LineCollections);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				             v.Margins=new Thickness(80, 30, 50, 60);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            v.YAxes.AddRange(_wavesModel.CreateYAxisChart(smList.ToList(), LChartALL));
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            v.LegendBoxes[0].Position = LegendBoxPositionXY.RightCenter;
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -460,64 +467,71 @@ namespace mseedChart.MainModule.ViewModels
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            double firstSampleTimeStamp = v.XAxes[0].DateTimeToAxisValue(beginTime);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            int count = stationModel.Dzne.Count;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            int number= smList.Count;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            int number= smList.Count*3;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            for (int i = 0; i < number; i++)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                for (int k = 0; k <count; k++)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                int seriesIndex = i;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                AxisY axisY = v.YAxes[seriesIndex];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.LabelsColor = Colors.Black;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.Title.Shadow.DropColor = Colors.Transparent;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // axisY.Title.Shadow.ContrastColor = Colors.Transparent;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.Title.AllowDragging = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.AllowAutoYFit = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.Units.Visible = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.LabelsFont.Size = 10;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.Title.Angle = 0;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.MinorGrid.Visible = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.AutoDivSpacing = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.MajorDivCount = 2;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.MinorDivTickStyle.Visible = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.MajorDivTickStyle.Alignment = seriesIndex % 2 == 0 ? Alignment.Near : Alignment.Far;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // axisY.MajorDivTickStyle.LineLength = 6;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.MajorDivTickStyle.Color = Colors.Black;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.Title.Color = Colors.Black;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.Title.Font = new WpfFont("Segoe UI", 10, false, false);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.PanningEnabled = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.AllowScrolling = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                axisY.AllowScaling = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                SampleDataSeries series = new SampleDataSeries(v, v.XAxes[0], axisY);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                series.ShowInLegendBox = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                series.FirstSampleTimeStamp = firstSampleTimeStamp;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                series.SamplingFrequency = _samplingFrequency;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                series.Title.Text = axisY.Title.Text;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                series.SampleFormat = SampleFormat.DoubleFloat;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                if (seriesIndex % 3 == 0)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    int seriesIndex = i * 3 + k;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    AxisY axisY = v.YAxes[seriesIndex];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.LabelsColor = Colors.Black;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.Title.Shadow.DropColor = Colors.Transparent;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.Title.Shadow.ContrastColor = Colors.Transparent;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.AllowAutoYFit = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.Units.Visible = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.LabelsAngle = 0;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.LabelsFont.Size = 8;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.Title.Angle = 0;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                  //  axisY.MajorGrid.Visible = true;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MinorGrid.Visible = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MajorGrid.Pattern = LinePattern.Solid;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.AutoDivSpacing = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				     
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MajorDivCount = 2;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MajorDivTickStyle.Visible = true;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MinorDivTickStyle.Visible = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MajorDivTickStyle.Alignment = seriesIndex % 2 == 0 ? Alignment.Near : Alignment.Far;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MajorDivTickStyle.LineLength = 6;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.MajorDivTickStyle.Color = Colors.Black;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.Title.Color = Colors.Black;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.Title.Font = new WpfFont("Segoe UI", 10, false, false);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.PanningEnabled = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.AllowScrolling = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    axisY.AllowScaling = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    SampleDataSeries series = new SampleDataSeries(v, v.XAxes[0], axisY);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.ShowInLegendBox = true;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.FirstSampleTimeStamp = firstSampleTimeStamp;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.SamplingFrequency = _samplingFrequency;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.Title.Text = axisY.Title.Text;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.SampleFormat = SampleFormat.DoubleFloat;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    if (k % 3 == 0)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        series.LineStyle.Color = System.Windows.Media.Colors.Blue;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    else if (k % 3 == 1)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        series.LineStyle.Color = System.Windows.Media.Colors.Red;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    else if (k % 3 == 2)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        series.LineStyle.Color = System.Windows.Media.Colors.Green;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.LineStyle.Width = 0.5;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.LineStyle.AntiAliasing = LineAntialias.None;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.ScrollModePointsKeepLevel = 1;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.ScrollingStabilizing = true;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.AllowUserInteraction = false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    v.SampleDataSeries.Add(series);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    _chartAxisY.Add(axisY);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.LineStyle.Color = System.Windows.Media.Colors.DeepSkyBlue;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                else if (seriesIndex % 3 == 1)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.LineStyle.Color = System.Windows.Media.Colors.OrangeRed;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                else if (seriesIndex % 3 == 2)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    series.LineStyle.Color = System.Windows.Media.Colors.ForestGreen;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                series.LineStyle.Width = 0.2;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                series.ScrollModePointsKeepLevel = 1;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                //series.ScrollingStabilizing = true;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                v.SampleDataSeries.Add(series);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                _chartAxisY.Add(axisY);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        private void LChartALL_SizeChanged(object sender, SizeChangedEventArgs e)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            foreach (var item in LChartALL.ViewXY.YAxes)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                //更新标题坐标
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                item.Title.DistanceToAxis = -(int)e.NewSize.Width+80;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            foreach (var item in LChartALL.ViewXY.LineCollections)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                double b = LChartALL.ViewXY.XAxes[0].ValueToCoordD(item.Lines[0].AX)-80;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                item.Title.Offset.SetValues((int)b, 3);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |