Commit 0de2b554 authored by 潘栩锋's avatar 潘栩锋 🚴

优化 IBC MainPanel 与 MainPanel2 属性名都改为 nameof

parent 7ba9b19c
......@@ -22,7 +22,7 @@
<sys:Double x:Key="FontSize_title">15</sys:Double>
<sys:Double x:Key="FontSize_unit">12</sys:Double>
<Style TargetType="{x:Type ToggleButton}" x:Key="ToggleButtonStyle02" >
<Setter Property="Template">
<Setter.Value>
......@@ -49,9 +49,6 @@
</Setter.Value>
</Setter>
</Style>
<local:ToggleButtonText x:Key="tbt_inletAir" IsCheckText="运行" NoCheckText="停止"/>
<local:ToggleButtonText x:Key="tbt_outletAir" IsCheckText="运行" NoCheckText="停止"/>
<local:ToggleButtonText x:Key="tbt_IBC" IsCheckText="自动" NoCheckText="手动"/>
</ResourceDictionary>
</UserControl.Resources>
......
......@@ -22,7 +22,7 @@
<sys:Double x:Key="FontSize_title">15</sys:Double>
<sys:Double x:Key="FontSize_unit">12</sys:Double>
<Style TargetType="{x:Type ToggleButton}" x:Key="ToggleButtonStyle02" >
<Setter Property="Template">
<Setter.Value>
......@@ -49,9 +49,6 @@
</Setter.Value>
</Setter>
</Style>
<local:ToggleButtonText x:Key="tbt_inletAir" IsCheckText="运行" NoCheckText="停止"/>
<local:ToggleButtonText x:Key="tbt_outletAir" IsCheckText="运行" NoCheckText="停止"/>
<local:ToggleButtonText x:Key="tbt_IBC" IsCheckText="自动" NoCheckText="手动"/>
</ResourceDictionary>
</UserControl.Resources>
......
......@@ -47,24 +47,20 @@ namespace FLY.IBC.UI.Client.UiModule
ibcSystemService.PLCos,
ibcSystemService.Item,
new string[] {
"IsIBCAuto",
"FilmWidth",
"FilmWidthSet",
"IsFilmWidthChanged",
"ErrorCorrection",
"IsInletAirOn",
"InletAirFreq",
"InletAirFreqSet",
"IsOutletAirOn",
"OutletAirFreq",
"OutletAirFreqSet",
"IsOutletAirFreqChanged",
"IsDownOutletAirOn",
"DownOutletAirFreq",
"DownOutletAirFreqSet",
nameof(IBC.Common.IBCData.IsIBCAuto),
nameof(IBC.Common.IBCData.FilmWidth),
nameof(IBC.Common.IBCData.FilmWidthSet),
nameof(IBC.Common.IBCData.IsFilmWidthChanged),
nameof(IBC.Common.IBCData.ErrorCorrection),
nameof(IBC.Common.IBCData.IsInletAirOn),
nameof(IBC.Common.IBCData.InletAirFreq),
nameof(IBC.Common.IBCData.InletAirFreqSet),
nameof(IBC.Common.IBCData.IsOutletAirOn),
nameof(IBC.Common.IBCData.OutletAirFreq),
nameof(IBC.Common.IBCData.OutletAirFreqSet),
nameof(IBC.Common.IBCData.IsOutletAirFreqChanged)
});
container.BuildUp(ibcCtrlGraph);
......@@ -73,20 +69,21 @@ namespace FLY.IBC.UI.Client.UiModule
private async void Item_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if((ibcSystemService is IbcSystemServiceClient) && ((ibcSystemService as IbcSystemServiceClient).IsInPushValue))
if ((ibcSystemService is IbcSystemServiceClient) && ((ibcSystemService as IbcSystemServiceClient).IsInPushValue))
return;
if (e.PropertyName == "FilmWidthSet")
if (e.PropertyName == nameof(IBC.Common.IBCData.FilmWidthSet))
{
await Task.Delay(1000);//1s后触发通知
ibcSystemService.Item.IsFilmWidthChanged = true;
}
else if (e.PropertyName == "OutletAirFreqSet")
else if (e.PropertyName == nameof(IBC.Common.IBCData.OutletAirFreqSet))
{
await Task.Delay(1000);//1s后触发通知
ibcSystemService.Item.IsOutletAirFreqChanged = true;
}
}
private void button_inletAir_plus_Click(object sender, RoutedEventArgs e)
{
if (ibcSystemService.Item.InletAirFreqSet < 49.9)
......@@ -118,11 +115,7 @@ namespace FLY.IBC.UI.Client.UiModule
w.ShowDialog();
}
}
public class ToggleButtonText
{
public string IsCheckText { get; set; }
public string NoCheckText { get; set; }
}
public class UiModule2_MainPanel : IUiModule2
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment