| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -69,7 +69,7 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        Dispatcher _dispatcher;
 | 
					 | 
					 | 
					 | 
					        Dispatcher _dispatcher;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public int CurPoints;
 | 
					 | 
					 | 
					 | 
					        public int CurPoints;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int _channelCount = 0;         
 | 
					 | 
					 | 
					 | 
					        int _channelCount = 0;         
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int _samplingFrequency = 1000;  // 采样频率 (Hz).
 | 
					 | 
					 | 
					 | 
					        int _samplingFrequency = 500;  // 采样频率 (Hz).
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        WavesModel _wavesModel;
 | 
					 | 
					 | 
					 | 
					        WavesModel _wavesModel;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private int _lChartCount = 1;
 | 
					 | 
					 | 
					 | 
					        private int _lChartCount = 1;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public ConcurrentQueue<StationModel> smList=new ConcurrentQueue<StationModel>();
 | 
					 | 
					 | 
					 | 
					        public ConcurrentQueue<StationModel> smList=new ConcurrentQueue<StationModel>();
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -302,14 +302,6 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                YasixZENVisible(".E", SHEChannel);
 | 
					 | 
					 | 
					 | 
					                YasixZENVisible(".E", SHEChannel);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                YasixZENVisible(".N", SHNChannel);
 | 
					 | 
					 | 
					 | 
					                YasixZENVisible(".N", SHNChannel);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _lChartAll.EndUpdate();
 | 
					 | 
					 | 
					 | 
					                _lChartAll.EndUpdate();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //if (index * 30 < 800)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //{
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //    ChartHeight = 800;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //else
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //{
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //    ChartHeight = index * 50;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -503,15 +495,15 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    IsEnableStartRealtime = false;
 | 
					 | 
					 | 
					 | 
					                    IsEnableStartRealtime = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    IsEnableStopRealtime = true;
 | 
					 | 
					 | 
					 | 
					                    IsEnableStopRealtime = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _data = new double[smList.Count * 3][];
 | 
					 | 
					 | 
					 | 
					                    _data = new double[smList.Count * 3][];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    beginTime = DateTime.Now.AddSeconds(-0.5);
 | 
					 | 
					 | 
					 | 
					                    beginTime = DateTime.Now.AddSeconds(-30.5);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    currentTime = beginTime;
 | 
					 | 
					 | 
					 | 
					                    currentTime = beginTime;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (AxisValueType.DateTime == LChartALL.ViewXY.XAxes[0].ValueType)
 | 
					 | 
					 | 
					 | 
					                    if (AxisValueType.DateTime == LChartALL.ViewXY.XAxes[0].ValueType)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        DateTime MaxDateTime = currentTime.AddSeconds(_samplingFrequency == 1000 ? 30 : 60);
 | 
					 | 
					 | 
					 | 
					                        DateTime MaxDateTime = currentTime.AddSeconds(30);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        LChartALL.ViewXY.XAxes[0].SetRange(LChartALL.ViewXY.XAxes[0].DateTimeToAxisValue(currentTime), LChartALL.ViewXY.XAxes[0].DateTimeToAxisValue(MaxDateTime));
 | 
					 | 
					 | 
					 | 
					                        LChartALL.ViewXY.XAxes[0].SetRange(LChartALL.ViewXY.XAxes[0].DateTimeToAxisValue(currentTime), LChartALL.ViewXY.XAxes[0].DateTimeToAxisValue(MaxDateTime));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    LChartALL.ViewXY.DropOldSeriesData = true;
 | 
					 | 
					 | 
					 | 
					                    LChartALL.ViewXY.DropOldSeriesData = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    //Set real-time monitoring automatic old data destruction
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _pointsAppended = LChartALL.ViewXY.XAxes[0].Minimum;
 | 
					 | 
					 | 
					 | 
					                    _pointsAppended = LChartALL.ViewXY.XAxes[0].Minimum;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _lChartAll.ViewXY.XAxes[0].ScrollPosition = _pointsAppended;
 | 
					 | 
					 | 
					 | 
					                    _lChartAll.ViewXY.XAxes[0].ScrollPosition = _pointsAppended;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -573,8 +565,8 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            string[] sid = asciiData.sid.Substring(5).Split('_');
 | 
					 | 
					 | 
					 | 
					            string[] sid = asciiData.sid.Substring(5).Split('_');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            string name = $"{sid[0]}.{sid[1]}.{sid[2]}.{sid[3]}{sid[4]}{sid[5]}";
 | 
					 | 
					 | 
					 | 
					            string name = $"{sid[0]}.{sid[1]}.{sid[2]}.{sid[3]}{sid[4]}{sid[5]}";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var ts = DateTime.Now.Subtract(startTime);
 | 
					 | 
					 | 
					 | 
					            var ts = DateTime.Now.Subtract(startTime);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //System.Diagnostics.Debug.WriteLine($"台站号:{name},总数:{asciiData.samprate},{asciiData.datasize},{asciiData.samplecnt}, {asciiData.numsamples},当前时间:{DateTime.Now.ToString("o")},接时间:{startTime.ToString("o")}********时间差:{ts.TotalSeconds}秒");
 | 
					 | 
					 | 
					 | 
					            System.Diagnostics.Debug.WriteLine($"台站号:{name},总数:{asciiData.samprate},{asciiData.datasize},{asciiData.samplecnt}, {asciiData.numsamples},当前时间:{DateTime.Now.ToString("o")},接时间:{startTime.ToString("o")}********时间差:{ts.TotalSeconds}秒");
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if ( ts.TotalSeconds > 10)
 | 
					 | 
					 | 
					 | 
					            if ( ts.TotalSeconds > 20)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return;
 | 
					 | 
					 | 
					 | 
					                return;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -612,7 +604,7 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            while (true)
 | 
					 | 
					 | 
					 | 
					            while (true)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var flag = subNameList[name].DataOrders.TryPeek(out ChartSamples dataOrder);
 | 
					 | 
					 | 
					 | 
					                var flag = subNameList[name].DataOrders.TryPeek(out ChartSamples dataOrder);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (flag && DateTime.Now.Subtract(dataOrder.StartTime).TotalSeconds > 35)
 | 
					 | 
					 | 
					 | 
					                if (flag && DateTime.Now.Subtract(dataOrder.StartTime).TotalSeconds > 60)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    //删除过期数据
 | 
					 | 
					 | 
					 | 
					                    //删除过期数据
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    subNameList[name].DataOrders.TryDequeue(out ChartSamples chart);
 | 
					 | 
					 | 
					 | 
					                    subNameList[name].DataOrders.TryDequeue(out ChartSamples chart);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -722,11 +714,8 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //设置X轴的开始时间
 | 
					 | 
					 | 
					 | 
					                //设置X轴的开始时间
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                v.XAxes[0].AutoFormatLabels = false;
 | 
					 | 
					 | 
					 | 
					                v.XAxes[0].AutoFormatLabels = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                v.XAxes[0].LabelsTimeFormat = "HH:mm:ss.f";
 | 
					 | 
					 | 
					 | 
					                v.XAxes[0].LabelsTimeFormat = "HH:mm:ss.f";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					               // v.XAxes[0].DateOriginYear = beginTime.Year;
 | 
					 | 
					 | 
					 | 
					             //  DateTime MaxDateTime = beginTime.AddSeconds(30);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              //  v.XAxes[0].DateOriginDay = beginTime.Day;
 | 
					 | 
					 | 
					 | 
					               //v.XAxes[0].SetRange(v.XAxes[0].DateTimeToAxisValue(beginTime), v.XAxes[0].DateTimeToAxisValue(MaxDateTime));
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              //  v.XAxes[0].DateOriginMonth = beginTime.Month;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					               DateTime MaxDateTime = beginTime.AddSeconds(_samplingFrequency == 1000? 30 : 60);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					               v.XAxes[0].SetRange(v.XAxes[0].DateTimeToAxisValue(beginTime), v.XAxes[0].DateTimeToAxisValue(MaxDateTime));
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            double firstSampleTimeStamp = v.XAxes[0].DateTimeToAxisValue(beginTime);
 | 
					 | 
					 | 
					 | 
					            double firstSampleTimeStamp = v.XAxes[0].DateTimeToAxisValue(beginTime);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -774,7 +763,7 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                series.SampleFormat = SampleFormat.DoubleFloat;
 | 
					 | 
					 | 
					 | 
					                series.SampleFormat = SampleFormat.DoubleFloat;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     
 | 
					 | 
					 | 
					 | 
					     
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                string subName = string.Empty;
 | 
					 | 
					 | 
					 | 
					                string subName = string.Empty;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                string name = axisY.Title.Text.Substring(0,4);
 | 
					 | 
					 | 
					 | 
					                string name = axisY.Title.Text.Substring(0,3);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (seriesIndex % 3 == 0)
 | 
					 | 
					 | 
					 | 
					                if (seriesIndex % 3 == 0)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    subName = $"{workarea.StationConfig.Network}.{name}.{workarea.StationConfig.Location}." +
 | 
					 | 
					 | 
					 | 
					                    subName = $"{workarea.StationConfig.Network}.{name}.{workarea.StationConfig.Location}." +
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -935,25 +924,20 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					;            foreach (var item in subNameList)
 | 
					 | 
					 | 
					 | 
					;            foreach (var item in subNameList)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                List<double> temDou = new List<double>();
 | 
					 | 
					 | 
					 | 
					                List<double> temDou = new List<double>();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var tem = item.Value.DataOrders.Where(d => d.StartTime > currentTime.AddSeconds(-30));
 | 
					 | 
					 | 
					 | 
					                var tem = item.Value.DataOrders.Where(d => d.StartTime > currentTime.AddSeconds(-30) && d.StartTime < currentTime.AddSeconds(0.5));
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (tem.Any())
 | 
					 | 
					 | 
					 | 
					                if (tem.Any())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    item.Value.FirstSampleTime = tem.ElementAt(0).StartTime;   //设置数据的开始时间
 | 
					 | 
					 | 
					 | 
					                    item.Value.FirstSampleTime = tem.ElementAt(0).StartTime;   //设置数据的开始时间
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    tem.ToList().ForEach(d => temDou.AddRange(d.DataArray));
 | 
					 | 
					 | 
					 | 
					                    tem.ToList().ForEach(d => temDou.AddRange(d.DataArray));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var time = (currentTime - tem.Last().StartTime).Duration();
 | 
					 | 
					 | 
					 | 
					   
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (time.TotalSeconds > 2 && time.TotalSeconds < 30)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        //中途未收数据填充均值
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        temDou.AddRange(Enumerable.Repeat(temDou.Average(), (int)time.TotalMilliseconds));
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _data[item.Value.Index] = temDou.ToArray();
 | 
					 | 
					 | 
					 | 
					                    _data[item.Value.Index] = temDou.ToArray();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                else
 | 
					 | 
					 | 
					 | 
					                else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    //没有收到数据的通道填充0
 | 
					 | 
					 | 
					 | 
					                    //没有收到数据的通道填充0
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var duration = (DateTime.Now - beginTime).Duration();
 | 
					 | 
					 | 
					 | 
					                    var duration = (currentTime - beginTime.AddSeconds(-1)).Duration();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    item.Value.FirstSampleTime = duration.TotalSeconds > 30 ? currentTime.AddSeconds(-29) : beginTime;
 | 
					 | 
					 | 
					 | 
					                    item.Value.FirstSampleTime = duration.TotalSeconds > 30 ? currentTime.AddSeconds(-29) : beginTime;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    int feed = duration.TotalSeconds > 30 ? 30 * 1000 : (int)duration.TotalMilliseconds;
 | 
					 | 
					 | 
					 | 
					                    int feed = duration.TotalSeconds > 30 ? 30 * _samplingFrequency : (int)duration.TotalSeconds* _samplingFrequency;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _data[item.Value.Index] = new double[feed];
 | 
					 | 
					 | 
					 | 
					                    _data[item.Value.Index] = new double[feed];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -988,8 +972,7 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var d = _lChartAll.ViewXY.XAxes[0].DateTimeToAxisValue(item.Value.FirstSampleTime);
 | 
					 | 
					 | 
					 | 
					                var d = _lChartAll.ViewXY.XAxes[0].DateTimeToAxisValue(item.Value.FirstSampleTime);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _lChartAll.ViewXY.SampleDataSeries[index].FirstSampleTimeStamp = d;// _lChartAll.ViewXY.XAxes[0].Minimum;// item.Value.FirstSampleTimeStamp;
 | 
					 | 
					 | 
					 | 
					                _lChartAll.ViewXY.SampleDataSeries[index].FirstSampleTimeStamp = d;// _lChartAll.ViewXY.XAxes[0].Minimum;// item.Value.FirstSampleTimeStamp;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //Append data to series
 | 
					 | 
					 | 
					 | 
					            Parallel.For(0, _channelCount, (seriesIndex) =>
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            System.Threading.Tasks.Parallel.For(0, _channelCount, (seriesIndex) =>
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                double[] thisSeriesData = _data[seriesIndex];
 | 
					 | 
					 | 
					 | 
					                double[] thisSeriesData = _data[seriesIndex];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -1004,137 +987,12 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            });
 | 
					 | 
					 | 
					 | 
					            });
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _pointsAppended += 1;
 | 
					 | 
					 | 
					 | 
					            _pointsAppended += 1;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //Set X axis real-time scrolling position 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            double lastX = _pointsAppended * XInterval;
 | 
					 | 
					 | 
					 | 
					            double lastX = _pointsAppended * XInterval;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _lChartAll.ViewXY.XAxes[0].ScrollPosition = lastX;
 | 
					 | 
					 | 
					 | 
					            _lChartAll.ViewXY.XAxes[0].ScrollPosition = lastX;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _lChartAll.EndUpdate();
 | 
					 | 
					 | 
					 | 
					            _lChartAll.EndUpdate();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //Append data point per round count
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private int _appendCountPerRound=30000;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //X axis length 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private double _xLen;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //Generate this many rounds of data 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private const int PreGenerateDataForRoundCount = 10;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //X data point step
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private const double XInterval = 1;
 | 
					 | 
					 | 
					 | 
					        private const double XInterval = 1;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //Data feeding round 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private int _iRound = 0;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //Y axis minimum 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private const double YMin = 0;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //Y axis maximum 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private const double YMax = 100;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private double[][] CreateInputData(int seriesCount, int appendCountPerRound)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //Create input data for all series. 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            double[][] data = new double[seriesCount][];
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //  System.Threading.Tasks.Parallel.For(0, seriesCount, (seriesIndex) =>
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                int dataPointCount = PreGenerateDataForRoundCount * appendCountPerRound;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                double[] seriesData = new double[dataPointCount];
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                float seriesIndexPlus1 = seriesIndex + 1;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                Random rand = new Random((int)DateTime.Now.Ticks / (seriesIndex + 1));
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                double y = 50;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                for (int i = 0; i < dataPointCount; i++)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    y = y - 0.05 + rand.NextDouble() / 10.0;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (y > YMax)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        y = YMax;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (y < YMin)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        y = YMin;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    seriesData[i] = (float)y;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                data[seriesIndex] = seriesData;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }//);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return data;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void PrefillChartWithData()
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            /*  test  
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _lChartAll.BeginUpdate();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _data = CreateInputData(smList.Count * 3, _appendCountPerRound);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            LChartALL.ViewXY.DropOldSeriesData = true;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _pointsAppended = LChartALL.ViewXY.XAxes[0].Minimum;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            time.Elapsed -= CompositionTarget_Rendering;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            time.Elapsed += CompositionTarget_Rendering;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            LChartALL.ViewXY.XAxes[0].ScrollMode = XAxisScrollMode.Scrolling;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            LChartALL.ViewXY.AxisLayout.AutoShrinkSegmentsGap = true;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _lChartAll.EndUpdate();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            time.Start();*/
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //Set data almost till the end, 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //so it will reach end and start scrolling quite soon. 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //How many rounds to prefill in the series 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            int roundsToPrefill = 50;// (int)(0.9 * _xLen) / _appendCountPerRound;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //How many points to prefill in the series
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            int pointCount = roundsToPrefill * _appendCountPerRound;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            System.Threading.Tasks.Parallel.For(0, _channelCount, (seriesIndex) =>
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                double[] thisSeriesData = _data[seriesIndex];
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                for (int round = 0; round < roundsToPrefill; round++)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    float[] dataArray = new float[_appendCountPerRound];
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    Array.Copy(thisSeriesData, (round % PreGenerateDataForRoundCount) * _appendCountPerRound, dataArray, 0, _appendCountPerRound);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _lChartAll.ViewXY.SampleDataBlockSeries[seriesIndex].AddSamples(dataArray, false);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            });
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _pointsAppended += pointCount;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _iRound += roundsToPrefill;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //Set X axis real-time scrolling position 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            double lastX = _pointsAppended * XInterval;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _lChartAll.ViewXY.XAxes[0].ScrollPosition = lastX;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void FeedDataTest(/*string chartTitleText*/)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (_lChartAll != null)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _lChartAll.BeginUpdate();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                foreach (var item in _lChartAll.ViewXY.SampleDataSeries)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    item.Clear();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    item.FirstSampleTimeStamp =  _lChartAll.ViewXY.XAxes[0].Minimum;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    //Append data to series
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                 System.Threading.Tasks.Parallel.For(0, _channelCount, (seriesIndex) =>
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    double[] thisSeriesData = _data[seriesIndex];
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    double[] dataToAppendNow = new double[_appendCountPerRound];
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    Array.Copy(thisSeriesData, (_iRound % PreGenerateDataForRoundCount) * _appendCountPerRound, dataToAppendNow, 0, _appendCountPerRound);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _lChartAll.ViewXY.YAxes[seriesIndex].SetRange(dataToAppendNow.Min(), dataToAppendNow.Max());
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _lChartAll.ViewXY.SampleDataSeries[seriesIndex].AddSamples(dataToAppendNow, false);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    System.Diagnostics.Debug.WriteLine("***********index:{0}, pointCount:{1}", seriesIndex,
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                      _lChartAll.ViewXY.SampleDataSeries[seriesIndex].PointCount);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                });
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _pointsAppended += 1;//;_appendCountPerRound;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //Set X axis real-time scrolling position 
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                double lastX = _pointsAppended * XInterval;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _lChartAll.ViewXY.XAxes[0].ScrollPosition = lastX;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _lChartAll.EndUpdate();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _iRound++;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private DateTime GetTime()
 | 
					 | 
					 | 
					 | 
					        private DateTime GetTime()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |