Commit d7947943 authored by 潘栩锋's avatar 潘栩锋 🚴

1. 修改 收卷主界面 没有限制小数点

parent ab2ec805
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Margin="2" Name="grid1" DataContext="{Binding Items[0]}" Background="{StaticResource Color_theme_static}"> <Grid Margin="2" Name="grid1" DataContext="{Binding Items[0]}" Background="{StaticResource Color_theme_static}">
<Rectangle HorizontalAlignment="Left"> <Rectangle HorizontalAlignment="Left" Fill="{StaticResource Color_theme_activity}">
<Rectangle.Width> <Rectangle.Width>
<MultiBinding Converter="{StaticResource ratioconv}" Mode="OneWay"> <MultiBinding Converter="{StaticResource ratioconv}" Mode="OneWay">
<Binding Path="MeasureLen" /> <Binding Path="MeasureLen" />
...@@ -78,23 +78,6 @@ ...@@ -78,23 +78,6 @@
<Binding Path="ActualWidth" ElementName="grid1"/> <Binding Path="ActualWidth" ElementName="grid1"/>
</MultiBinding> </MultiBinding>
</Rectangle.Width> </Rectangle.Width>
<Rectangle.Style>
<Style TargetType="Rectangle">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<DataTrigger Value="True">
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource isgtconv}">
<Binding Path="MeasureLen"/>
<Binding Path="MeasureLenSet"/>
<Binding Path="MeasurePreWarning"/>
</MultiBinding>
</DataTrigger.Binding>
<Setter Property="Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle> </Rectangle>
<StackPanel Orientation="Horizontal" > <StackPanel Orientation="Horizontal" >
<TextBlock Text="内收卷" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" Foreground="LightGray" Margin="2" /> <TextBlock Text="内收卷" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" Foreground="LightGray" Margin="2" />
...@@ -108,7 +91,7 @@ ...@@ -108,7 +91,7 @@
</Grid> </Grid>
<Grid Margin="2" Grid.Column="1" DataContext="{Binding Items[1]}" Background="{StaticResource Color_theme_static}"> <Grid Margin="2" Grid.Column="1" DataContext="{Binding Items[1]}" Background="{StaticResource Color_theme_static}">
<Rectangle HorizontalAlignment="Left"> <Rectangle HorizontalAlignment="Left" Fill="{StaticResource Color_theme_activity}">
<Rectangle.Width> <Rectangle.Width>
<MultiBinding Converter="{StaticResource ratioconv}" Mode="OneWay"> <MultiBinding Converter="{StaticResource ratioconv}" Mode="OneWay">
<Binding Path="MeasureLen" /> <Binding Path="MeasureLen" />
...@@ -116,23 +99,6 @@ ...@@ -116,23 +99,6 @@
<Binding Path="ActualWidth" ElementName="grid1"/> <Binding Path="ActualWidth" ElementName="grid1"/>
</MultiBinding> </MultiBinding>
</Rectangle.Width> </Rectangle.Width>
<Rectangle.Style>
<Style TargetType="Rectangle">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
<Style.Triggers>
<DataTrigger Value="True">
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource isgtconv}">
<Binding Path="MeasureLen"/>
<Binding Path="MeasureLenSet"/>
<Binding Path="MeasurePreWarning"/>
</MultiBinding>
</DataTrigger.Binding>
<Setter Property="Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle> </Rectangle>
<StackPanel Orientation="Horizontal" > <StackPanel Orientation="Horizontal" >
<TextBlock Text="内收卷" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" Foreground="LightGray" Margin="2" /> <TextBlock Text="内收卷" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" Foreground="LightGray" Margin="2" />
......
...@@ -598,23 +598,23 @@ ...@@ -598,23 +598,23 @@
<!--一牵引--> <!--一牵引-->
<TextBlock Grid.Column="3" Grid.Row="1" Style="{StaticResource TextBlockStyle_Content}" > <TextBlock Grid.Column="3" Grid.Row="1" Style="{StaticResource TextBlockStyle_Content}" >
<Run Text="{Binding DataContext.Traction1Current,ElementName=grid_accessory}"/><Run Text="A" FontSize="20"/> <Run Text="{Binding DataContext.Traction1Current,ElementName=grid_accessory,StringFormat={}{0:F1}}"/><Run Text="A" FontSize="20"/>
</TextBlock> </TextBlock>
<ToggleButton Grid.Column="5" Grid.Row="1" Style="{StaticResource ToggleButtonStyle_start}" IsChecked="{Binding DataContext.IsTraction1On,ElementName=grid_accessory}"/> <ToggleButton Grid.Column="5" Grid.Row="1" Style="{StaticResource ToggleButtonStyle_start}" IsChecked="{Binding DataContext.IsTraction1On,ElementName=grid_accessory}"/>
<!--二牵引--> <!--二牵引-->
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Background="#FF80C3EE" Margin="5" > <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Background="#FF80C3EE" Margin="5" >
<TextBox Style="{StaticResource TextBoxStyle_Content}" Text="{Binding DataContext.Traction2TensionKgSet,ElementName=grid_accessory}" /> <TextBox Style="{StaticResource TextBoxStyle_Content}" Text="{Binding DataContext.Traction2TensionKgSet,ElementName=grid_accessory,StringFormat={}{0:F1}}" />
<TextBlock Text="kg" Style="{StaticResource TextBlockStyle_FieldContent_mm}" /> <TextBlock Text="kg" Style="{StaticResource TextBlockStyle_FieldContent_mm}" />
</StackPanel> </StackPanel>
<TextBlock Grid.Column="2" Grid.Row="2" Style="{StaticResource TextBlockStyle_Content}"> <TextBlock Grid.Column="2" Grid.Row="2" Style="{StaticResource TextBlockStyle_Content}">
<Run Text="{Binding DataContext.Traction2TensionKg,ElementName=grid_accessory}"/><Run Text="kg" FontSize="20"/> <Run Text="{Binding DataContext.Traction2TensionKg,ElementName=grid_accessory,StringFormat={}{0:F1}}"/><Run Text="kg" FontSize="20"/>
</TextBlock> </TextBlock>
<TextBlock Grid.Column="3" Grid.Row="2" Style="{StaticResource TextBlockStyle_Content}"> <TextBlock Grid.Column="3" Grid.Row="2" Style="{StaticResource TextBlockStyle_Content}">
<Run Text="{Binding DataContext.Traction2Current,ElementName=grid_accessory}"/><Run Text="A" FontSize="20"/> <Run Text="{Binding DataContext.Traction2Current,ElementName=grid_accessory,StringFormat={}{0:F1}}"/><Run Text="A" FontSize="20"/>
</TextBlock> </TextBlock>
<ToggleButton Grid.Column="4" Grid.Row="2" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding DataContext.IsTraction2Manual,ElementName=grid_accessory}"/> <ToggleButton Grid.Column="4" Grid.Row="2" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding DataContext.IsTraction2Manual,ElementName=grid_accessory}"/>
...@@ -622,32 +622,32 @@ ...@@ -622,32 +622,32 @@
<!--内收卷--> <!--内收卷-->
<StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal" Background="#FF80C3EE" Margin="5" > <StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal" Background="#FF80C3EE" Margin="5" >
<TextBox Style="{StaticResource TextBoxStyle_Content}" Text="{Binding DataContext.TensionKgSet,ElementName=grid_winder0}" /> <TextBox Style="{StaticResource TextBoxStyle_Content}" Text="{Binding DataContext.TensionKgSet,ElementName=grid_winder0,StringFormat={}{0:F1}}" />
<TextBlock Text="kg" Style="{StaticResource TextBlockStyle_FieldContent_mm}" /> <TextBlock Text="kg" Style="{StaticResource TextBlockStyle_FieldContent_mm}" />
</StackPanel> </StackPanel>
<TextBlock Grid.Column="2" Grid.Row="3" Style="{StaticResource TextBlockStyle_Content}"> <TextBlock Grid.Column="2" Grid.Row="3" Style="{StaticResource TextBlockStyle_Content}">
<Run Text="{Binding DataContext.TensionKg,ElementName=grid_winder0}"/><Run Text="kg" FontSize="20"/> <Run Text="{Binding DataContext.TensionKg,ElementName=grid_winder0,StringFormat={}{0:F1}}"/><Run Text="kg" FontSize="20"/>
</TextBlock> </TextBlock>
<TextBlock Grid.Column="3" Grid.Row="3" Style="{StaticResource TextBlockStyle_Content}"> <TextBlock Grid.Column="3" Grid.Row="3" Style="{StaticResource TextBlockStyle_Content}">
<Run Text="{Binding DataContext.Current,ElementName=grid_winder0}"/><Run Text="A" FontSize="20"/> <Run Text="{Binding DataContext.Current,ElementName=grid_winder0,StringFormat={}{0:F1}}"/><Run Text="A" FontSize="20"/>
</TextBlock> </TextBlock>
<ToggleButton Grid.Column="4" Grid.Row="3" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding DataContext.IsManual,ElementName=grid_winder0}"/> <ToggleButton Grid.Column="4" Grid.Row="3" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding DataContext.IsManual,ElementName=grid_winder0}"/>
<ToggleButton Grid.Column="5" Grid.Row="3" Style="{StaticResource ToggleButtonStyle_start}" IsChecked="{Binding DataContext.IsOn,ElementName=grid_winder0}"/> <ToggleButton Grid.Column="5" Grid.Row="3" Style="{StaticResource ToggleButtonStyle_start}" IsChecked="{Binding DataContext.IsOn,ElementName=grid_winder0}"/>
<!--外收卷--> <!--外收卷-->
<StackPanel Grid.Column="1" Grid.Row="4" Orientation="Horizontal" Background="#FF80C3EE" Margin="5" > <StackPanel Grid.Column="1" Grid.Row="4" Orientation="Horizontal" Background="#FF80C3EE" Margin="5" >
<TextBox Style="{StaticResource TextBoxStyle_Content}" Text="{Binding DataContext.TensionKgSet,ElementName=grid_winder1}" /> <TextBox Style="{StaticResource TextBoxStyle_Content}" Text="{Binding DataContext.TensionKgSet,ElementName=grid_winder1,StringFormat={}{0:F1}}" />
<TextBlock Text="kg" Style="{StaticResource TextBlockStyle_FieldContent_mm}" /> <TextBlock Text="kg" Style="{StaticResource TextBlockStyle_FieldContent_mm}" />
</StackPanel> </StackPanel>
<TextBlock Grid.Column="2" Grid.Row="4" Style="{StaticResource TextBlockStyle_Content}"> <TextBlock Grid.Column="2" Grid.Row="4" Style="{StaticResource TextBlockStyle_Content}">
<Run Text="{Binding DataContext.TensionKg,ElementName=grid_winder1}"/><Run Text="kg" FontSize="20"/> <Run Text="{Binding DataContext.TensionKg,ElementName=grid_winder1,StringFormat={}{0:F1}}"/><Run Text="kg" FontSize="20"/>
</TextBlock> </TextBlock>
<TextBlock Grid.Column="3" Grid.Row="4" Style="{StaticResource TextBlockStyle_Content}"> <TextBlock Grid.Column="3" Grid.Row="4" Style="{StaticResource TextBlockStyle_Content}">
<Run Text="{Binding DataContext.Current,ElementName=grid_winder1}"/><Run Text="A" FontSize="20"/> <Run Text="{Binding DataContext.Current,ElementName=grid_winder1,StringFormat={}{0:F1}}"/><Run Text="A" FontSize="20"/>
</TextBlock> </TextBlock>
<ToggleButton Grid.Column="4" Grid.Row="4" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding DataContext.IsManual,ElementName=grid_winder1}"/> <ToggleButton Grid.Column="4" Grid.Row="4" Style="{StaticResource ToggleButtonStyle_auto}" IsChecked="{Binding DataContext.IsManual,ElementName=grid_winder1}"/>
......
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