|
|
@ -8,6 +8,7 @@ using mseedChart.MainModule.Models;
|
|
|
|
using Prism.Commands;
|
|
|
|
using Prism.Commands;
|
|
|
|
using Prism.Events;
|
|
|
|
using Prism.Events;
|
|
|
|
using Prism.Mvvm;
|
|
|
|
using Prism.Mvvm;
|
|
|
|
|
|
|
|
using SharpDX.Direct2D1;
|
|
|
|
using SharpDX.DirectWrite;
|
|
|
|
using SharpDX.DirectWrite;
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections;
|
|
|
@ -154,13 +155,42 @@ namespace mseedChart.MainModule.ViewModels
|
|
|
|
|
|
|
|
|
|
|
|
public StationEventJson CurrentEventTime
|
|
|
|
public StationEventJson CurrentEventTime
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
get { return _currentEventTime; }
|
|
|
|
get { return _currentEventTime; }
|
|
|
|
set { _currentEventTime = value; }
|
|
|
|
set { _currentEventTime = value; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<string> _stationYaxis;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<string> StationYaxis
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get { return _stationYaxis; }
|
|
|
|
|
|
|
|
set {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetProperty(ref _stationYaxis, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int _selectStationYaxisIndex;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int SelectStationYaxisIndex
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get { return _selectStationYaxisIndex; }
|
|
|
|
|
|
|
|
set {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetProperty(ref _selectStationYaxisIndex, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private bool _stationYaxisIsChecked;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool StationYaxisIsChecked
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get { return _stationYaxisIsChecked; }
|
|
|
|
|
|
|
|
set {
|
|
|
|
|
|
|
|
StationYaxisVisible(value);
|
|
|
|
|
|
|
|
SetProperty(ref _stationYaxisIsChecked , value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 事件
|
|
|
|
#region 事件
|
|
|
@ -310,14 +340,36 @@ namespace mseedChart.MainModule.ViewModels
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_lChartAll.ViewXY.XAxes[0].MajorDivCount = XaisInterval;
|
|
|
|
_lChartAll.ViewXY.XAxes[0].MajorDivCount = XaisInterval;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_lChartAll.EndUpdate();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void StationYaxisVisible(bool visible)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_lChartAll != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_lChartAll.BeginUpdate();
|
|
|
|
|
|
|
|
bool yAxesVisible = ((bool)visible == true);
|
|
|
|
|
|
|
|
ViewXY v = _lChartAll.ViewXY;
|
|
|
|
|
|
|
|
for (int i = 0; i < v.YAxes.Count; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AxisY axisY = v.YAxes[i];
|
|
|
|
|
|
|
|
if (axisY.Title.Text.Contains(StationYaxis[SelectStationYaxisIndex]))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
axisY.Visible = !yAxesVisible;
|
|
|
|
|
|
|
|
v.SampleDataSeries[i].Visible = !yAxesVisible;
|
|
|
|
|
|
|
|
int index = v.LineCollections.FindIndex(a => a.AssignYAxisIndex == i);
|
|
|
|
|
|
|
|
if (index != -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
v.LineCollections[index].Visible = !yAxesVisible;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_lChartAll.EndUpdate();
|
|
|
|
_lChartAll.EndUpdate();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
public List<StationModel> UpdateWavesFromTxt(string fn)
|
|
|
|
public List<StationModel> UpdateWavesFromTxt(string fn)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -505,11 +557,11 @@ namespace mseedChart.MainModule.ViewModels
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_channelCount = smList.Count * 3;
|
|
|
|
_channelCount = smList.Count * 3;
|
|
|
|
|
|
|
|
StationYaxis = smList.Select(a => a.Name).ToList();
|
|
|
|
UpdateChart();
|
|
|
|
UpdateChart();
|
|
|
|
UpdateChartData();
|
|
|
|
UpdateChartData();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdateChart()
|
|
|
|
private void UpdateChart()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ViewXY v= LChartALL.ViewXY;
|
|
|
|
ViewXY v= LChartALL.ViewXY;
|
|
|
|