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

修复 称重V6 没有注册 “厚度%” 更新

parent 9e2e56da
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule" xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control" xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignWidth ="1600" d:DesignHeight="954"> mc:Ignorable="d" d:DesignWidth ="1060" d:DesignHeight="634">
<!--1920*1080 下图表区 1600 * 954 <!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890 1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634--> 1388*768 下图表区 1060 * 634-->
...@@ -27,13 +27,7 @@ ...@@ -27,13 +27,7 @@
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<local:UcTotalFlowV6 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" /> <local:UcTotalFlowV6 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<ItemsControl x:Name="itemsControl" Grid.Row="1" ItemsSource="{Binding Items}">
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Columns="{Binding ElementName=itemsControl,Path=Items.Count}"/> <UniformGrid Columns="{Binding ElementName=itemsControl,Path=Items.Count}"/>
...@@ -50,6 +44,5 @@ ...@@ -50,6 +44,5 @@
</ItemsControl> </ItemsControl>
</Grid> </Grid>
</Grid> </Grid>
</Grid>
</UserControl> </UserControl>
...@@ -39,7 +39,7 @@ namespace FLY.Weight.UI.Client.UiModule ...@@ -39,7 +39,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan( SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos, this.weightSystemService.PLCos,
this.weightSystemService.Items[i], this.weightSystemService.Items[i],
UcWeighterItemV5.item_update_propertynames); UcWeighterItemV6.item_update_propertynames);
setPlan_items.Add(plan); setPlan_items.Add(plan);
} }
if (weightSystemService is WeightSystemServiceClient) if (weightSystemService is WeightSystemServiceClient)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule" xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control" xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignWidth ="1060" d:DesignHeight="634"> mc:Ignorable="d" d:DesignWidth ="1600" d:DesignHeight="954">
<!--1920*1080 下图表区 1600 * 954 <!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890 1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634--> 1388*768 下图表区 1060 * 634-->
...@@ -28,12 +28,7 @@ ...@@ -28,12 +28,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<local:UcTotalFlowV6 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" /> <local:UcTotalFlowV6 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1"> <ItemsControl x:Name="itemsControl" Grid.Row="1" ItemsSource="{Binding Items}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Columns="{Binding ElementName=itemsControl,Path=Items.Count}"/> <UniformGrid Columns="{Binding ElementName=itemsControl,Path=Items.Count}"/>
...@@ -50,6 +45,5 @@ ...@@ -50,6 +45,5 @@
</ItemsControl> </ItemsControl>
</Grid> </Grid>
</Grid> </Grid>
</Grid>
</UserControl> </UserControl>
...@@ -39,7 +39,7 @@ namespace FLY.Weight.UI.Client.UiModule ...@@ -39,7 +39,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan( SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos, this.weightSystemService.PLCos,
this.weightSystemService.Items[i], this.weightSystemService.Items[i],
UcWeighterItemV5.item_update_propertynames); UcWeighterItemV6.item_update_propertynames);
setPlan_items.Add(plan); setPlan_items.Add(plan);
} }
if (weightSystemService is WeightSystemServiceClient) if (weightSystemService is WeightSystemServiceClient)
......
...@@ -85,6 +85,62 @@ ...@@ -85,6 +85,62 @@
</Grid> </Grid>
</StackPanel> </StackPanel>
</Viewbox> </Viewbox>
<Viewbox Margin="15,5" MaxHeight="90">
<Button Style="{StaticResource Styles.Button.Empty}" Background="Transparent" Click="button_thickness_Click" >
<StackPanel Orientation="Horizontal">
<StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="吹膜宽度" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
<Run Text="{Binding Accessory.TotalFilmWidth,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="mm" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3">
<TextBlock Text="平均密度" Style="{StaticResource TextBlockStyle_title}" />
<Viewbox Height="{StaticResource FontSize_text}" HorizontalAlignment="Left" >
<TextBlock >
<Run Text="{Binding Accessory.Density,StringFormat={}{0:F3}}" Style="{StaticResource RunStyle_text}" />
<Run Text="kg/m³" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</Viewbox>
</StackPanel>
</StackPanel>
<StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="设置厚度" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
<Run Text="{Binding Accessory.SetThickness,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="um" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" Background="{StaticResource Color_background2}" >
<TextBlock Text="当前厚度" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock >
<Run Text="{Binding Accessory.Thickness,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" />
<Run Text="m/min" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</StackPanel>
<StackPanel>
<StackPanel Margin="3" Background="{StaticResource Color_background2}" >
<TextBlock Text="当前线速度" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock >
<Run Text="{Binding Accessory.CurrentVelocity,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" />
<Run Text="m/min" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="理论线速度" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock >
<Run Text="{Binding Accessory.TargetVelocity,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" />
<Run Text="m/min" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
</Button>
</Viewbox>
</StackPanel> </StackPanel>
</Viewbox> </Viewbox>
......
...@@ -45,7 +45,14 @@ namespace FLY.Weight.UI.Client.UiModule ...@@ -45,7 +45,14 @@ namespace FLY.Weight.UI.Client.UiModule
new string[] { new string[] {
nameof(Common.WeighterAccessory.TotalFlowSetting), nameof(Common.WeighterAccessory.TotalFlowSetting),
nameof(Common.WeighterAccessory.TotalFlow), nameof(Common.WeighterAccessory.TotalFlow),
nameof(Common.WeighterAccessory.TotalProduction) nameof(Common.WeighterAccessory.TotalProduction),
nameof(Common.WeighterAccessory.TotalFilmWidth),
nameof(Common.WeighterAccessory.SetThickness),
nameof(Common.WeighterAccessory.Thickness),
nameof(Common.WeighterAccessory.Density),
nameof(Common.WeighterAccessory.TargetVelocity),
nameof(Common.WeighterAccessory.CurrentVelocity)
}); });
for (int i = 0; i < weightSystemService.Items.Count(); i++) for (int i = 0; i < weightSystemService.Items.Count(); i++)
...@@ -111,6 +118,26 @@ namespace FLY.Weight.UI.Client.UiModule ...@@ -111,6 +118,26 @@ namespace FLY.Weight.UI.Client.UiModule
} }
FLY.ControlLibrary.Window_Tip.Show("", "清空成功", TimeSpan.FromSeconds(2)); FLY.ControlLibrary.Window_Tip.Show("", "清空成功", TimeSpan.FromSeconds(2));
} }
private void button_thickness_Click(object sender, RoutedEventArgs e)
{
WdThicknessV5 w = new WdThicknessV5();
if (weightSystemService.Items.Count() < 1)
return;
w.SetThickness = (int)weightSystemService.Accessory.SetThickness;
w.FilmWidth = (int)weightSystemService.Accessory.TotalFilmWidth;
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
if (w.ShowDialog() == true)
{
weightSystemService.Accessory.SetThickness = w.SetThickness;
weightSystemService.Accessory.TotalFilmWidth = w.FilmWidth;
FLY.ControlLibrary.Window_Tip.Show("", "厚度参数设置成功", TimeSpan.FromSeconds(2));
}
}
} }
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Border Style="{StaticResource BorderStyle_block}" d:DataContext="{StaticResource unittests_weighters}"> <Border Style="{StaticResource BorderStyle_block}" d:DataContext="{StaticResource unittests_weighters}">
<Viewbox Margin="{StaticResource ControlMargin}" d:DataContext="{Binding Items[6]}" HorizontalAlignment="Left" VerticalAlignment="Top"> <Viewbox Margin="{StaticResource ControlMargin}" d:DataContext="{Binding Items[3]}" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel > <StackPanel >
<Button Margin="2" Style="{StaticResource Styles.Button.Empty}" Background="{Binding Color}" <Button Margin="2" Style="{StaticResource Styles.Button.Empty}" Background="{Binding Color}"
Click="button_ingredient_Click" Click="button_ingredient_Click"
......
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