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

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

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