Commit 9361a2be authored by 潘栩锋's avatar 潘栩锋 🚴

1.解决 收卷主界面 运行/停止 无法执行。

2.解决 称重 参数无法显示
parent 5cb66f05
......@@ -36,7 +36,7 @@ namespace FLY.Weight.UI.Client
}
[InjectionMethod]
void Init(IWeightSystemService weightSystemService)
public void Init(IWeightSystemService weightSystemService)
{
this.weightSystemService = weightSystemService;
root_grid.DataContext = weightSystemService;
......
......@@ -7,6 +7,7 @@
mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="1024" Background="White"
Unloaded="Page_Unloaded"
Title="Page_Ingredient">
<Page.Resources>
<ResourceDictionary>
......@@ -67,8 +68,8 @@
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<ScrollViewer CanContentScroll="True" PanningMode="Both" Grid.Row="1" >
<StackPanel Orientation="Vertical" >
<ScrollViewer PanningMode="Both" Grid.Row="1" >
<StackPanel >
<Grid x:Name="grid_weighter">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
......
......@@ -16,6 +16,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Unity;
namespace FLY.Weight.UI.Client
{
......@@ -32,7 +33,8 @@ namespace FLY.Weight.UI.Client
InitializeComponent();
}
void Init(IWeightSystemService weightSystemService)
[InjectionMethod]
public void Init(IWeightSystemService weightSystemService)
{
this.weightSystemService = weightSystemService;
root_grid.DataContext = this.weightSystemService;
......
......@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Weight.UI.Client"
xmlns:local="clr-namespace:FLY.Weight.UI.Client" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="960" Background="White"
Title="Page_MixTable">
......@@ -30,44 +30,42 @@
<RowDefinition Height="496*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}">
<Grid Background="{StaticResource Background_Title}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<Button Style="{StaticResource ButtonStyle_back2}" Click="button_back_Click" />
<Grid Width="160"/>
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" Margin="10,0" VerticalAlignment="Center">
<Border MinWidth="60" Height="60" Background="{Binding Color}" Margin="0" />
<TextBlock Text="{Binding Number}" FontSize="60" Foreground="White" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
<TextBlock Style="{StaticResource TextBlockStyle_Title}" Text="配料记录"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" >
<Button Style="{StaticResource ButtonStyle_largeIcon}" Click="button_clear_click" Foreground="White" Margin="20,0">
<StackPanel>
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Fill="#FFEE3232" Margin="1"/>
<iconPacks:PackIconMaterial Kind="CloseCircle" />
</Grid>
<TextBlock Foreground="White" FontWeight="Bold" FontSize="60" FontFamily="YouYuan" TextAlignment="Left" VerticalAlignment="Center" >
<Run Text="配料记录"/>
</TextBlock>
<TextBlock Text="清空" Foreground="White"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="1" x:Name="grid_window">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="5">
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_prepage_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-left}" Stretch="Uniform">
<Path.Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<!--已经是最后页-->
<DataTrigger Binding="{Binding IsFirstPage}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_noact}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<Button Style="{StaticResource ButtonStyle_icon}" Background="Transparent" Click="button_prepage_Click" >
<iconPacks:PackIconMaterial Kind="ArrowLeft"/>
</Button>
<StackPanel Orientation="Horizontal" Margin="5">
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="第"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrentPage}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="页"/>
......@@ -76,35 +74,11 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding TotalPages}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="页"/>
</StackPanel>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_nextpage_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-right}" Stretch="Uniform">
<Path.Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<!--已经是最后页-->
<DataTrigger Binding="{Binding IsLastPage}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_noact}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<Button Style="{StaticResource ButtonStyle_icon}" Click="button_nextpage_Click" >
<iconPacks:PackIconMaterial Kind="ArrowRight"/>
</Button>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_newest_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-collapse-right}" Stretch="Uniform">
<Path.Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<!--已经是最新-->
<DataTrigger Binding="{Binding IsKeepNewest}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_noact}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<Button Style="{StaticResource ButtonStyle_icon}" Click="button_newest_Click" >
<iconPacks:PackIconMaterial Kind="ArrowCollapseRight"/>
</Button>
<StackPanel Orientation="Horizontal" Margin="20,5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="显示"/>
......@@ -112,21 +86,10 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="行"/>
</StackPanel>
</StackPanel>
<Button Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10,-30,30,10" Style="{StaticResource ResourceKey=ButtonStyle_empty}" Click="button_clear_click" >
<Grid>
<Grid.Effect>
<DropShadowEffect BlurRadius="15" Direction="-90" RenderingBias="Quality" Opacity=".2" ShadowDepth="1"/>
</Grid.Effect>
<Ellipse Fill="White" Stretch="Uniform" Width="60"/>
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Uniform" Width="60" Height="60"/>
<TextBlock Text="清空" Padding="2" Background="Red" Foreground="White" FontSize="18" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,-10"/>
</Grid>
</Button>
</Grid>
<DataGrid Grid.Row="1" x:Name="gridFlows" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True"
CellStyle="{StaticResource DataGridCellStyle_Base}"
AlternationCount ="2"
AlternatingRowBackground="LightGray"
AlternationCount ="5" AlternatingRowBackground="LightGray"
>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Time,StringFormat={}{0:MM/dd HH:mm}}" IsReadOnly="True">
......
......@@ -61,8 +61,6 @@ namespace FLY.Weight.UI.Client
int item_idx = this.weightSystemService.Items.IndexOf(w);
this.buffer = mixBufferCollection.GetMix(item_idx);
templateRoot.DataContext = w;
//窗口显示数据条数
int windowSize = this.paramDictionary.GetValue<int>(ParamDistItemKeys.WindowSize, 30);
mWindow = new BufferWindow<Lc_Mix>(buffer, windowSize);
......
......@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Weight.UI.Client"
xmlns:local="clr-namespace:FLY.Weight.UI.Client" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="960" Background="White"
Title="Page_RollMixTable">
......@@ -20,46 +20,42 @@
<RowDefinition Height="auto" />
<RowDefinition Height="496*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}">
<Grid Background="{StaticResource Background_Title}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<Button Style="{StaticResource ButtonStyle_back2}" Click="button_back_Click" />
<Grid Width="160"/>
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" Margin="10,0" VerticalAlignment="Center">
<Border MinWidth="60" Height="60" Background="{Binding Color}" Margin="0" />
<TextBlock Text="{Binding Number}" FontSize="60" Foreground="White" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
<TextBlock Style="{StaticResource TextBlockStyle_Title}" Text="累计记录"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" >
<Button Style="{StaticResource ButtonStyle_largeIcon}" Click="button_clear_click" Foreground="White" Margin="20,0">
<StackPanel>
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Fill="#FFEE3232" Margin="1"/>
<iconPacks:PackIconMaterial Kind="CloseCircle" />
</Grid>
<TextBlock Foreground="White" FontWeight="Bold" FontSize="60" FontFamily="YouYuan" TextAlignment="Left" VerticalAlignment="Center" >
<Run Text="累计记录"/>
</TextBlock>
<TextBlock Text="清空" Foreground="White"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="1" x:Name="grid_window">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="5">
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_prepage_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-left}" Stretch="Uniform">
<Path.Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<!--已经是最后页-->
<DataTrigger Binding="{Binding IsFirstPage}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_noact}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<Button Style="{StaticResource ButtonStyle_icon}" Background="Transparent" Click="button_prepage_Click" >
<iconPacks:PackIconMaterial Kind="ArrowLeft"/>
</Button>
<StackPanel Orientation="Horizontal" Margin="5">
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="第"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrentPage}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="页"/>
......@@ -68,35 +64,11 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding TotalPages}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="页"/>
</StackPanel>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_nextpage_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-right}" Stretch="Uniform">
<Path.Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<!--已经是最后页-->
<DataTrigger Binding="{Binding IsLastPage}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_noact}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<Button Style="{StaticResource ButtonStyle_icon}" Click="button_nextpage_Click" >
<iconPacks:PackIconMaterial Kind="ArrowRight"/>
</Button>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_newest_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-collapse-right}" Stretch="Uniform">
<Path.Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<!--已经是最新-->
<DataTrigger Binding="{Binding IsKeepNewest}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_noact}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<Button Style="{StaticResource ButtonStyle_icon}" Click="button_newest_Click" >
<iconPacks:PackIconMaterial Kind="ArrowCollapseRight"/>
</Button>
<StackPanel Orientation="Horizontal" Margin="20,5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="显示"/>
......@@ -104,18 +76,9 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="行"/>
</StackPanel>
</StackPanel>
<Button Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10,-30,30,10" Style="{StaticResource ResourceKey=ButtonStyle_empty}" Click="button_clear_click" >
<Grid>
<Grid.Effect>
<DropShadowEffect BlurRadius="15" Direction="-90" RenderingBias="Quality" Opacity=".2" ShadowDepth="1"/>
</Grid.Effect>
<Ellipse Fill="White" Stretch="Uniform" Width="60"/>
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Uniform" Width="60" Height="60"/>
<TextBlock Text="清空" Padding="2" Background="Red" Foreground="White" FontSize="18" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,-10"/>
</Grid>
</Button>
</Grid>
<DataGrid Grid.Row="1" x:Name="gridFlows" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True" >
<DataGrid Grid.Row="1" x:Name="gridFlows" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True"
AlternationCount="5" AlternatingRowBackground="LightGray">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
......
......@@ -61,7 +61,7 @@ namespace FLY.Weight.UI.Client
this.buffer = mixBufferCollection.GetMix(item_idx);
templateRoot.DataContext = w;
//templateRoot.DataContext = w;
//窗口显示数据条数
int windowSize = this.paramDictionary.GetValue<int>(ParamDistItemKeys.WindowSize, 30);
......
......@@ -24,21 +24,21 @@
<StackPanel Margin="5">
<TextBlock Text="内收卷模式选择" FontSize="20" Margin="3" Padding="4,0" Background="Orange" Foreground="White" HorizontalAlignment="Left"/>
<StackPanel Orientation="Horizontal" >
<flyctrl:NoToggleButton IsChecked="{Binding Items[0].IsSurfaceWindGet}" >
<flyctrl:NoToggleButton IsChecked="{Binding IsSurfaceWindGet}" DataContext="{Binding Items[0]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[0].IsSurfaceWindSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsSurfaceWindSet}"/>
</i:Interaction.Behaviors>
表面
</flyctrl:NoToggleButton>
<flyctrl:NoToggleButton IsChecked="{Binding Items[0].IsCenterWindGet}">
<flyctrl:NoToggleButton IsChecked="{Binding IsCenterWindGet}" DataContext="{Binding Items[0]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[0].IsCenterWindSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsCenterWindSet}"/>
</i:Interaction.Behaviors>
中心
</flyctrl:NoToggleButton>
<flyctrl:NoToggleButton Width="170" IsChecked="{Binding Items[0].IsCsWindGet}">
<flyctrl:NoToggleButton Width="170" IsChecked="{Binding IsCsWindGet}" DataContext="{Binding Items[0]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[0].IsCsWindSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsCsWindSet}"/>
</i:Interaction.Behaviors>
表面+中心
</flyctrl:NoToggleButton>
......@@ -47,21 +47,21 @@
<StackPanel Margin="5">
<TextBlock Text="外收卷模式选择" FontSize="20" Margin="3" Padding="4,0" Background="DarkOrange" Foreground="White" HorizontalAlignment="Left"/>
<StackPanel Orientation="Horizontal" >
<flyctrl:NoToggleButton IsChecked="{Binding Items[1].IsSurfaceWindGet}" >
<flyctrl:NoToggleButton IsChecked="{Binding IsSurfaceWindGet}" DataContext="{Binding Items[1]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[1].IsSurfaceWindSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsSurfaceWindSet}"/>
</i:Interaction.Behaviors>
表面
</flyctrl:NoToggleButton>
<flyctrl:NoToggleButton IsChecked="{Binding Items[1].IsCenterWindGet}">
<flyctrl:NoToggleButton IsChecked="{Binding IsCenterWindGet}" DataContext="{Binding Items[1]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[1].IsCenterWindSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsCenterWindSet}"/>
</i:Interaction.Behaviors>
中心
</flyctrl:NoToggleButton>
<flyctrl:NoToggleButton Width="170" IsChecked="{Binding Items[1].IsCsWindGet}">
<flyctrl:NoToggleButton Width="170" IsChecked="{Binding IsCsWindGet}" DataContext="{Binding Items[1]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[1].IsCsWindSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsCsWindSet}"/>
</i:Interaction.Behaviors>
表面+中心
</flyctrl:NoToggleButton>
......@@ -200,9 +200,9 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="kg"/>
</StackPanel>
<flyctrl:NoToggleButton Style="{StaticResource NoToggleButton_Separate}" Grid.Column="4" Grid.Row="4" Grid.RowSpan="2"
IsChecked="{Binding Items[0].IsEPRollerClosed}" >
IsChecked="{Binding IsEPRollerClosed}" DataContext="{Binding Items[0]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[0].EPRollerSeparateSet}"/>
<flyctrl:ResetBehavior Binding="{Binding EPRollerSeparateSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
......@@ -223,9 +223,9 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="kg"/>
</StackPanel>
<flyctrl:NoToggleButton Style="{StaticResource NoToggleButton_Separate}" Grid.Column="5" Grid.Row="4" Grid.RowSpan="2"
IsChecked="{Binding Items[1].IsEPRollerClosed}" >
IsChecked="{Binding IsEPRollerClosed}" DataContext="{Binding Items[1]}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[1].EPRollerSeparateSet}"/>
<flyctrl:ResetBehavior Binding="{Binding EPRollerSeparateSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
......
......@@ -369,14 +369,15 @@
</StackPanel>
<flyctrl:NoToggleButton Grid.Column="5" Grid.Row="1"
IsChecked="{Binding Accessory.IsTraction1On}"
IsChecked="{Binding IsTraction1On}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
DataContext="{Binding Accessory}"
>
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Accessory.IsTraction1OnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsTraction1OnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
<!--二牵引-->
......@@ -398,14 +399,14 @@
<ToggleButton Grid.Column="4" Grid.Row="2" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding Accessory.IsTraction2Manual}"/>
<flyctrl:NoToggleButton Grid.Column="5" Grid.Row="2"
IsChecked="{Binding Accessory.IsTraction2On}"
IsChecked="{Binding IsTraction2On}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
>
DataContext="{Binding Accessory}">
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Accessory.IsTraction2OnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsTraction2OnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
......@@ -428,14 +429,15 @@
<ToggleButton Grid.Column="4" Grid.Row="3" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding Items[0].IsManual}"/>
<flyctrl:NoToggleButton x:Name="btnWind0On" Grid.Column="5" Grid.Row="3"
IsChecked="{Binding Items[0].IsOn}"
IsChecked="{Binding IsOn}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
DataContext="{Binding Items[0]}"
>
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[0].IsOnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsOnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
......@@ -457,14 +459,15 @@
<ToggleButton Grid.Column="4" Grid.Row="4" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding Items[1].IsManual}"/>
<flyctrl:NoToggleButton x:Name="btnWind1On" Grid.Column="5" Grid.Row="4"
IsChecked="{Binding Items[1].IsOn}"
IsChecked="{Binding IsOn}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
DataContext="{Binding Items[1]}"
>
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[1].IsOnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsOnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
</Grid>
......
......@@ -369,14 +369,15 @@
</StackPanel>
<flyctrl:NoToggleButton Grid.Column="5" Grid.Row="1"
IsChecked="{Binding Accessory.IsTraction1On}"
IsChecked="{Binding IsTraction1On}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
DataContext="{Binding Accessory}"
>
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Accessory.IsTraction1OnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsTraction1OnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
<!--二牵引-->
......@@ -398,14 +399,15 @@
<ToggleButton Grid.Column="4" Grid.Row="2" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding Accessory.IsTraction2Manual}"/>
<flyctrl:NoToggleButton Grid.Column="5" Grid.Row="2"
IsChecked="{Binding Accessory.IsTraction2On}"
IsChecked="{Binding IsTraction2On}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
DataContext="{Binding Accessory}"
>
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Accessory.IsTraction2OnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsTraction2OnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
......@@ -428,14 +430,15 @@
<ToggleButton Grid.Column="4" Grid.Row="3" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding Items[0].IsManual}"/>
<flyctrl:NoToggleButton x:Name="btnWind0On" Grid.Column="5" Grid.Row="3"
IsChecked="{Binding Items[0].IsOn}"
IsChecked="{Binding IsOn}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
DataContext="{Binding Items[0]}"
>
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[0].IsOnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsOnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
......@@ -457,14 +460,15 @@
<ToggleButton Grid.Column="4" Grid.Row="4" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding Items[1].IsManual}"/>
<flyctrl:NoToggleButton x:Name="btnWind1On" Grid.Column="5" Grid.Row="4"
IsChecked="{Binding Items[1].IsOn}"
IsChecked="{Binding IsOn}"
OffLabel="停止"
OffBrush="DarkRed"
OnLabel="运行"
OnBrush="Green"
DataContext="{Binding Items[1]}"
>
<i:Interaction.Behaviors>
<flyctrl:ResetBehavior Binding="{Binding Items[1].IsOnSet}"/>
<flyctrl:ResetBehavior Binding="{Binding IsOnSet}"/>
</i:Interaction.Behaviors>
</flyctrl:NoToggleButton>
</Grid>
......
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