数据正常显示

master
mzhifa 1 year ago
parent bf42d19e39
commit 80fe6835e1

@ -25,7 +25,7 @@ namespace StartServerWPF.Modules.MseedChart.Models
//添加Z分量波形 //添加Z分量波形
if (item.dz.Count > 0) if (item.dz.Count > 0)
{ {
axisY.SetRange(2000, 5000); axisY.SetRange(0, 5000);
} }
axisY.Title.Text = string.Format("Ch{0}.Z", item.Name); axisY.Title.Text = string.Format("Ch{0}.Z", item.Name);
axisY.Title.DistanceToAxis = distancetoX; axisY.Title.DistanceToAxis = distancetoX;
@ -34,7 +34,7 @@ namespace StartServerWPF.Modules.MseedChart.Models
axisY = new AxisY(curChart.ViewXY); axisY = new AxisY(curChart.ViewXY);
if (item.dn.Count > 0) if (item.dn.Count > 0)
{ {
axisY.SetRange(2000, 5000); axisY.SetRange(0, 5000);
} }
axisY.Title.Text = string.Format("Ch{0}.N", item.Name); axisY.Title.Text = string.Format("Ch{0}.N", item.Name);
axisY.Title.DistanceToAxis = distancetoX; axisY.Title.DistanceToAxis = distancetoX;

@ -1,4 +1,5 @@
using System; using ServiceStack;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -37,4 +38,21 @@ namespace StartServerWPF.Modules.MseedChart
public char samplesize; public char samplesize;
public System.IntPtr datasamples; //!< Data samples, \a numsamples of type \a sampletype public System.IntPtr datasamples; //!< Data samples, \a numsamples of type \a sampletype
} }
public class ASCiiData
{
public int Index { set; get; }
public string sid { set; get; }
public double samprate { set; get; }
public Int64 numsamples { set; get; }
public Dictionary<double, double[]> datas { get; }=new Dictionary<double, double[]>();
public void AddData(double oaTime, double[] da)
{
if(datas.Count>=100)
{
datas.RemoveKey(0);
}
datas.Add(oaTime, da);
}
}
} }

