@@ -20,6 +20,7 @@ | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" /> | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/TextBoxStyle.xaml" /> | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" /> | |||
<ResourceDictionary Source="/BPASmartClient.Academy;component/ColorResource.xaml" /> | |||
<!--<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />--> | |||
<ResourceDictionary> | |||
<con:ColorConverter x:Key="ColorConverter" /> | |||
@@ -1,3 +1,10 @@ | |||
<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> | |||
<SolidColorBrush x:Key="反应釜温度">#ff0000</SolidColorBrush> | |||
<SolidColorBrush x:Key="反应釜蒸汽压力">#90ee90</SolidColorBrush> | |||
<SolidColorBrush x:Key="反应釜蒸汽流量">#00bfff</SolidColorBrush> | |||
<SolidColorBrush x:Key="冷凝水罐温度">#ffff00</SolidColorBrush> | |||
<SolidColorBrush x:Key="冷凝水罐湿度">#ffa500</SolidColorBrush> | |||
<SolidColorBrush x:Key="负压流量">#9b30ff</SolidColorBrush> | |||
<SolidColorBrush x:Key="称重水罐重量">#00ffff</SolidColorBrush> | |||
<SolidColorBrush x:Key="比例阀实际开度">#ff00ff</SolidColorBrush> | |||
</ResourceDictionary> |
@@ -327,7 +327,7 @@ | |||
CommandParameter="0" | |||
Content="反应釜温度" | |||
FontSize="14" | |||
Foreground="Red" | |||
Foreground="{StaticResource 反应釜温度}" | |||
IsChecked="{Binding VisStatus[0]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
@@ -335,7 +335,7 @@ | |||
CommandParameter="1" | |||
Content="反应釜蒸汽压力" | |||
FontSize="14" | |||
Foreground="#90EE90" | |||
Foreground="{StaticResource 反应釜蒸汽压力}" | |||
IsChecked="{Binding VisStatus[1]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
@@ -343,7 +343,7 @@ | |||
CommandParameter="2" | |||
Content="反应釜蒸汽流量" | |||
FontSize="14" | |||
Foreground="DeepSkyBlue" | |||
Foreground="{StaticResource 反应釜蒸汽流量}" | |||
IsChecked="{Binding VisStatus[2]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
@@ -351,7 +351,7 @@ | |||
CommandParameter="3" | |||
Content="冷凝水罐温度" | |||
FontSize="14" | |||
Foreground="Yellow" | |||
Foreground="{StaticResource 冷凝水罐温度}" | |||
IsChecked="{Binding VisStatus[3]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
@@ -359,7 +359,7 @@ | |||
CommandParameter="4" | |||
Content="冷凝水罐湿度" | |||
FontSize="14" | |||
Foreground="Orange" | |||
Foreground="{StaticResource 冷凝水罐湿度}" | |||
IsChecked="{Binding VisStatus[4]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
@@ -367,7 +367,7 @@ | |||
CommandParameter="5" | |||
Content="负压流量" | |||
FontSize="14" | |||
Foreground="#9B30FF" | |||
Foreground="{StaticResource 负压流量}" | |||
IsChecked="{Binding VisStatus[5]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
@@ -375,7 +375,7 @@ | |||
CommandParameter="6" | |||
Content="称重水罐重量" | |||
FontSize="14" | |||
Foreground="Aqua" | |||
Foreground="{StaticResource 称重水罐重量}" | |||
IsChecked="{Binding VisStatus[6]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
@@ -383,7 +383,7 @@ | |||
CommandParameter="7" | |||
Content="比例阀开度" | |||
FontSize="14" | |||
Foreground="#FF00FF" | |||
Foreground="{StaticResource 比例阀实际开度}" | |||
IsChecked="{Binding VisStatus[7]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
</UniformGrid> | |||
@@ -14,6 +14,7 @@ using ThingsGateway.Foundation.Extension.Generic; | |||
using static System.Windows.Forms.LinkLabel; | |||
using System.Windows; | |||
using System.Windows.Media; | |||
using OxyPlot.Wpf; | |||
namespace BPASmartClient.Academy.ViewModel | |||
{ | |||
@@ -60,14 +61,14 @@ namespace BPASmartClient.Academy.ViewModel | |||
OxyModel.Series.Clear(); | |||
OxyDataModels.Clear(); | |||
OxyModel = new PlotModel() { Title = num }; | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜温度", OxyColor.Parse("#ff0000")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜蒸汽压力", OxyColor.Parse("#90ee90")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜蒸汽流量", OxyColor.Parse("#00bfff")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("冷凝水罐温度", OxyColor.Parse("#ffff00")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("冷凝水罐湿度", OxyColor.Parse("#ffa500")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("负压流量", OxyColor.Parse("#9b30ff")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("称重水罐重量", OxyColor.Parse("#00ffff")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("比例阀实际开度", OxyColor.Parse("#ff00ff")))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜温度"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜蒸汽压力"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜蒸汽流量"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("冷凝水罐温度"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("冷凝水罐湿度"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("负压流量"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("称重水罐重量"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("比例阀实际开度"))); | |||
SqliteOperate.GetInstance.QueryableByNum(num).ForEach(item => | |||
{ | |||
@@ -104,13 +105,15 @@ namespace BPASmartClient.Academy.ViewModel | |||
} | |||
} | |||
private LineSeries CreateLine(string title, OxyColor fillColor) | |||
private LineSeries CreateLine(string title) | |||
{ | |||
var scb = Application.Current.TryFindResource(title) as SolidColorBrush; | |||
scb.ToOxyColor(); | |||
return new LineSeries() | |||
{ | |||
LineStyle = LineStyle.Solid, | |||
Title = title, | |||
MarkerFill = fillColor, | |||
MarkerFill = scb.ToOxyColor(), | |||
MarkerSize = 2, | |||
LineLegendPosition = LineLegendPosition.End | |||
}; | |||