Преглед изворни кода

颜色资源字典添加

reconfiguration
pry пре 2 месеци
родитељ
комит
46e289bd0c
2 измењених фајлова са 14 додато и 8 уклоњено
  1. +3
    -0
      BPASmartClient.Academy/ColorResource.xaml
  2. +11
    -8
      BPASmartClient.Academy/ViewModel/HistoryChart50LViewModel.cs

+ 3
- 0
BPASmartClient.Academy/ColorResource.xaml Прегледај датотеку

@@ -0,0 +1,3 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Color x:Key="yellow">yellow</Color>
</ResourceDictionary>

+ 11
- 8
BPASmartClient.Academy/ViewModel/HistoryChart50LViewModel.cs Прегледај датотеку

@@ -13,6 +13,7 @@ using System.Diagnostics;
using ThingsGateway.Foundation.Extension.Generic;
using static System.Windows.Forms.LinkLabel;
using System.Windows;
using System.Windows.Media;

namespace BPASmartClient.Academy.ViewModel
{
@@ -67,16 +68,18 @@ namespace BPASmartClient.Academy.ViewModel
OxyDataModels.Add(new OxyDataModel(CreateLine("负压流量", OxyColor.Parse("#9b30ff"))));
OxyDataModels.Add(new OxyDataModel(CreateLine("称重水罐重量", OxyColor.Parse("#00ffff"))));
OxyDataModels.Add(new OxyDataModel(CreateLine("比例阀实际开度", OxyColor.Parse("#ff00ff"))));

SqliteOperate.GetInstance.QueryableByNum(num).ForEach(item =>
{
OxyDataModels[0].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.Temperature));
OxyDataModels[1].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.SteamPressure));
OxyDataModels[2].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.SteamFlowRate));
OxyDataModels[3].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.CondensateWaterTemperature));
OxyDataModels[4].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.CondensateWaterHumidity));
OxyDataModels[5].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.NegativePressureFlowRate));
OxyDataModels[6].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.WeighingWaterTankWeight));
OxyDataModels[7].dataPoints.Add(new DataPoint(DateTimeAxis.ToDouble(item.Createtime), item.ProportionalValveOpening));
double x = DateTimeAxis.ToDouble(item.Createtime);
OxyDataModels[0].dataPoints.Add(new DataPoint(x, item.Temperature));
OxyDataModels[1].dataPoints.Add(new DataPoint(x, item.SteamPressure));
OxyDataModels[2].dataPoints.Add(new DataPoint(x, item.SteamFlowRate));
OxyDataModels[3].dataPoints.Add(new DataPoint(x, item.CondensateWaterTemperature));
OxyDataModels[4].dataPoints.Add(new DataPoint(x, item.CondensateWaterHumidity));
OxyDataModels[5].dataPoints.Add(new DataPoint(x, item.NegativePressureFlowRate));
OxyDataModels[6].dataPoints.Add(new DataPoint(x, item.WeighingWaterTankWeight));
OxyDataModels[7].dataPoints.Add(new DataPoint(x, item.ProportionalValveOpening));
});
OxyDataModels.ForEach(item => { item.AddRange(); });
if (!(OxyModel.Axes.Count > 0))


Loading…
Откажи
Сачувај