@ -247,6 +247,7 @@ namespace ZhaoXi.Advanced.MyRedis.Service
public void Subscribe(string channel, Action<string, byte[], IRedisSubscription> actionOnMessage) public void Subscribe(string channel, Action<string, byte[], IRedisSubscription> actionOnMessage)
{ {
var subscription = base.iClient.CreateSubscription(); var subscription = base.iClient.CreateSubscription();
subscription.OnSubscribe = c => subscription.OnSubscribe = c =>
{ {
Console.WriteLine($"订阅频道{c}"); Console.WriteLine($"订阅频道{c}");
@ -260,13 +261,12 @@ namespace ZhaoXi.Advanced.MyRedis.Service
}; };
subscription.OnMessageBytes += (c, s) => subscription.OnMessageBytes += (c, s) =>
{ {
// ByteToFile(s, "test.mseed"); // ByteToFile(s, "test.mseed");
actionOnMessage(c, s, subscription); actionOnMessage(c, s, subscription);
}; };
Console.WriteLine($"开始启动监听 {channel}"); Console.WriteLine($"开始启动监听 {channel}");
subscription.SubscribeToChannels(channel); //blocking subscription.SubscribeToChannels(channel); //blocking
} }
public void UnSubscribeFromChannels(string channel) public void UnSubscribeFromChannels(string channel)
{ {
var subscription = base.iClient.CreateSubscription(); var subscription = base.iClient.CreateSubscription();
@ -274,7 +274,7 @@ namespace ZhaoXi.Advanced.MyRedis.Service
//subscription.UnSubscribeFromAllChannels(); //subscription.UnSubscribeFromAllChannels();
} }
public static bool ByteToFile(byte[] byteArray, string fileName) public bool ByteToFile(byte[] byteArray, string fileName)
{ {
bool result = false; bool result = false;
try try

@ -3,25 +3,20 @@ using Arction.Wpf.Charting.Axes;
using Arction.Wpf.Charting.SeriesXY; using Arction.Wpf.Charting.SeriesXY;
using Arction.Wpf.Charting.Views.ViewXY; using Arction.Wpf.Charting.Views.ViewXY;
using Microsoft.Win32; using Microsoft.Win32;
using StartServerWPF.Modules.MseedChart.Models;
using Prism.Commands; using Prism.Commands;
using Prism.Events;
using Prism.Mvvm; using Prism.Mvvm;
using SharpDX.Direct2D1; using Prism.Regions;
using SharpDX.DirectWrite; using ServiceStack;
using StartServerWPF.Assets;
using StartServerWPF.Modules.MseedChart.Models;
using System; using System;
using System.Collections;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel; using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http.Headers; using System.Runtime.InteropServices;
using System.Reflection;
using System.Security.Cryptography;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
@ -29,18 +24,9 @@ using System.Windows.Controls;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Markup; using System.Windows.Markup;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Threading; using System.Windows.Threading;
using System.Xml.Linq; using System.Xml.Linq;
using Prism.Regions;
using static System.Collections.Specialized.BitVector32;
using ZhaoXi.Advanced.MyRedis.Service; using ZhaoXi.Advanced.MyRedis.Service;
using ServiceStack;
using ServiceStack.Redis;
using Arction.Licensing;
using System.Runtime.InteropServices;
using StartServerWPF.Assets;
using ServiceStack.Text;
namespace StartServerWPF.Modules.MseedChart.ViewModels namespace StartServerWPF.Modules.MseedChart.ViewModels
{ {
@ -71,6 +57,9 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
public ConcurrentQueue<StationModel> smList=new ConcurrentQueue<StationModel>(); public ConcurrentQueue<StationModel> smList=new ConcurrentQueue<StationModel>();
public List<AxisY> _chartAxisY=new List<AxisY>(); public List<AxisY> _chartAxisY=new List<AxisY>();
// Dictionary<string, ASCiiData> cacheChartDic=new Dictionary<string, ASCiiData>();
Dictionary<string, ASCiiData> subNameList;
#endregion #endregion
#region 属性 #region 属性
@ -260,26 +249,24 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
public DelegateCommand IntervalSureCommand => new DelegateCommand(IntervalSure); public DelegateCommand IntervalSureCommand => new DelegateCommand(IntervalSure);
public DelegateCommand<object> RealTimeDataCommand => new DelegateCommand<object>(RealTimeData); public DelegateCommand<object> RealTimeDataCommand => new DelegateCommand<object>(RealTimeData);
Dictionary<string,int> subNameList;
private void Loaded() private void Loaded()
{ {
//N08,N25,N26 //N08,N25,N26
string station = "N05,N10";
var stations = GlobalData.StationNames;// station.Split(','); var stations = GlobalData.StationNames;// station.Split(',');
smList = _wavesModel.ReadWavesFromJson(stations); smList = _wavesModel.ReadWavesFromJson(stations);
subNameList = new Dictionary<string, ASCiiData>();
} }
private void UnLoaded() private void UnLoaded()
{ {
time.Stop(); time.Stop();
using (RedisListService service = new RedisListService()) if(subNameList == null) return;
foreach (var subName in subNameList)
{ {
if (subNameList != null) using (RedisListService service = new RedisListService())
{ {
foreach (var subName in subNameList) //停止订阅
{ service.Publish(subName.Key, "shutoff");
service.UnSubscribeFromChannels(subName.Key);
}
} }
} }
} }
@ -488,10 +475,9 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
_lChartAll.EndUpdate(); _lChartAll.EndUpdate();
} }
} }
int i = 1;
private void RealTimeData(object isCheck) private void RealTimeData(object isCheck)
{ {
_channelCount = smList.Count * 3; _channelCount = smList.Count * 3;
CurrentTime = smList.First().BeginTime.ToShortDateString(); CurrentTime = smList.First().BeginTime.ToShortDateString();
StationsName = smList.Select(a => new StationAxis { Name = a.Name, IsChecked = true, SelectCommand = new DelegateCommand<object>(StationsNameVisible) }).ToList(); StationsName = smList.Select(a => new StationAxis { Name = a.Name, IsChecked = true, SelectCommand = new DelegateCommand<object>(StationsNameVisible) }).ToList();
@ -515,25 +501,32 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
time.Elapsed -= CompositionTarget_Rendering; time.Elapsed -= CompositionTarget_Rendering;
time.Elapsed += CompositionTarget_Rendering; time.Elapsed += CompositionTarget_Rendering;
LChartALL.ViewXY.XAxes[0].ScrollMode = XAxisScrollMode.Scrolling; LChartALL.ViewXY.XAxes[0].ScrollMode = XAxisScrollMode.Scrolling;
time.Start(); Task.Run(() =>
{
Thread.Sleep(5000);
time.Start();
});
using (RedisListService service = new RedisListService()) using (RedisListService service = new RedisListService())
{ {
foreach (var subName in subNameList) service.FlushAll();
{
service.UnSubscribeFromChannels(subName.Key);
}
} }
foreach (var subName in subNameList) foreach (var subName in subNameList)
{ {
Task.Run(() => Task.Run(() =>
{ {
Debug.WriteLine($"注册{1}:{subName.Key}");
using (RedisListService service = new RedisListService()) using (RedisListService service = new RedisListService())
{ {
service.Subscribe(subName.Key, (c, message, iRedisSubscription) => Debug.WriteLine($"注册{1}:{subName.Key}");
{ {
Mseed2asciiApi.bufferMseedData(message.Length, message); service.Subscribe(subName.Key, (c, message, iRedisSubscription) =>
}); {
if(message.Length==7 && System.Text.Encoding.Default.GetString(message)== "shutoff")
{
iRedisSubscription.UnSubscribeFromChannels(subName.Key);
}
Mseed2asciiApi.bufferMseedData(message.Length, message);
});
}
} }
}); });
} }
@ -543,11 +536,11 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
time.Stop(); time.Stop();
time.Elapsed -= CompositionTarget_Rendering; time.Elapsed -= CompositionTarget_Rendering;
LChartALL.ViewXY.XAxes[0].ScrollMode = XAxisScrollMode.None; LChartALL.ViewXY.XAxes[0].ScrollMode = XAxisScrollMode.None;
using (RedisListService service = new RedisListService()) foreach (var subName in subNameList)
{ {
foreach (var subName in subNameList) using (RedisListService service = new RedisListService())
{ {
service.UnSubscribeFromChannels(subName.Key); service.Publish(subName.Key, "shutoff");
} }
} }
} }
@ -558,10 +551,8 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
private void Mseed2AsciiEvent(AsciiDataStruct asciiData) private void Mseed2AsciiEvent(AsciiDataStruct asciiData)
{ {
DateTime startTime= Convert.ToDateTime(asciiData.endtime).AddHours(8); DateTime startTime = Convert.ToDateTime(asciiData.endtime).AddHours(8);
DateTime endTime = Convert.ToDateTime(asciiData.endtime).AddHours(8); DateTime endTime = Convert.ToDateTime(asciiData.endtime).AddHours(8);
Debug.WriteLine($"注册{asciiData.sid}:{startTime}");
var time = endTime - startTime;
byte[] bytes = new byte[asciiData.numsamples * asciiData.samplesize]; byte[] bytes = new byte[asciiData.numsamples * asciiData.samplesize];
// IntPtr bufferHandler = Marshal.AllocHGlobal((int)asciiData.datasize); // IntPtr bufferHandler = Marshal.AllocHGlobal((int)asciiData.datasize);
Marshal.Copy(asciiData.datasamples, bytes, 0, bytes.Length); Marshal.Copy(asciiData.datasamples, bytes, 0, bytes.Length);
@ -595,8 +586,8 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
lines.Add(b); lines.Add(b);
} }
} }
string lineStr= String.Join(",", lines); Debug.WriteLine($"接收:{asciiData.sid}:{startTime},count:{lines.Count}");
string lineStr = String.Join(",", lines);
using (RedisListService service = new RedisListService()) using (RedisListService service = new RedisListService())
{ {
service.LPush(name, lineStr); service.LPush(name, lineStr);
@ -661,7 +652,6 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
private void StartChart() private void StartChart()
{ {
DisposeAllAndClear(_chartAxisY); DisposeAllAndClear(_chartAxisY);
subNameList = new Dictionary<string, int>();
ViewXY v = LChartALL.ViewXY; ViewXY v = LChartALL.ViewXY;
LChartALL.SizeChanged -= LChartALL_SizeChanged; LChartALL.SizeChanged -= LChartALL_SizeChanged;
LChartALL.SizeChanged += LChartALL_SizeChanged; LChartALL.SizeChanged += LChartALL_SizeChanged;
@ -702,7 +692,11 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
int count = stationModel.Dzne.Count; int count = stationModel.Dzne.Count;
int number= smList.Count*3; int number= smList.Count*3;
bool isAdd = false;
if (subNameList.Count == 0)
{
isAdd = true;
}
for (int i = 0; i < number; i++) for (int i = 0; i < number; i++)
{ {
int seriesIndex = i; int seriesIndex = i;
@ -755,7 +749,10 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
subName = $"HA.{name}.06.SHE"; subName = $"HA.{name}.06.SHE";
series.LineStyle.Color = System.Windows.Media.Colors.ForestGreen; series.LineStyle.Color = System.Windows.Media.Colors.ForestGreen;
} }
subNameList.Add(subName,i); if (isAdd)
{
subNameList.Add(subName, new ASCiiData { Index = i, sid = subName });
}
series.LineStyle.Width = 0.2; series.LineStyle.Width = 0.2;
series.ScrollModePointsKeepLevel = 1; series.ScrollModePointsKeepLevel = 1;
//series.ScrollingStabilizing = true; //series.ScrollingStabilizing = true;
@ -867,73 +864,166 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
{ {
RenderNextFrame(); RenderNextFrame();
} }
static double currentOATime = 0;
List<string> tempData = new List<string>();
private void RenderNextFrame() private void RenderNextFrame()
{ {
Debug.WriteLine("timeFrame:{0}", DateTime.Now); Stopwatch stopwatch = Stopwatch.StartNew();
string minName = string.Empty;
if (_lChartAll == null) if (_lChartAll == null)
{ {
return; return;
} }
using (RedisListService service = new RedisListService()) List<double> datasStr = new List<double>();
//计算数据中最小时间
if (currentOATime == 0)
{ {
double minTime = DateTime.Now.AddHours(1).ToOADate();
string name = string.Empty;
foreach (var item in subNameList) foreach (var item in subNameList)
{ {
List<double> dataDouList = new List<double>(); List<double> dataDouList = new List<double>();
using (RedisListService service = new RedisListService())
{
var data = service.Get(item.Key, 0, 0).FirstOrDefault();
if (data != null)
{
datasStr = data.Split(',').Select(a => Convert.ToDouble(a)).ToList();
double oaTime = datasStr.First();
if (oaTime < minTime)
{
minTime = oaTime;
currentOATime = oaTime;
name=item.Key;
}
}
}
}
if (currentOATime == 0) return;
Debug.WriteLine("currentTimeFirst:{0},now:{1},sid:{2},count:{3}", DateTime.FromOADate(currentOATime),DateTime.Now, name, datasStr.Count);
}
else
{
//更新图表数据时间,每秒刷新一次
currentOATime = DateTime.FromOADate(currentOATime).AddSeconds(1).ToOADate();
}
foreach (var item in subNameList)
{
using (RedisListService service = new RedisListService())
{
var data = service.Get(item.Key, 0, 0).FirstOrDefault(); var data = service.Get(item.Key, 0, 0).FirstOrDefault();
if( data != null) if (data != null)
{ {
IEnumerable<double> datasStr = data.Split(',').Select(a => Convert.ToDouble(a)); datasStr = data.Split(',').Select(a => Convert.ToDouble(a)).ToList();
double oaTime = datasStr.First(); DateTime firstTime = DateTime.FromOADate(datasStr.First());
if (oaTime < DateTime.Now.AddSeconds(-3).ToOADate()) DateTime currentTime = DateTime.FromOADate(currentOATime);
datasStr.RemoveAt(0);
if (Math.Abs((currentTime - firstTime).TotalSeconds) < 1 && firstTime.Second == currentTime.Second)
{ {
//取出队列数据
service.RemoveStartFromList(item.Key); service.RemoveStartFromList(item.Key);
var DouData = data.Split(',').Select(a => Convert.ToDouble(a)).ToList(); _data[item.Value.Index] = datasStr.ToArray();
DouData.RemoveAt(0); }
dataDouList.AddRange(DouData); else if ((currentTime - firstTime).TotalSeconds < 0)
{
_data[item.Value.Index] = new double[datasStr.Count];
}
else if ((currentTime - firstTime).TotalSeconds > 0)
{
firstTime.AddMilliseconds(-firstTime.Millisecond);
//出更数据需要重新绘图表点
_data[item.Value.Index] = new double[datasStr.Count];
int offset = (int)(currentTime - firstTime).TotalSeconds;
while (offset > 0)
{
service.RemoveStartFromList(item.Key);
tempData.Add(item.Key+ firstTime);
if (offset < 100)
{
// 不能超过缓存数, 更新数据
var time = currentTime.AddSeconds(-offset);
var tem = item.Value.datas[time.ToOADate()];
item.Value.datas[time.ToOADate()] = datasStr.ToArray();
}
data = service.Get(item.Key, 0, 0).FirstOrDefault();
if (data == null) break;
datasStr = data.Split(',').Select(a => Convert.ToDouble(a)).ToList();
firstTime = DateTime.FromOADate(datasStr.First());
offset = (int)(currentTime - firstTime).TotalSeconds;
datasStr.RemoveAt(0);
Debug.WriteLine("timeMinData:{0},Time1:{1},sid:{2},offset:{3}", currentTime, firstTime, item.Key, offset);
}
} }
else else
{ {
break; throw new Exception($"数据解析异常:{item.Key},{currentTime},{firstTime}");
} }
//继续查看数据
// data = service.Get(item.Key, 0, 0).FirstOrDefault();
} }
// data =service.BlockingDequeueItemFromList(item.Key, TimeSpan.FromMilliseconds(5)); else
if (dataDouList.Count!=0)
{ {
_data[item.Value] =dataDouList.ToArray(); _data[item.Value.Index] = new double[500];
} }
} }
item.Value.AddData(currentOATime, _data[item.Value.Index]);
} }
// if (_data.ToList().Any(d => d != null)) stopwatch.Stop();
double time1 = stopwatch.ElapsedMilliseconds;
stopwatch.Start();
bool isRefresh = false;
//有新数据开始刷新
if (tempData.Count > 5)
{ {
_dispatcher.Invoke(() => List<double> temDou = new List<double>();
{ foreach (var item in subNameList)
FeedData(/*chartTitleText*/); {
}); var d = item.Value.datas.Keys.OrderBy(a => a).ToArray();
for (int i = 0; i < d.Count(); i++)
{
temDou.AddRange(item.Value.datas[d[i]]);
}
// _data[item.Value.Index] = temDou.ToArray();
// DateTime time1 = DateTime.Now.AddMinutes(i++);
// _lChartAll.ViewXY.XAxes[0].SetRange(_lChartAll.ViewXY.XAxes[0].DateTimeToAxisValue(time1),
// _lChartAll.ViewXY.XAxes[0].DateTimeToAxisValue(time1.AddSeconds(60)));
}
// isRefresh = true;
tempData.Clear();
} }
_dispatcher.Invoke(() =>
{
FeedData(isRefresh /*chartTitleText*/);
});
stopwatch.Stop();
double time2 = stopwatch.ElapsedMilliseconds;
Debug.WriteLine("timeFrame:{0},time1:{1},time1:{2}", DateTime.FromOADate(currentOATime), time1, time2);
} }
int _iRound = 0; int _iRound = 0;
double _pointsAppended = 0; double _pointsAppended = 0;
double[][] _data; double[][] _data;
private void FeedData() private void FeedData(bool isRefresh)
{ {
if (_lChartAll != null) if (_lChartAll != null)
{ {
_lChartAll.BeginUpdate(); _lChartAll.BeginUpdate();
if(isRefresh)
{
for (int seriesIndex = 0; seriesIndex < _channelCount; seriesIndex++)
{
_lChartAll.ViewXY.SampleDataSeries[seriesIndex].Clear();
}
}
//Append data to series //Append data to series
for (int seriesIndex = 0; seriesIndex < _channelCount; seriesIndex++) for (int seriesIndex = 0; seriesIndex < _channelCount; seriesIndex++)
{ {
double[] thisSeriesData = _data[seriesIndex]; double[] thisSeriesData = _data[seriesIndex];
if (thisSeriesData == null) continue; if(thisSeriesData==null)
{
}
_lChartAll.ViewXY.SampleDataSeries[seriesIndex].AddSamples(thisSeriesData, false); _lChartAll.ViewXY.SampleDataSeries[seriesIndex].AddSamples(thisSeriesData, false);
_data[seriesIndex] = null; _data[seriesIndex] = null;
System.Diagnostics.Debug.WriteLine("***********index:{0}, pointCount:{1},time:{2}", seriesIndex, // System.Diagnostics.Debug.WriteLine("***********index:{0}, pointCount:{1},time:{2}", seriesIndex,
_lChartAll.ViewXY.SampleDataSeries[seriesIndex].PointCount, DateTime.Now); // _lChartAll.ViewXY.SampleDataSeries[seriesIndex].PointCount, DateTime.Now);
} }
//System.Threading.Tasks.Parallel.For(0, _channelCount, (seriesIndex) => //System.Threading.Tasks.Parallel.For(0, _channelCount, (seriesIndex) =>
//{ //{

@ -45,9 +45,9 @@
<ComboBoxItem Content="SHN"/> <ComboBoxItem Content="SHN"/>
<ComboBoxItem Content="SHE"/> <ComboBoxItem Content="SHE"/>
</ComboBox> </ComboBox>
<TextBlock VerticalAlignment="Center" Margin="20,0,0,0">时间间隔:</TextBlock> <!--<TextBlock VerticalAlignment="Center" Margin="20,0,0,0">时间间隔:</TextBlock>
<TextBox Text="{Binding XaisInterval}" Width="60" VerticalAlignment="Center"/> <TextBox Text="{Binding XaisInterval}" Width="60" VerticalAlignment="Center"/>
<Button Command="{Binding IntervalSureCommand}" Background="#FF66B1FF" HorizontalAlignment="Right">确认</Button> <Button Command="{Binding IntervalSureCommand}" Background="#FF66B1FF" HorizontalAlignment="Right">确认</Button>-->
<CheckBox Command="{Binding AxesYVisibleCommand}" Visibility="Collapsed" CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self},Path=IsChecked}" Content="Y轴显示" VerticalContentAlignment="Center" IsChecked="True" FontSize="15" Foreground="Black" Margin="5,0,5,0" FontWeight="Bold" /> <CheckBox Command="{Binding AxesYVisibleCommand}" Visibility="Collapsed" CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self},Path=IsChecked}" Content="Y轴显示" VerticalContentAlignment="Center" IsChecked="True" FontSize="15" Foreground="Black" Margin="5,0,5,0" FontWeight="Bold" />
<CheckBox Command="{Binding RealTimeDataCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self},Path=IsChecked}" Visibility="Collapsed" Content="实时" VerticalContentAlignment="Center" FontSize="15" Foreground="Black" FontWeight="Bold" DockPanel.Dock="Right"></CheckBox> <CheckBox Command="{Binding RealTimeDataCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self},Path=IsChecked}" Visibility="Collapsed" Content="实时" VerticalContentAlignment="Center" FontSize="15" Foreground="Black" FontWeight="Bold" DockPanel.Dock="Right"></CheckBox>
<TextBox Text="{Binding IntervalTime}" Visibility="Collapsed" Width="60" VerticalAlignment="Center"></TextBox> <TextBox Text="{Binding IntervalTime}" Visibility="Collapsed" Width="60" VerticalAlignment="Center"></TextBox>

@ -34,4 +34,5 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties systemconfig_1json__JsonSchema="https://developer.1password.com/schema/ssh-agent-config.json" /></VisualStudio></ProjectExtensions>
</Project> </Project>

@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/" WindowState="Maximized" xmlns:prism="http://prismlibrary.com/" WindowState="Maximized"
WindowStyle="None" WindowStartupLocation="CenterScreen" MouseDown="Window_MouseDown" WindowStartupLocation="CenterScreen" MouseDown="Window_MouseDown"
prism:ViewModelLocator.AutoWireViewModel="True" Closing="Window_Closing" prism:ViewModelLocator.AutoWireViewModel="True" Closing="Window_Closing"
Title="{Binding Title}" Height="900" Width="1700" > Title="{Binding Title}" Height="900" Width="1700" >
<Window.Resources> <Window.Resources>

Loading…
Cancel
Save