Commit 860cc3c1 authored by 潘栩锋's avatar 潘栩锋 🚴

把称重状态的报警提示关闭

parent 27d5d716
......@@ -14,7 +14,6 @@
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/Themes/UcWeighterItemStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/DynAreaErrorStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<baseUiModule:DynAreaErrorVm2 x:Key="errorVm" IsError="True" ErrMsg="枫莱尔控制器连接断开 枫莱尔控制器连接断开"/>
</ResourceDictionary>
</UserControl.Resources>
......@@ -22,63 +21,62 @@
<Grid Height="150">
<Grid x:Name="grid_weighter" d:DataContext="{StaticResource unittests_weighters}"/>
<Border Style="{StaticResource Styles.Module.Border}"
<Border Style="{StaticResource Styles.Module.Border}"
Background="{StaticResource Color_background}"
DataContext="{Binding DataContext,ElementName=grid_weighter}"
>
<StackPanel >
<StackPanel >
<Grid Name="grid_flow" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<control:PieChart Grid.RowSpan="2" Width="60" Height="60" Margin="10"
<Grid Name="grid_flow" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<control:PieChart Grid.RowSpan="2" Width="60" Height="60" Margin="10"
ItemValueBinding="CurrentFlow" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<TextBlock Grid.Column="1" Text="总流量" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock Grid.Column="1" Text="总流量" Style="{StaticResource TextBlockStyle_title}" />
<Viewbox Grid.Column="1" Grid.Row="1" MaxHeight="80" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<Viewbox Grid.Column="1" Grid.Row="1" MaxHeight="80" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="4" >
<TextBlock Margin="4" >
<Run Text="{Binding Accessory.TotalFlow,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" FontSize="60" />
</TextBlock>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="20" />
</StackPanel>
</Viewbox>
</TextBlock>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="20" />
</StackPanel>
</Viewbox>
</Grid>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="平均厚度" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding Accessory.Thickness, StringFormat={}{0:F1}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="um" FontSize="12" />
</StackPanel>
</Grid>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="平均厚度" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding Accessory.Thickness, StringFormat={}{0:F1}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="um" FontSize="12" />
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="2" >
<TextBlock Text="边料" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding Accessory.RimCharge, StringFormat={}{0:F1}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="12" />
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="2" >
<TextBlock Text="边料" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding Accessory.RimCharge, StringFormat={}{0:F1}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="12" />
</StackPanel>
</Grid>
</StackPanel>
</Border>
<Button x:Name="grid_error" Style="{StaticResource DynAreaErrorStyle}" d:DataContext="{StaticResource errorVm}"/>
</StackPanel>
</Grid>
</StackPanel>
</Border>
</Grid>
......
......@@ -31,7 +31,7 @@ namespace FLY.Weight.UI.Client.UiModule
IUnityContainer container;
IWeightSystemService weightSystemService;
DynAreaErrorVm2 errorVm;
SetPLCUpdatePlan setPlan;
public DynAreaWeight()
......@@ -43,8 +43,7 @@ namespace FLY.Weight.UI.Client.UiModule
[InjectionMethod]
public void Init(
IUnityContainer container,
IWeightSystemService weightSystemService,
[Dependency("weighterWarningService")] IWarningSystem2Service warningSystem)
IWeightSystemService weightSystemService)
{
this.container = container;
this.weightSystemService = weightSystemService;
......@@ -52,9 +51,7 @@ namespace FLY.Weight.UI.Client.UiModule
grid_weighter.DataContext = this.weightSystemService;
errorVm = new DynAreaErrorVm2();
errorVm.Init(container, warningSystem, "称重");
grid_error.DataContext = errorVm;
//注册属性更新计划
string objname = nameof(IWeightSystemService.Accessory);
......
......@@ -22,43 +22,42 @@
<Grid Height="120">
<Grid x:Name="grid_weighter" d:DataContext="{StaticResource unittests_weighters}"/>
<Border Style="{StaticResource Styles.Module.Border}"
<Border Style="{StaticResource Styles.Module.Border}"
Background="{StaticResource Color_background}"
DataContext="{Binding DataContext,ElementName=grid_weighter}"
>
<StackPanel >
<StackPanel >
<Grid Name="grid_flow" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<control:PieChart Grid.RowSpan="2" Width="60" Height="60" Margin="10"
<Grid Name="grid_flow" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<control:PieChart Grid.RowSpan="2" Width="60" Height="60" Margin="10"
ItemValueBinding="CurrentFlow" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<TextBlock Grid.Column="1" Text="总流量" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock Grid.Column="1" Text="总流量" Style="{StaticResource TextBlockStyle_title}" />
<Viewbox Grid.Column="1" Grid.Row="1" MaxHeight="80" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<Viewbox Grid.Column="1" Grid.Row="1" MaxHeight="80" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="4" >
<TextBlock Margin="4" >
<Run Text="{Binding Accessory.TotalFlow,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" FontSize="60" />
</TextBlock>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="20" />
</StackPanel>
</Viewbox>
</TextBlock>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="20" />
</StackPanel>
</Viewbox>
</Grid>
</StackPanel>
</Border>
<Button x:Name="grid_error" Style="{StaticResource DynAreaErrorStyle}" d:DataContext="{StaticResource errorVm}"/>
</Grid>
</StackPanel>
</Border>
</Grid>
......
......@@ -31,7 +31,7 @@ namespace FLY.Weight.UI.Client.UiModule
IUnityContainer container;
IWeightSystemService weightSystemService;
DynAreaErrorVm2 errorVm;
//SetPLCUpdatePlan setPlan;
......@@ -44,9 +44,7 @@ namespace FLY.Weight.UI.Client.UiModule
[InjectionMethod]
public void Init(
IUnityContainer container,
IWeightSystemService weightSystemService,
[Dependency("weighterWarningService")] IWarningSystem2Service warningSystem
IWeightSystemService weightSystemService
)
{
this.container = container;
......@@ -54,9 +52,7 @@ namespace FLY.Weight.UI.Client.UiModule
grid_weighter.DataContext = this.weightSystemService;
errorVm = new DynAreaErrorVm2();
errorVm.Init(container, warningSystem, "称重");
grid_error.DataContext = errorVm;
//注册属性更新计划
//setPlan = new SetPLCUpdatePlan(
// this.weightSystemService.PLCos,
......
......@@ -23,56 +23,55 @@
<Border Style="{StaticResource Styles.Module.Border}"
<Border Style="{StaticResource Styles.Module.Border}"
Background="{StaticResource Color_background}"
DataContext="{Binding DataContext,ElementName=grid_weighter}"
>
<StackPanel >
<StackPanel >
<Grid Name="grid_flow" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<control:PieChart Grid.RowSpan="2" Width="60" Height="60" Margin="10"
<Grid Name="grid_flow" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<control:PieChart Grid.RowSpan="2" Width="60" Height="60" Margin="10"
ItemValueBinding="CurrentFlow" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<TextBlock Grid.Column="1" Text="总流量" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock Grid.Column="1" Text="总流量" Style="{StaticResource TextBlockStyle_title}" />
<Viewbox Grid.Column="1" Grid.Row="1" MaxHeight="80" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<Viewbox Grid.Column="1" Grid.Row="1" MaxHeight="80" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="4" >
<TextBlock Margin="4" >
<Run Text="{Binding Accessory.TotalFlow,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" FontSize="60" />
</TextBlock>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="20" />
</StackPanel>
</Viewbox>
</TextBlock>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" FontSize="20" />
</StackPanel>
</Viewbox>
</Grid>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="平均厚度" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding Accessory.Thickness, StringFormat={}{0:F1}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="um" FontSize="12" />
</StackPanel>
</Grid>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="平均厚度" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding Accessory.Thickness, StringFormat={}{0:F1}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="um" FontSize="12" />
</StackPanel>
</Grid>
</StackPanel>
</Border>
<Button x:Name="grid_error" Style="{StaticResource DynAreaErrorStyle}" d:DataContext="{StaticResource errorVm}"/>
</StackPanel>
</Grid>
</StackPanel>
</Border>
</Grid>
......
......@@ -32,7 +32,7 @@ namespace FLY.Weight.UI.Client.UiModule
IUnityContainer container;
IWeightSystemService weightSystemService;
SetPLCUpdatePlan setPlan;
DynAreaErrorVm2 errorVm;
public DynAreaWeightV5()
{
......@@ -44,8 +44,7 @@ namespace FLY.Weight.UI.Client.UiModule
public void Init(
IUnityContainer container,
IWeightSystemService weightSystemService,
[Dependency("weighterWarningService")] IWarningSystem2Service warningSystem
IWeightSystemService weightSystemService
)
{
this.container = container;
......@@ -53,10 +52,6 @@ namespace FLY.Weight.UI.Client.UiModule
grid_weighter.DataContext = this.weightSystemService;
errorVm = new DynAreaErrorVm2();
errorVm.Init(container, warningSystem, "称重");
grid_error.DataContext = errorVm;
//注册属性更新计划
string objname = nameof(IWeightSystemService.Accessory);
setPlan = new SetPLCUpdatePlan(
......
......@@ -7,6 +7,7 @@
<container>
<instance name="cn0" value="thick" />
<instance name="cn1" value="autoDie" />
<instance name="cn2" value="weighter" />
</container>
</unity>
</configuration>
\ No newline at end of file
......@@ -12,7 +12,8 @@
"base.service.config",
"autoDie.service.config",
"objcomponents.service.config",
"thick.service.config"
"thick.service.config",
"weighter.service.config"
],
"Children": []
},
......@@ -42,7 +43,8 @@
"Path": [
"base.component.config",
"thick.component.config",
"autoDie.component.config"
"autoDie.component.config",
"weighter.component.config"
],
"Children": []
}
......
......@@ -23,6 +23,14 @@
<param name="devName" value="测厚仪" />
</constructor>
</register>
<register type="WarningSystem2ServiceClientWithName" name="称重">
<lifetime type="singleton" />
<constructor>
<param name="serviceId" value="20000" />
<param name="connName" value="weighter" />
<param name="devName" value="称重" />
</constructor>
</register>
</container>
</unity>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection,Unity.Configuration" />
</configSections>
<unity>
<assembly name="FLY.Weight.UI.Client" />
<namespace name="FLY.Weight.UI.Client.UiModule" />
<alias alias="IUiModule2" type="MultiLayout.UiModule.IUiModule2, MultiLayout" />
<container>
<register type="IUiModule2" mapTo="UiModule2_MenuSetting" name="weighter_ms" />
<register type="IUiModule2" mapTo="UiModule2_DynAreaWeight" name="weighter_da" />
<register type="IUiModule2" mapTo="UiModule2_FlowGraph" name="weighter_fg" />
<register type="IUiModule2" mapTo="UiModule2_MainGraph" name="weighter_mg" />
</container>
</unity>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection,Unity.Configuration" />
</configSections>
<unity>
<assembly name="FLY.Weight" />
<namespace name="FLY.Weight.IService" />
<namespace name="FLY.Weight.Client" />
<namespace name="FLY.Weight.Server.Model" />
<assembly name="FLY.OBJComponents" />
<namespace name="FLY.OBJComponents.IService" />
<namespace name="FLY.OBJComponents.Client" />
<assembly name="FLY.Weight.UI.Client" />
<namespace name="FLY.Weight.UI.Client" />
<container>
<register type="IWeightSystemService" mapTo="WeightSystemServiceClientWithColor">
<lifetime type="singleton" />
<constructor>
<param name="serviceId" value="35000" />
<param name="connName" dependencyName="cn2" />
</constructor>
</register>
<register type="IBulkDbFlowService" mapTo="BulkDbFlowServiceClient">
<lifetime type="singleton" />
<constructor>
<param name="serviceId" value="35004" />
<param name="connName" dependencyName="cn2" />
</constructor>
</register>
<register type="MixBufferCollection">
<lifetime type="singleton" />
<constructor>
<param name="baseId" value="35005" />
<param name="connName" dependencyName="cn2" />
</constructor>
</register>
<register type="IWarningSystem2Service" mapTo="WarningSystem2ServiceClient" name="weighterWarningService">
<lifetime type="singleton" />
<constructor>
<param name="serviceId" value="20000" />
<param name="connName" dependencyName="cn2" />
</constructor>
</register>
</container>
</unity>
</configuration>
\ No newline at end of file
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