Commit f7402ca1 authored by 潘栩锋's avatar 潘栩锋 :bicyclist:

修改 收卷,IBC,称重样式,颜色

parent cbd1307f
......@@ -157,10 +157,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\TempAreaPanel\TempAreaPanel.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\TempAreaPanel\TempAreaPanelStyle.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......@@ -248,9 +244,6 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="UiModule\TempAreaPanel\TempAreaPanel.xaml.cs">
<DependentUpon>TempAreaPanel.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\IbcCtrlGraph\WdGraphSet.xaml.cs">
<DependentUpon>WdGraphSet.xaml</DependentUpon>
</Compile>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Color.Dark.xaml"/>
<ResourceDictionary Source="Color.Light.xaml"/>
</ResourceDictionary.MergedDictionaries>
......
......@@ -10,9 +10,7 @@
<!--字体大小-->
<sys:Double x:Key="FontSize_title">18</sys:Double>
<sys:Double x:Key="FontSize_unit">16</sys:Double>
<sys:Double x:Key="FontSize_context_min">32</sys:Double>
<sys:Double x:Key="FontSize_context_max">48</sys:Double>
<sys:Double x:Key="FontSize_text">48</sys:Double>
<sys:Double x:Key="FontSize_text">24</sys:Double>
<sys:Double x:Key="FontSize_text_small">18</sys:Double>
<sys:Double x:Key="FontSize_text_large">32</sys:Double>
</ResourceDictionary>
\ No newline at end of file
......@@ -39,12 +39,12 @@
Foreground="{StaticResource Color_title}" Margin="2" FontFamily="Global Sans Serif"
Text="折径" />
<Viewbox Grid.Column="1" Grid.Row="1" MaxHeight="60" HorizontalAlignment="Left">
<Viewbox Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Stretch="Uniform" StretchDirection="DownOnly">
<StackPanel Orientation="Horizontal" Margin="3,0">
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}"
Foreground="{StaticResource Color_text}"
Text="{Binding FilmWidth,StringFormat={}{0:F0}}" />
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}"
Foreground="{StaticResource Color_text}" FontSize="60"
Text="{Binding FilmWidth,StringFormat={}{0:F0}}" />
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}" FontSize="24"
Foreground="{StaticResource Color_unit}"
Text="mm" />
</StackPanel>
......
......@@ -29,7 +29,7 @@
<Border Style="{StaticResource Styles.Module.Border}"
Background="{StaticResource Color_background}"
DataContext="{Binding DataContext,ElementName=grid_ibc}">
<Viewbox MaxHeight="200" HorizontalAlignment="Left" VerticalAlignment="Top">
<Viewbox HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform" StretchDirection="DownOnly">
<StackPanel Orientation="Horizontal">
<Grid Margin="30,10">
......@@ -53,7 +53,7 @@
Text="显示" />
<StackPanel Orientation="Horizontal" Margin="3,0">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}"
FontSize="{StaticResource FontSize_context_min}"
FontSize="{StaticResource FontSize_text}"
Foreground="{StaticResource Color_text}"
Text="{Binding InletAirFreq,StringFormat={}{0:F1}}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}"
......@@ -65,8 +65,8 @@
<StackPanel Orientation="Horizontal" Grid.Column="2" Background="{StaticResource Color_badgeBg}">
<StackPanel Orientation="Horizontal" Margin="7,3">
<TextBlock Text="进风" FontSize="30" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="风机" FontSize="20" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="进风" FontSize="{StaticResource FontSize_text_large}" Foreground="{StaticResource Color_badgeText}" Height="52" VerticalAlignment="Bottom"/>
<TextBlock Text="风机" FontSize="{StaticResource FontSize_text_small}" Foreground="{StaticResource Color_badgeText}"/>
</StackPanel>
</StackPanel>
<TextBlock Grid.Row="1" Grid.Column="0" Margin="3,0"
......@@ -83,7 +83,7 @@
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}"
VerticalAlignment="Bottom"
FontSize="{StaticResource FontSize_context_max}"
FontSize="{StaticResource FontSize_text_large}"
Foreground="{StaticResource Color_text_activity}"
Background="{StaticResource Color_text_activity_background}"
Text="{Binding InletAirFreqSet,StringFormat={}{0:F1}}" />
......@@ -137,7 +137,7 @@
Text="显示" />
<StackPanel Orientation="Horizontal" Margin="3,0">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}"
FontSize="{StaticResource FontSize_context_min}"
FontSize="{StaticResource FontSize_text}"
Foreground="{StaticResource Color_text}"
Text="{Binding OutletAirFreq,StringFormat={}{0:F1}}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}"
......@@ -149,8 +149,8 @@
<StackPanel Orientation="Horizontal" Grid.Column="2" Background="{StaticResource Color_badgeBg}">
<StackPanel Orientation="Horizontal" Margin="7,3">
<TextBlock Text="出风" FontSize="30" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="风机" FontSize="20" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="出风" FontSize="{StaticResource FontSize_text_large}" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="风机" FontSize="{StaticResource FontSize_text_small}" Foreground="{StaticResource Color_badgeText}"/>
</StackPanel>
</StackPanel>
<TextBlock Grid.Row="1" Grid.Column="0" Margin="3,0"
......@@ -167,7 +167,7 @@
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}"
VerticalAlignment="Bottom"
FontSize="{StaticResource FontSize_context_max}"
FontSize="{StaticResource FontSize_text_large}"
Foreground="{StaticResource Color_text_activity}"
Background="{StaticResource Color_text_activity_background}"
Text="{Binding OutletAirFreqSet,StringFormat={}{0:F1}}" />
......@@ -218,7 +218,7 @@
Text="折径显示" />
<StackPanel Orientation="Horizontal" Margin="3,0">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}"
FontSize="{StaticResource FontSize_context_min}"
FontSize="{StaticResource FontSize_text}"
Foreground="{StaticResource Color_text}"
Text="{Binding FilmWidth,StringFormat={}{0:F0}}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}"
......@@ -228,7 +228,7 @@
</StackPanel>
</StackPanel>
<TextBlock Text="IBC" Grid.Column="1" FontSize="30" Margin="7,3" Padding="20,0" Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"/>
<TextBlock Text="IBC" Grid.Column="1" FontSize="{StaticResource FontSize_text_large}" Margin="7,3" Padding="20,0" Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"/>
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2">
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="3,0" >
......@@ -251,7 +251,7 @@
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}"
VerticalAlignment="Bottom"
FontSize="{StaticResource FontSize_context_min}"
FontSize="{StaticResource FontSize_text_large}"
Foreground="{StaticResource Color_text_activity}"
Background="{StaticResource Color_text_activity_background}"
Text="{Binding FilmWidthSet,StringFormat={}{0:F0}}" />
......@@ -271,7 +271,7 @@
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}"
VerticalAlignment="Bottom"
FontSize="{StaticResource FontSize_context_min}"
FontSize="{StaticResource FontSize_text_large}"
Foreground="{StaticResource Color_text_activity_warning}"
Background="{StaticResource Color_text_activity_background_warning}"
Text="{Binding ErrorCorrection,StringFormat={}{0:F0}}" />
......@@ -291,15 +291,15 @@
<Button Style="{StaticResource Styles.Button.Empty}" Click="button_k123_Click" Margin="-20,5,20,5" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Style="{StaticResource Styles.Shadow}">
<Border CornerRadius="5" Background="{StaticResource Color_theme_plus}">
<Path Margin="10" Width="60" Height="50" Stretch="Fill" Stroke="White" StrokeThickness="3" Data="M150,200 L0,300 M150,200 L300,300 M150,200 L150,0 M150,0 0,300 300,300 Z" />
<Path Margin="10" Width="45" Height="37" Stretch="Fill" Stroke="White" StrokeThickness="3" Data="M150,200 L0,300 M150,200 L300,300 M150,200 L150,0 M150,0 0,300 300,300 Z" />
</Border>
<TextBlock Text="膜泡校正" Foreground="White" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Center" Background="{StaticResource Color_theme_plus}" Margin="0,0,0,-10" FontSize="{StaticResource FontSize_title}"/>
<TextBlock Text="膜泡校正" Foreground="White" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Center" Background="{StaticResource Color_theme_plus}" Margin="0,0,0,-10" FontSize="12" Padding="4,2"/>
</Grid>
</Button>
<flyctrl:ToggleButtonOnOff
OnLabel="自动" OnBrush="{StaticResource Color_on}"
OffLabel="手动" OffBrush="{StaticResource Color_off}"
Grid.Column="1" HorizontalAlignment="Right" Margin="{StaticResource ControlMargin}"
Grid.Column="1" HorizontalAlignment="Right" Margin="{StaticResource ControlMargin}" VerticalAlignment="Top"
IsChecked="{Binding IsIBCAuto}"/>
</Grid>
......
<UserControl x:Class="FLY.IBC.UI.Client.UiModule.TempAreaPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
mc:Ignorable="d" d:DesignWidth="960" d:DesignHeight="890" Unloaded="UserControl_Unloaded" >
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="TempAreaPanelStyle.xaml"/>
<ResourceDictionary Source="UcTcStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid d:DataContext="{StaticResource ibcServiceUt}">
<ItemsControl ItemsSource="{Binding TAreas}" >
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Style="{StaticResource Styles.Button.Empty}" Tag="{Binding .}" Click="btnTAreaClick">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Style="{StaticResource Styles.Module.Border}" Background="{StaticResource Color_background}" CornerRadius="5,0,0,5" Width="100">
<TextBlock Text="{Binding Number}" FontSize="50" Foreground="{StaticResource Color_title}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<UniformGrid Columns="6" Grid.Column="1">
<UniformGrid.Resources>
<Style TargetType="ContentControl">
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="MinWidth" Value="150"/>
<Setter Property="MinHeight" Value="116"/>
</Style>
</UniformGrid.Resources>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[0]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[1]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[2]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[3]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[4]}"/>
</Viewbox>
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
<ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[5]}"/>
</Viewbox>
</UniformGrid>
</Grid>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>
\ No newline at end of file
......@@ -133,7 +133,7 @@
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Top"
Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"
Padding="6,2"
FontSize="30"
FontSize="15"
Text="{Binding Number}" Margin="0,-5,-5,0"/>
</Grid>
</DataTemplate>
......@@ -152,7 +152,7 @@
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Top"
Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"
Padding="6,2"
FontSize="30"
FontSize="20"
Margin="0,-5,-5,0">
<Run Text="{Binding Number}"/><Run Text="层"/>
</TextBlock>
......@@ -166,13 +166,11 @@
Background="{StaticResource Color_background2}"
Text="{Binding AllTempSet,StringFormat={}{0:0.#}}" />
</StackPanel>
<Viewbox Width="150">
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}"
HorizontalAlignment="Left" Margin="{StaticResource ControlMargin}" Width="170"
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}"
HorizontalAlignment="Left" Margin="{StaticResource ControlMargin}" Width="120"
OnLabel="全部运行" OnBrush="{StaticResource Color_on}"
OffLabel="全部停止" OffBrush="{StaticResource Color_off}"
IsChecked="{Binding IsAllTempSame}"/>
</Viewbox>
</StackPanel>
</Grid>
</Border>
......
......@@ -72,7 +72,7 @@
<lvc:AxisSection Style="{StaticResource AxisSectionStyle}" Value="0" Stroke="{StaticResource Brushes.ChartAxisLabel0}" />
</lvc:Axis.Sections>
<lvc:Axis.Separator>
<lvc:Separator Stroke="{StaticResource Brushes.ChartSeparator}" />
<lvc:Separator Stroke="Transparent" />
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
......
......@@ -70,7 +70,6 @@
<lvc:CartesianChart.AxisY>
<lvc:Axis LabelFormatter="{Binding YFormatter}" Foreground="Transparent"
MinValue="{Binding YMin}" MaxValue="{Binding YMax}" FontFamily="Courier New" >
<lvc:Axis.Sections>
<lvc:AxisSection Style="{StaticResource AxisSectionStyle}" Value="{Binding YMax}" Stroke="{StaticResource Brushes.ChartAxisLabel3}"/>
<lvc:AxisSection Style="{StaticResource AxisSectionStyle}" Value="{Binding YMin}" Stroke="{StaticResource Brushes.ChartAxisLabel3}"/>
......@@ -81,7 +80,7 @@
<lvc:AxisSection Style="{StaticResource AxisSectionStyle}" Value="0" Stroke="{StaticResource Brushes.ChartAxisLabel0}" />
</lvc:Axis.Sections>
<lvc:Axis.Separator>
<lvc:Separator Stroke="{StaticResource Brushes.ChartSeparator}" />
<lvc:Separator Stroke="Transparent" />
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
......
......@@ -95,10 +95,17 @@
<Compile Include="UiModule\FeederPanel\FeederPanel2.xaml.cs">
<DependentUpon>FeederPanel2.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\FeederPanel\FeederStatusConv.cs" />
<Compile Include="UiModule\FeederPanel\UcFeeder2.xaml.cs">
<DependentUpon>UcFeeder2.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\FeederPanel\UiModule2_FeederPanel.cs" />
<Compile Include="UiModule\V0\UcTotalFlowV0.xaml.cs">
<DependentUpon>UcTotalFlowV0.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V3\UcTotalFlowV3_2.xaml.cs">
<DependentUpon>UcTotalFlowV3_2.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V4\MenuSettingV4.xaml.cs">
<DependentUpon>MenuSettingV4.xaml</DependentUpon>
</Compile>
......@@ -114,11 +121,11 @@
<Compile Include="UiModule\FlowGraph.xaml.cs">
<DependentUpon>FlowGraph.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V0\MainGraph02.xaml.cs">
<DependentUpon>MainGraph02.xaml</DependentUpon>
<Compile Include="UiModule\V0\MainGraphV0_2.xaml.cs">
<DependentUpon>MainGraphV0_2.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V0\MainGraph00.xaml.cs">
<DependentUpon>MainGraph00.xaml</DependentUpon>
<Compile Include="UiModule\V0\MainGraphV0.xaml.cs">
<DependentUpon>MainGraphV0.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V3\MainGraphV3_2.xaml.cs">
<DependentUpon>MainGraphV3_2.xaml</DependentUpon>
......@@ -162,20 +169,23 @@
<Compile Include="UiModule\V4\UcThicknessV4.xaml.cs">
<DependentUpon>UcThicknessV4.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V3\UcThickness.xaml.cs">
<DependentUpon>UcThickness.xaml</DependentUpon>
<Compile Include="UiModule\V3\UcThicknessV3.xaml.cs">
<DependentUpon>UcThicknessV3.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V4\UcTotalFlowV4.xaml.cs">
<DependentUpon>UcTotalFlowV4.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V3\UcTotalFlow.xaml.cs">
<DependentUpon>UcTotalFlow.xaml</DependentUpon>
<Compile Include="UiModule\V3\UcTotalFlowV3.xaml.cs">
<DependentUpon>UcTotalFlowV3.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V0\UcWeighterItemV0_2.xaml.cs">
<DependentUpon>UcWeighterItemV0_2.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V0\UcWeighterItem2.xaml.cs">
<DependentUpon>UcWeighterItem2.xaml</DependentUpon>
<Compile Include="UiModule\V0\UcWeighterItemV0.xaml.cs">
<DependentUpon>UcWeighterItemV0.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V0\UcWeighterItem.xaml.cs">
<DependentUpon>UcWeighterItem.xaml</DependentUpon>
<Compile Include="UiModule\V5\UcTotalFlowV5.xaml.cs">
<DependentUpon>UcTotalFlowV5.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\V6\MainGraphV6.xaml.cs">
<DependentUpon>MainGraphV6.xaml</DependentUpon>
......@@ -298,6 +308,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V0\UcTotalFlowV0.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V3\UcTotalFlowV3_2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V4\MenuSettingV4.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......@@ -314,11 +332,11 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\V0\MainGraph02.xaml">
<Page Include="UiModule\V0\MainGraphV0_2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V0\MainGraph00.xaml">
<Page Include="UiModule\V0\MainGraphV0.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
......@@ -378,7 +396,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V3\UcThickness.xaml">
<Page Include="UiModule\V3\UcThicknessV3.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
......@@ -386,18 +404,22 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V3\UcTotalFlow.xaml">
<Page Include="UiModule\V3\UcTotalFlowV3.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\V0\UcWeighterItem2.xaml">
<Page Include="UiModule\V0\UcWeighterItemV0_2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V0\UcWeighterItem.xaml">
<Page Include="UiModule\V0\UcWeighterItemV0.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\V5\UcTotalFlowV5.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\V6\MainGraphV6.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......
......@@ -12,9 +12,10 @@
<sys:Double x:Key="d100">100</sys:Double>
<sys:Double x:Key="FontSize_title">18</sys:Double>
<sys:Double x:Key="FontSize_unit">12</sys:Double>
<sys:Double x:Key="FontSize_context_min">32</sys:Double>
<sys:Double x:Key="FontSize_context_max">48</sys:Double>
<sys:Double x:Key="FontSize_unit">16</sys:Double>
<sys:Double x:Key="FontSize_text">24</sys:Double>
<sys:Double x:Key="FontSize_text_small">18</sys:Double>
<sys:Double x:Key="FontSize_text_large">32</sys:Double>
<Style TargetType="Viewbox" x:Key="ViewerStyle">
<Setter Property="MaxHeight" Value="130"/>
......
......@@ -6,10 +6,7 @@
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<sys:Double x:Key="FontSize_title">18</sys:Double>
<sys:Double x:Key="FontSize_unit">18</sys:Double>
<sys:Double x:Key="FontSize_text">48</sys:Double>
<sys:Double x:Key="FontSize_text_mid">36</sys:Double>
<Style x:Key="TextBlockStyle_title" TargetType="TextBlock">
<Setter Property="FontSize" Value="{StaticResource FontSize_title}"/>
<Setter Property="Foreground" Value="{StaticResource Color_title}"/>
......
......@@ -4,7 +4,8 @@
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.UiModule"
mc:Ignorable="d" d:DesignWidth="1600" d:DesignHeight="954" Unloaded="UserControl_Unloaded" Loaded="UserControl_Loaded" >
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890"
Unloaded="UserControl_Unloaded" Loaded="UserControl_Loaded" >
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace FLY.Weight.UI.Client.UiModule
{
public class FeederStatusConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (!(value is float))
{
return "";
}
var status = (float)value;
if (status == 0)
{
return "";
}
else if (status == 1)
{
return "等待";
}
else if (status == 2)
{
return "满桶";
}
else if (status == 3)
{
return "吸料";
}
else if (status == 4)
{
return "排空";
}
else
{
return "";
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors" >
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="FeederPanelStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:FeederStatusConverter x:Key="feederStatusConv"/>
<!--单层吸料界面模板 横向-->
<DataTemplate x:Key="FeederTemplate">
<Grid >
......@@ -65,9 +66,8 @@
<Viewbox Margin="{StaticResource ControlMargin}" Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid >
<StackPanel>
<Border Width="100" Background="{StaticResource Color_badgeBg}" Margin="3" HorizontalAlignment="Left">
<TextBlock Text="{Binding Number}" Width="100" Height="100" FontSize="100" FontWeight="Bold" FontFamily="Arial Black" Foreground="{StaticResource Color_badgeText}" VerticalAlignment="Top" HorizontalAlignment="Left"/>
<Border Width="115" Background="{StaticResource Color_badgeBg}" Margin="3,0" HorizontalAlignment="Left">
<TextBlock Text="{Binding Number}" FontSize="50" FontWeight="Bold" FontFamily="Arial Black" Foreground="{StaticResource Color_badgeText}" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
</Border>
<ItemsControl ItemsSource="{Binding Feeders}">
<ItemsControl.ItemsPanel>
......@@ -79,26 +79,33 @@
<DataTemplate>
<StackPanel Margin="{StaticResource ControlMargin}">
<Grid HorizontalAlignment="Left">
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}" Width="140"
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}" Width="105"
Margin="{StaticResource ControlMargin}"
OnLabel="吸料开" OnBrush="{StaticResource Color_on}"
OffLabel="吸料关" OffBrush="{StaticResource Color_off}"
IsChecked="{Binding IsFeederOn}"/>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Padding="6,2" Margin="0,-5,-5,0"
Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"
FontSize="30"
Text="{Binding Number}" />
Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"
FontSize="15"
Text="{Binding Number}" />
</Grid>
<Grid Width="20"/>
<Button Style="{StaticResource MahApps.Styles.Button.Square.Accent}"
Padding="20,5" Margin="{StaticResource ControlMargin}"
FontSize="{StaticResource FontSize_title}"
Content="复位"
Visibility="{Binding IsFeederResetValid,Converter={StaticResource visbilityconv}}">
<i:Interaction.Behaviors>
<flyctrl:Set1Behavior Binding="{Binding FeederReset}"/>
</i:Interaction.Behaviors>
</Button>
<Grid>
<Button Style="{StaticResource MahApps.Styles.Button.Square.Accent}"
Margin="{StaticResource ControlMargin}"
FontSize="{StaticResource FontSize_title}"
Content="复位"
Visibility="{Binding IsFeederResetValid,Converter={StaticResource visbilityconv}}">
<i:Interaction.Behaviors>
<flyctrl:Set1Behavior Binding="{Binding FeederReset}"/>
</i:Interaction.Behaviors>
</Button>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" HorizontalAlignment="Center"
Visibility="{Binding IsFeederResetValid,Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}"
Text="{Binding FeederStatus,Converter={StaticResource feederStatusConv}}"
/>
</Grid>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
......
......@@ -6,12 +6,14 @@
xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:uiModule="clr-namespace:FLY.Weight.UI.Client.UiModule"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="FeederPanelStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<uiModule:FeederStatusConverter x:Key="feederStatusConv"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid d:DataContext="{Binding Source={StaticResource feederSystemUt},Path=FeederDatas[0]}">
......@@ -19,9 +21,8 @@
<Viewbox Margin="{StaticResource ControlMargin}" Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid >
<StackPanel>
<Border Width="100" Background="{StaticResource Color_badgeBg}" Margin="3" HorizontalAlignment="Left">
<TextBlock Text="{Binding Number}" Width="100" Height="100" FontSize="100" FontWeight="Bold" FontFamily="Arial Black" Foreground="{StaticResource Color_badgeText}" VerticalAlignment="Top" HorizontalAlignment="Left"/>
<Border Width="115" Background="{StaticResource Color_badgeBg}" Margin="3,0" HorizontalAlignment="Left">
<TextBlock Text="{Binding Number}" FontSize="50" FontWeight="Bold" FontFamily="Arial Black" Foreground="{StaticResource Color_badgeText}" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
</Border>
<ItemsControl ItemsSource="{Binding Feeders}">
<ItemsControl.ItemsPanel>
......@@ -33,26 +34,33 @@
<DataTemplate>
<StackPanel Margin="{StaticResource ControlMargin}">
<Grid HorizontalAlignment="Left">
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}" Width="140"
<flyctrl:ToggleButtonOnOff Style="{StaticResource ToggleButtonOnOffStyle}" Width="105"
Margin="{StaticResource ControlMargin}"
OnLabel="吸料开" OnBrush="{StaticResource Color_on}"
OffLabel="吸料关" OffBrush="{StaticResource Color_off}"
IsChecked="{Binding IsFeederOn}"/>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Padding="6,2" Margin="0,-5,-5,0"
Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"
FontSize="30"
Text="{Binding Number}" />
Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"
FontSize="15"
Text="{Binding Number}" />
</Grid>
<Grid>
<Button Style="{StaticResource MahApps.Styles.Button.Square.Accent}"
Margin="{StaticResource ControlMargin}"
FontSize="{StaticResource FontSize_title}"
Content="复位"
Visibility="{Binding IsFeederResetValid,Converter={StaticResource visbilityconv}}">
<i:Interaction.Behaviors>
<flyctrl:Set1Behavior Binding="{Binding FeederReset}"/>
</i:Interaction.Behaviors>
</Button>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" HorizontalAlignment="Center"
Visibility="{Binding IsFeederResetValid,Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}"
Text="{Binding FeederStatus,Converter={StaticResource feederStatusConv}}"
/>
</Grid>
<Grid Width="20"/>
<Button Style="{StaticResource MahApps.Styles.Button.Square.Accent}"
Padding="20,5" Margin="{StaticResource ControlMargin}"
FontSize="{StaticResource FontSize_title}"
Content="复位"
Visibility="{Binding IsFeederResetValid,Converter={StaticResource visbilityconv}}">
<i:Interaction.Behaviors>
<flyctrl:Set1Behavior Binding="{Binding FeederReset}"/>
</i:Interaction.Behaviors>
</Button>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
......
......@@ -25,7 +25,7 @@
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlowV4 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<local:UcTotalFlowV0 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
......@@ -39,7 +39,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItem Margin="{StaticResource ControlMargin}"
<local:UcWeighterItemV0 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext, ElementName=container_grid}"/>
</DataTemplate>
......
......@@ -54,7 +54,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient) {
......@@ -86,7 +86,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -25,7 +25,7 @@
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlowV4 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<local:UcTotalFlowV0 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
......@@ -39,7 +39,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItem2 Margin="{StaticResource ControlMargin}"
<local:UcWeighterItemV0_2 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext, ElementName=container_grid}"/>
</DataTemplate>
......
......@@ -54,7 +54,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient) {
......@@ -86,7 +86,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
<UserControl x:Class="FLY.Weight.UI.Client.UiModule.UcTotalFlowV0"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d" d:DesignWidth ="960" >
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/Themes/UcWeighterItemStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Border Style="{StaticResource BorderStyle_block}" d:DataContext="{StaticResource weightSystemUt}">
<Viewbox Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal">
<Viewbox Margin="15,5" MaxHeight="90" Stretch="Uniform" StretchDirection="DownOnly" >
<Button Style="{StaticResource Styles.Button.Empty}" Background="Transparent" Click="button_ratio_Click" Margin="30,5">
<StackPanel Orientation="Horizontal">
<control:PieChart Width="60" Height="60" Margin="5"
ItemValueBinding="CurrentFlow" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<StackPanel VerticalAlignment="Bottom">
<StackPanel Orientation="Horizontal">
<TextBlock Text="设置&#13;总流量" Style="{StaticResource TextBlockStyle_title_activity}" Margin="3,0"/>
<TextBlock>
<Run Text="{Binding Accessory.TotalFlowSetting,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" FontSize="{StaticResource FontSize_text_large}"/>
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="当前&#13;总流量" Style="{StaticResource TextBlockStyle_title}" Margin="3,0"/>
<TextBlock>
<Run Text="{Binding Accessory.TotalFlow,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_text_large}"/>
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
</Button>
</Viewbox>
<Viewbox Margin="15,5" MaxHeight="90" Stretch="Uniform" StretchDirection="DownOnly">
<StackPanel Orientation="Horizontal" >
<control:PieChart Width="60" Height="60" Margin="5"
ItemValueBinding="CumulativeProduction" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="累计总产量" Style="{StaticResource TextBlockStyle_title}" Grid.RowSpan="2" />
<Button Style="{StaticResource Styles.Button.Icon.Large}"
Foreground="{StaticResource Brushes.Validation}"
HorizontalAlignment="Right" Grid.Column="1" Grid.RowSpan="2" VerticalAlignment="Top" Click="button_clear_Click">
<Grid Style="{StaticResource Styles.Shadow}">
<Rectangle Width="30" Height="30" Fill="White"/>
<iconPacks:PackIconMaterial Kind="CloseBox" Width="40"/>
</Grid>
</Button>
<TextBlock Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Bottom" Grid.ColumnSpan="2" >
<Run Text="{Binding Accessory.TotalProduction,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_text_large}"/>
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</Grid>
</StackPanel>
</Viewbox>
</StackPanel>
</Viewbox>
</Border>
</UserControl>
using FLY.IBC.Client;
using FLY.IBC.Common;
using FLY.IBC.IService;
using FLY.OBJComponents.Client;
using MultiLayout.UiModule;
using FLY.OBJComponents.Client;
using FLY.Weight.Client;
using FLY.Weight.IService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using Unity;
namespace FLY.IBC.UI.Client.UiModule
namespace FLY.Weight.UI.Client.UiModule
{
/// <summary>
/// TempAreaPanel.xaml 的交互逻辑
/// UcTotalFlow.xaml 的交互逻辑
/// </summary>
public partial class TempAreaPanel : UserControl
public partial class UcTotalFlowV0 : UserControl
{
IIbcSystemService ibcSystemService;
IUnityContainer container;
List<SetPLCUpdatePlan> setPlan_items = new List<SetPLCUpdatePlan>();
IWeightSystemService weightSystemService;
static string[] update_propertynames;
static TempAreaPanel() {
string[] propertynames = new string[] {
nameof(Common.TempArea.TempPV1),
nameof(Common.TempArea.TempSV1),
nameof(Common.TempArea.IsHeating1),
nameof(Common.TempArea.IsHeatingSet1),
nameof(Common.TempArea.IsCooling1),
nameof(Common.TempArea.IsSelfAdjusting1)
};
List<string> update_propertynames = new List<string>();
for (int i = 0; i < 6; i++) {
for (int j = 0; j < propertynames.Count(); j++)
{
update_propertynames.Add(propertynames[j].Replace("1", (i + 1).ToString()));
}
}
SetPLCUpdatePlan setPlan_accessory;
List<SetPLCUpdatePlan> setPlan_items = new List<SetPLCUpdatePlan>();
TempAreaPanel.update_propertynames = update_propertynames.ToArray();
}
public TempAreaPanel()
public UcTotalFlowV0()
{
InitializeComponent();
}
[InjectionMethod]
public void Init(
IUnityContainer container,
IIbcSystemService ibcSystemService)
public void Init(IWeightSystemService weightSystemService)
{
this.ibcSystemService = ibcSystemService;
this.DataContext = this.ibcSystemService;
this.weightSystemService = weightSystemService;
this.DataContext = weightSystemService;
string objname = nameof(IWeightSystemService.Accessory);
setPlan_accessory = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
new string[] {
nameof(Common.WeighterAccessory.TotalFlowSetting),
nameof(Common.WeighterAccessory.TotalFlow),
nameof(Common.WeighterAccessory.TotalProduction)
});
for (int i = 0; i < this.ibcSystemService.TAreas.Count(); i++)
for (int i = 0; i < weightSystemService.Items.Count(); i++)
{
string objname = $"{nameof(IIbcSystemService.TAreas)}[{i}]";
objname = $"{nameof(IWeightSystemService.Items)}[{i}]";
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.ibcSystemService.PLCos,
weightSystemService.PLCos,
objname,
update_propertynames);
item_update_propertynames);
setPlan_items.Add(plan);
}
if (ibcSystemService is IbcSystemServiceClient)
{
(ibcSystemService as IbcSystemServiceClient).ResetItemsEvent += MWeighterCsService_ResetItemsEvent;
}
if (weightSystemService is WeightSystemServiceClient)
(weightSystemService as WeightSystemServiceClient).ResetItemsEvent += MWeighterCsService_ResetItemsEvent;
}
private void MWeighterCsService_ResetItemsEvent()
{
//把多出来的删除
int remove_cnt = setPlan_items.Count() - this.ibcSystemService.TAreas.Count();
int remove_cnt = setPlan_items.Count() - weightSystemService.Items.Count();
if (remove_cnt > 0)
{
for (int i = 0; i < remove_cnt; i++)
......@@ -89,31 +71,37 @@ namespace FLY.IBC.UI.Client.UiModule
int add_cnt = -remove_cnt;
for (int i = 0; i < add_cnt; i++)
{
string objname = $"{nameof(IIbcSystemService.TAreas)}[{i+ start_idx}]";
string objname = $"{nameof(IWeightSystemService.Items)}[{start_idx + i}]";
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.ibcSystemService.PLCos,
weightSystemService.PLCos,
objname,
update_propertynames);
item_update_propertynames);
setPlan_items.Add(plan);
}
}
}
string[] item_update_propertynames = new string[] {
nameof(Common.WeighterC.CurrentFlow),
nameof(Common.WeighterC.CumulativeProduction),
nameof(Common.WeighterC.ClearProduction)
};
private void btnTAreaClick(object sender, RoutedEventArgs e)
private void button_ratio_Click(object sender, RoutedEventArgs e)
{
var button = sender as Button;
var tempArea = button.Tag as TempArea;
WdTempAreaSet w = new WdTempAreaSet();
w.Init(this.ibcSystemService, tempArea);
WdRatioSet w = new WdRatioSet();
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
w.Init(weightSystemService);
w.ShowDialog();
}
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
private void button_clear_Click(object sender, RoutedEventArgs e)
{
foreach (FLY.Weight.Common.WeighterC weight in weightSystemService.Items)
{
weight.ClearProduction = true;
}
FLY.ControlLibrary.Window_Tip.Show("", "清空成功", TimeSpan.FromSeconds(2));
}
}
}
......@@ -23,12 +23,12 @@ namespace FLY.Weight.UI.Client.UiModule
/// <summary>
/// UcWeighterItem.xaml 的交互逻辑
/// </summary>
public partial class UcWeighterItem : UserControl
public partial class UcWeighterItemV0 : UserControl
{
#region DependencyProperty
// Using a DependencyProperty as the backing store for WeightSystemService. This enables animation, styling, binding, etc...
public static readonly DependencyProperty WeightSystemServiceProperty =
DependencyProperty.Register(nameof(WeightSystemService), typeof(IWeightSystemService), typeof(UcWeighterItem), new PropertyMetadata(null));
DependencyProperty.Register(nameof(WeightSystemService), typeof(IWeightSystemService), typeof(UcWeighterItemV0), new PropertyMetadata(null));
public IWeightSystemService WeightSystemService
{
......@@ -37,7 +37,7 @@ namespace FLY.Weight.UI.Client.UiModule
}
public static readonly DependencyProperty ContainerProperty =
DependencyProperty.Register(nameof(Container), typeof(IUnityContainer), typeof(UcWeighterItem), new PropertyMetadata(null));
DependencyProperty.Register(nameof(Container), typeof(IUnityContainer), typeof(UcWeighterItemV0), new PropertyMetadata(null));
public IUnityContainer Container
{
......@@ -49,7 +49,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan;
int Index = 0;
public UcWeighterItem()
public UcWeighterItemV0()
{
InitializeComponent();
}
......
......@@ -23,12 +23,12 @@ namespace FLY.Weight.UI.Client.UiModule
/// <summary>
/// UcWeighterItem.xaml 的交互逻辑
/// </summary>
public partial class UcWeighterItem2 : UserControl
public partial class UcWeighterItemV0_2 : UserControl
{
#region DependencyProperty
// Using a DependencyProperty as the backing store for WeightSystemService. This enables animation, styling, binding, etc...
public static readonly DependencyProperty WeightSystemServiceProperty =
DependencyProperty.Register(nameof(WeightSystemService), typeof(IWeightSystemService), typeof(UcWeighterItem2), new PropertyMetadata(null));
DependencyProperty.Register(nameof(WeightSystemService), typeof(IWeightSystemService), typeof(UcWeighterItemV0_2), new PropertyMetadata(null));
public IWeightSystemService WeightSystemService
......@@ -38,7 +38,7 @@ namespace FLY.Weight.UI.Client.UiModule
}
public static readonly DependencyProperty ContainerProperty =
DependencyProperty.Register(nameof(Container), typeof(IUnityContainer), typeof(UcWeighterItem2), new PropertyMetadata(null));
DependencyProperty.Register(nameof(Container), typeof(IUnityContainer), typeof(UcWeighterItemV0_2), new PropertyMetadata(null));
public IUnityContainer Container
{
......@@ -51,7 +51,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan;
int Index = 0;
public UcWeighterItem2()
public UcWeighterItemV0_2()
{
InitializeComponent();
}
......
<UserControl x:Class="FLY.Weight.UI.Client.UiModule.UcThickness"
<UserControl x:Class="FLY.Weight.UI.Client.UiModule.UcThicknessV3"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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.UiModule"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
d:DesignWidth="300"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
......@@ -16,8 +15,8 @@
</UserControl.Resources>
<Border Style="{StaticResource BorderStyle_block}" d:DataContext="{StaticResource weightSystemUt}">
<Button Style="{StaticResource Styles.Button.Empty}" Background="Transparent" Click="button_thickness_Click" >
<Viewbox Margin="{StaticResource ControlMargin}" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Width="180">
<Viewbox Margin="{StaticResource ControlMargin}" Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Width="120">
<StackPanel Margin="3" >
<TextBlock Text="吹膜宽度" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
......@@ -25,17 +24,6 @@
<Run Text="mm" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="边料不回收" Style="{StaticResource TextBlockStyle_title_activity}"/>
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding Accessory.IsRimNoRecycle}" HorizontalAlignment="Left" IsEnabled="False"/>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="切边" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
<Run Text="{Binding Accessory.RimWidth,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="mm" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" Background="{StaticResource Color_background2}" >
<TextBlock Text="收卷宽度" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock >
......
......@@ -22,14 +22,14 @@ namespace FLY.Weight.UI.Client.UiModule
/// <summary>
/// UcThickness.xaml 的交互逻辑
/// </summary>
public partial class UcThickness : UserControl
public partial class UcThicknessV3 : UserControl
{
IWeightSystemService weightSystemService;
SetPLCUpdatePlan setPlan_accessory;
public UcThickness()
public UcThicknessV3()
{
InitializeComponent();
}
......
......@@ -23,14 +23,14 @@ namespace FLY.Weight.UI.Client.UiModule
/// <summary>
/// UcTotalFlow.xaml 的交互逻辑
/// </summary>
public partial class UcTotalFlow : UserControl
public partial class UcTotalFlowV3 : UserControl
{
IWeightSystemService weightSystemService;
SetPLCUpdatePlan setPlan_accessory;
List<SetPLCUpdatePlan> setPlan_items = new List<SetPLCUpdatePlan>();
public UcTotalFlow()
public UcTotalFlowV3()
{
InitializeComponent();
}
......
using FLY.OBJComponents.Client;
using FLY.Weight.Client;
using FLY.Weight.IService;
using MultiLayout.UiModule;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Unity;
namespace FLY.Weight.UI.Client.UiModule
{
/// <summary>
/// UcTotalFlow.xaml 的交互逻辑
/// </summary>
public partial class UcTotalFlowV3_2 : UserControl
{
IWeightSystemService weightSystemService;
SetPLCUpdatePlan setPlan_accessory;
List<SetPLCUpdatePlan> setPlan_items = new List<SetPLCUpdatePlan>();
public UcTotalFlowV3_2()
{
InitializeComponent();
}
public void Init(IWeightSystemService weightSystemService)
{
this.weightSystemService = weightSystemService;
this.DataContext = weightSystemService;
string objname = nameof(IWeightSystemService.Accessory);
setPlan_accessory = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
new string[] {
nameof(Common.WeighterAccessory.TotalFlowSetting),
nameof(Common.WeighterAccessory.TotalFlow),
nameof(Common.WeighterAccessory.TotalProduction),
nameof(Common.WeighterAccessory.TotalFilmWidth),
nameof(Common.WeighterAccessory.IsRimNoRecycle),
nameof(Common.WeighterAccessory.RimWidth),
nameof(Common.WeighterAccessory.ActFilmWidth),
nameof(Common.WeighterAccessory.SetThickness),
nameof(Common.WeighterAccessory.TargetVelocity),
nameof(Common.WeighterAccessory.CurrentVelocity)
});
for (int i = 0; i < weightSystemService.Items.Count(); i++)
{
objname = $"{nameof(IWeightSystemService.Items)}[{i}]";
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient)
(weightSystemService as WeightSystemServiceClient).ResetItemsEvent += MWeighterCsService_ResetItemsEvent;
}
private void MWeighterCsService_ResetItemsEvent()
{
//把多出来的删除
int remove_cnt = setPlan_items.Count() - weightSystemService.Items.Count();
if (remove_cnt > 0)
{
for (int i = 0; i < remove_cnt; i++)
{
SetPLCUpdatePlan plan = setPlan_items[setPlan_items.Count() - 1 - i];
plan.Dispose();
}
setPlan_items.RemoveRange(setPlan_items.Count() - remove_cnt, remove_cnt);
}
else
{
int start_idx = setPlan_items.Count();
int add_cnt = -remove_cnt;
for (int i = 0; i < add_cnt; i++)
{
string objname = $"{nameof(IWeightSystemService.Items)}[{start_idx+ i}]";
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
item_update_propertynames);
setPlan_items.Add(plan);
}
}
}
string[] item_update_propertynames = new string[] {
nameof(Common.WeighterC.CurrentFlow),//√
nameof(Common.WeighterC.CumulativeProduction),//√
};
private void button_ratio_Click(object sender, RoutedEventArgs e)
{
WdRatioSet w = new WdRatioSet();
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
w.Init(weightSystemService);
w.ShowDialog();
}
private void button_clear_Click(object sender, RoutedEventArgs e)
{
foreach (FLY.Weight.Common.WeighterC weight in weightSystemService.Items)
{
weight.ClearProduction = true;
}
FLY.ControlLibrary.Window_Tip.Show("", "清空成功", TimeSpan.FromSeconds(2));
}
private void button_thickness_Click(object sender, RoutedEventArgs e)
{
WdThickness w = new WdThickness();
if (weightSystemService.Items.Count() < 1)
return;
w.SetThickness = (int)weightSystemService.Accessory.SetThickness;
w.FilmWidth = (int)weightSystemService.Accessory.TotalFilmWidth;
w.RimWidth = (int)weightSystemService.Accessory.RimWidth;
w.IsRimNoRecycle = weightSystemService.Accessory.IsRimNoRecycle;
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
if (w.ShowDialog() == true)
{
weightSystemService.Accessory.SetThickness = w.SetThickness;
weightSystemService.Accessory.TotalFilmWidth = w.FilmWidth;
weightSystemService.Accessory.RimWidth = w.RimWidth;
weightSystemService.Accessory.IsRimNoRecycle = w.IsRimNoRecycle;
FLY.ControlLibrary.Window_Tip.Show("", "厚度参数设置成功", TimeSpan.FromSeconds(2));
}
}
}
}
using FLY.OBJComponents.Client;
using FLY.Weight.Client;
using FLY.Weight.IService;
using MultiLayout.UiModule;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Unity;
namespace FLY.Weight.UI.Client.UiModule
{
/// <summary>
/// UcTotalFlow.xaml 的交互逻辑
/// </summary>
public partial class UcTotalFlowV5 : UserControl
{
IWeightSystemService weightSystemService;
SetPLCUpdatePlan setPlan_accessory;
List<SetPLCUpdatePlan> setPlan_items = new List<SetPLCUpdatePlan>();
public UcTotalFlowV5()
{
InitializeComponent();
}
public void Init(IWeightSystemService weightSystemService)
{
this.weightSystemService = weightSystemService;
this.DataContext = weightSystemService;
string objname = nameof(IWeightSystemService.Accessory);
setPlan_accessory = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
new string[] {
nameof(Common.WeighterAccessory.TotalFlowSetting),
nameof(Common.WeighterAccessory.TotalFlow),
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++)
{
objname = $"{nameof(IWeightSystemService.Items)}[{i}]";
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient)
(weightSystemService as WeightSystemServiceClient).ResetItemsEvent += MWeighterCsService_ResetItemsEvent;
}
private void MWeighterCsService_ResetItemsEvent()
{
//把多出来的删除
int remove_cnt = setPlan_items.Count() - weightSystemService.Items.Count();
if (remove_cnt > 0)
{
for (int i = 0; i < remove_cnt; i++)
{
SetPLCUpdatePlan plan = setPlan_items[setPlan_items.Count() - 1 - i];
plan.Dispose();
}
setPlan_items.RemoveRange(setPlan_items.Count() - remove_cnt, remove_cnt);
}
else
{
int start_idx = setPlan_items.Count();
int add_cnt = -remove_cnt;
for (int i = 0; i < add_cnt; i++)
{
string objname = $"{nameof(IWeightSystemService.Items)}[{start_idx + i}]";
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
item_update_propertynames);
setPlan_items.Add(plan);
}
}
}
string[] item_update_propertynames = new string[] {
nameof(Common.WeighterC.CurrentFlow),
nameof(Common.WeighterC.CumulativeProduction),
nameof(Common.WeighterC.ClearProduction)
};
private void button_ratio_Click(object sender, RoutedEventArgs e)
{
WdRatioSet w = new WdRatioSet();
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
w.Init(weightSystemService);
w.ShowDialog();
}
private void button_clear_Click(object sender, RoutedEventArgs e)
{
foreach (FLY.Weight.Common.WeighterC weight in weightSystemService.Items)
{
weight.ClearProduction = true;
}
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));
}
}
}
}
......@@ -6,7 +6,10 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" >
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
......@@ -25,13 +28,13 @@
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlow x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<local:UcTotalFlowV3 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<local:UcThickness x:Name="ucThickness" Margin="{StaticResource ControlMargin}"/>
<local:UcThicknessV3 x:Name="ucThickness" Margin="{StaticResource ControlMargin}"/>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
......@@ -40,7 +43,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItem Margin="{StaticResource ControlMargin}"
<local:UcWeighterItemV0 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext, ElementName=container_grid}"/>
</DataTemplate>
......
......@@ -56,7 +56,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient) {
......@@ -88,7 +88,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -6,7 +6,10 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" >
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
......@@ -20,38 +23,29 @@
<Grid>
<Grid x:Name="container_grid"/>
<Viewbox Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Name="root_grid" d:DataContext="{StaticResource weightSystemUt}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlow x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<local:UcThickness x:Name="ucThickness" Margin="{StaticResource ControlMargin}"/>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItem2 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext,ElementName=container_grid}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
<Grid Name="root_grid" d:DataContext="{StaticResource weightSystemUt}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlowV3_2 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<ItemsControl x:Name="itemsControl" Grid.Row="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="{Binding ElementName=itemsControl,Path=Items.Count}"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItemV0_2 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext,ElementName=container_grid}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</ItemsControl>
</Grid>
</Viewbox>
</Grid>
</Grid>
</UserControl>
......@@ -44,7 +44,6 @@ namespace FLY.Weight.UI.Client.UiModule
{
this.container_grid.DataContext = container;
ucTotalFlow.Init(weightSystemService);
ucThickness.Init(weightSystemService);
this.weightSystemService = weightSystemService;
root_grid.DataContext = this.weightSystemService;
......@@ -55,7 +54,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient) {
......@@ -87,7 +86,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -6,7 +6,10 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" >
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
......@@ -41,7 +44,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItem Margin="{StaticResource ControlMargin}"
<local:UcWeighterItemV0 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext,ElementName=container_grid}"/>
</DataTemplate>
......
......@@ -55,7 +55,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient) {
......@@ -87,7 +87,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -6,7 +6,10 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" >
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
......@@ -41,7 +44,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItem2 Margin="{StaticResource ControlMargin}"
<local:UcWeighterItemV0_2 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext,ElementName=container_grid}"/>
</DataTemplate>
......
......@@ -55,7 +55,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
if (weightSystemService is WeightSystemServiceClient) {
......@@ -87,7 +87,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
d:DesignWidth="300"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
......@@ -16,8 +15,8 @@
</UserControl.Resources>
<Border Style="{StaticResource BorderStyle_block}" d:DataContext="{StaticResource weightSystemUt}">
<Button Style="{StaticResource Styles.Button.Empty}" Background="Transparent" Click="btnThicknessClick" >
<Viewbox Margin="{StaticResource ControlMargin}" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Width="180">
<Viewbox Margin="{StaticResource ControlMargin}" Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Width="120">
<StackPanel Margin="3" >
<TextBlock Text="当前厚度" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock >
......@@ -55,16 +54,6 @@
<Run Text="mm" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" Background="{StaticResource Color_background2}">
<TextBlock Text="原料密度" Style="{StaticResource TextBlockStyle_title_activity}"/>
<Viewbox MaxWidth="160" MaxHeight="50" HorizontalAlignment="Left">
<TextBlock >
<Run Text="{Binding Accessory.Density,Converter={StaticResource floorConv}, ConverterParameter=3}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="kg/m³" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</Viewbox>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="总流量设定" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
......@@ -72,10 +61,6 @@
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</StackPanel>
</Viewbox>
......
......@@ -5,8 +5,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="80" d:DesignWidth="1024">
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d" d:DesignWidth ="960" >
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......@@ -14,79 +17,73 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Border Style="{StaticResource BorderStyle_block}" d:DataContext="{StaticResource weightSystemUt}">
<Viewbox MaxHeight="120" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal">
<Viewbox Margin="15,5" MaxHeight="90" >
<Button Style="{StaticResource Styles.Button.Empty}" Background="Transparent" Click="button_ratio_Click" Margin="30,5">
<StackPanel Orientation="Horizontal">
<Grid d:DataContext="{StaticResource weightSystemUt}">
<Border Style="{StaticResource BorderStyle_block}" >
<Viewbox Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal">
<Viewbox Margin="15,5" MaxHeight="90" Stretch="Uniform" StretchDirection="DownOnly" >
<Button Style="{StaticResource Styles.Button.Empty}" Background="Transparent" Click="button_ratio_Click" Margin="30,5">
<StackPanel Orientation="Horizontal">
<control:PieChart Margin="10" Width="120" Height="120"
<control:PieChart Width="60" Height="60" Margin="5"
ItemValueBinding="CurrentFlow" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<StackPanel VerticalAlignment="Bottom">
<StackPanel Margin="3" >
<StackPanel VerticalAlignment="Bottom">
<StackPanel Orientation="Horizontal">
<TextBlock Text="总流量" Style="{StaticResource TextBlockStyle_title_activity}" Margin="3,0"/>
<TextBlock Text="设置&#13;总流量" Style="{StaticResource TextBlockStyle_title_activity}" Margin="3,0"/>
<TextBlock>
<Run Text="{Binding Accessory.TotalFlowSetting,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" FontSize="30"/>
<Run Text="{Binding Accessory.TotalFlowSetting,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" FontSize="{StaticResource FontSize_text_large}"/>
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<TextBlock>
<Run Text="{Binding Accessory.TotalFlow,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" FontSize="72" />
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
<StackPanel Orientation="Horizontal">
<TextBlock Text="当前&#13;总流量" Style="{StaticResource TextBlockStyle_title}" Margin="3,0"/>
<TextBlock>
<Run Text="{Binding Accessory.TotalFlow,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_text_large}"/>
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</Button>
</Viewbox>
<Viewbox Margin="15,5" MaxHeight="90" >
<StackPanel Orientation="Horizontal" >
<control:PieChart Width="60" Height="60" Margin="10"
</Button>
</Viewbox>
<Viewbox Margin="15,5" MaxHeight="90" Stretch="Uniform" StretchDirection="DownOnly">
<StackPanel Orientation="Horizontal" >
<control:PieChart Width="60" Height="60" Margin="5"
ItemValueBinding="CumulativeProduction" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0*" />
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="累计总产量" Style="{StaticResource TextBlockStyle_title}" Grid.ColumnSpan="2" Margin="0,0,0,40.5" Grid.RowSpan="2" />
<Button Style="{StaticResource Styles.Button.Empty}" HorizontalAlignment="Right" Grid.Column="2" Grid.RowSpan="2" VerticalAlignment="Top" Click="button_clear_Click">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Grid Width="50" Height="50">
<Ellipse Fill="White" Stretch="Uniform" Margin="2"/>
<Path Data="{StaticResource Geometry_close-circle}" Fill="{StaticResource Color_off}" Stretch="Uniform" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="累计总产量" Style="{StaticResource TextBlockStyle_title}" Grid.RowSpan="2" />
<Button Style="{StaticResource Styles.Button.Icon.Large}"
Foreground="{StaticResource Brushes.Validation}"
HorizontalAlignment="Right" Grid.Column="1" Grid.RowSpan="2" VerticalAlignment="Top" Click="button_clear_Click">
<Grid Style="{StaticResource Styles.Shadow}">
<Rectangle Width="30" Height="30" Fill="White"/>
<iconPacks:PackIconMaterial Kind="CloseBox" Width="40"/>
</Grid>
</Grid>
</Button>
</Button>
<TextBlock Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Bottom" Grid.ColumnSpan="2" Margin="0,0,0,-0.64">
<Run Text="{Binding Accessory.TotalProduction,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="50" />
</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="2" Margin="0,0.5,0,0.36" >
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</Grid>
</StackPanel>
</Viewbox>
</StackPanel>
</Viewbox>
<TextBlock Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Bottom" Grid.ColumnSpan="2" >
<Run Text="{Binding Accessory.TotalProduction,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_text_large}"/>
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</Grid>
</StackPanel>
</Viewbox>
</StackPanel>
</Viewbox>
</Border>
</Grid>
</Border>
</UserControl>
......@@ -66,7 +66,7 @@
</StackPanel>
<flyctrllib:ToggleButtonOnOff OnLabel="IBC同步" OffLabel="IBC异步" OnBrush="{StaticResource Color_on}" OffBrush="{StaticResource Color_off}"
Width="150"
Width="120"
HorizontalAlignment="Left" Margin="{StaticResource ControlMargin}"
IsChecked="{Binding IsSync}"/>
......
......@@ -6,7 +6,10 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" >
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
......@@ -19,38 +22,30 @@
</UserControl.Resources>
<Grid>
<Grid x:Name="container_grid"/>
<Viewbox Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Name="root_grid" d:DataContext="{StaticResource weightSystemUt}">
<Grid Name="root_grid" d:DataContext="{StaticResource weightSystemUt}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlowV4 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<local:UcThicknessV5 x:Name="ucThickness" Margin="{StaticResource ControlMargin}"/>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItemV5 Margin="{StaticResource ControlMargin}"
<local:UcTotalFlowV5 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<ItemsControl x:Name="itemsControl" Grid.Row="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="{Binding ElementName=itemsControl,Path=Items.Count}"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItemV5 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext, ElementName=container_grid}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</ItemsControl>
</Grid>
</Viewbox>
</Grid>
</UserControl>
......@@ -45,7 +45,6 @@ namespace FLY.Weight.UI.Client.UiModule
this.container_grid.DataContext = container;
ucTotalFlow.Init(weightSystemService);
ucThickness.Init(weightSystemService);
this.weightSystemService = weightSystemService;
root_grid.DataContext = this.weightSystemService;
......@@ -89,7 +88,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -6,7 +6,10 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" >
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
<UserControl.Resources>
<ResourceDictionary>
......@@ -19,39 +22,29 @@
</UserControl.Resources>
<Grid>
<Grid x:Name="container_grid"/>
<Viewbox Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Name="root_grid" d:DataContext="{StaticResource weightSystemUt}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlowV4 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<local:UcThicknessV5 x:Name="ucThickness" Margin="{StaticResource ControlMargin}"/>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItemV5_2 Margin="{StaticResource ControlMargin}"
<Grid Name="root_grid" d:DataContext="{StaticResource weightSystemUt}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlowV5 x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<ItemsControl x:Name="itemsControl" Grid.Row="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="{Binding ElementName=itemsControl,Path=Items.Count}"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItemV5_2 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext,ElementName=container_grid}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</ItemsControl>
</Grid>
</Viewbox>
</Grid>
</Grid>
</UserControl>
......@@ -45,7 +45,6 @@ namespace FLY.Weight.UI.Client.UiModule
this.container_grid.DataContext = container;
ucTotalFlow.Init(weightSystemService);
ucThickness.Init(weightSystemService);
this.weightSystemService = weightSystemService;
root_grid.DataContext = this.weightSystemService;
......@@ -89,7 +88,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignWidth ="1060" d:DesignHeight="634">
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
......
......@@ -73,7 +73,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignWidth ="1600" d:DesignHeight="954">
mc:Ignorable="d" d:DesignWidth ="960" d:DesignHeight="890">
<!--1920*1080 下图表区 1600 * 954
1280*1024 下图表区 960 * 890
1388*768 下图表区 1060 * 634-->
......
......@@ -73,7 +73,7 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan plan = new SetPLCUpdatePlan(
weightSystemService.PLCos,
objname,
UcWeighterItem.item_update_propertynames);
UcWeighterItemV0.item_update_propertynames);
setPlan_items.Add(plan);
}
}
......
......@@ -51,24 +51,28 @@ namespace FLY.Weight.UI.Client.UnitTests
public FeederSystemServiceUt() {
FeederCntOfEachs = new int[7];
for (int i = 0; i < 7; i++)
{
FeederCntOfEachs[i] = 4;
}
FeederCntOfEachs[6] = 6;
Random random = new Random();
FeederCntOfEachs = new int[] { 4, 4, 4, 4, 4, 6, 4, 6,6 };
for (int i = 0; i < FeederCntOfEachs.Count(); i++)
{
string number = FeederIndex2Number(i);
FeederData fd = new FeederData();
fd.Init(number, FeederCntOfEachs[i] );
FeederDatas.Add(fd);
for (int j = 0; j < FeederCntOfEachs[i]; j++)
{
FeederDatas[i].Feeders[j].IsFeederOn = random.Next(50) >= 25;
FeederDatas[i].Feeders[j].FeederStatus = random.Next(0,4);
FeederDatas[i].Feeders[j].IsFeederResetValid = random.Next(50) >= 25;
}
}
}
string FeederIndex2Number(int index)
{
string number = ((char)('A' + (index ))).ToString();
string number = ((char)('A' + index )).ToString();
return number;
}
......
......@@ -45,63 +45,25 @@ namespace FLY.Weight.UI.Client.UnitTests
public WeightSystemUt()
{
Random random = new Random();
//BinCnts = new int[] { 6, 2, 0 };
BinCnts = new int[] { 6, 2, 0, 2, 6 };
//BinCnts = new int[] { 6, 2, 0, 2, 6, 4, 3, 6, 6 };
ItemsCnt = BinCnts.Count();
Items.Add(new FLY.Weight.Common.WeighterC("A", 0, 6)
{
CurrentFlow = 150,
FlowSetting = 140,
CumulativeProduction = 1000,
BinWeight = 15,
MixBucketWeight = 4
});
Items.Add(new FLY.Weight.Common.WeighterC("B", 1, 2)
{
CurrentFlow = 100,
FlowSetting = 100,
CumulativeProduction = 1200,
BinWeight = 10,
MixBucketWeight = 4
});
Items.Add(new FLY.Weight.Common.WeighterC("C", 2, 0)
{
CurrentFlow = 50,
FlowSetting = 50,
CumulativeProduction = 500,
BinWeight = 5,
MixBucketWeight = 4
});
Items.Add(new FLY.Weight.Common.WeighterC("D", 3, 2)
for (int i = 0; i < ItemsCnt; i++)
{
CurrentFlow = 10,
CumulativeProduction = 200,
BinWeight = 1,
MixBucketWeight = 4
});
Items.Add(new FLY.Weight.Common.WeighterC("E", 4, 6)
{
CurrentFlow = 10,
CumulativeProduction = 100,
BinWeight = 1,
MixBucketWeight = 4
});
//Items.Add(new FLY.Weight.Common.WeighterC("F", 5, 2)
//{
// CurrentFlow = 10,
// CumulativeProduction = 200,
// BinWeight = 1,
// MixBucketWeight = 4
//});
//Items.Add(new FLY.Weight.Common.WeighterC("G", 6, 6)
//{
// CurrentFlow = 10,
// CumulativeProduction = 100,
// BinWeight = 1,
// MixBucketWeight = 4
//});
Items.Add(new FLY.Weight.Common.WeighterC(((char)('A'+i)).ToString(), i, BinCnts[i])
{
CurrentFlow = random.Next(0,150),
FlowSetting = random.Next(0, 140),
CumulativeProduction = random.Next(100, 1500),
BinWeight = random.Next(0, 15),
MixBucketWeight = random.Next(0, 4),
ScrewIsAutoMode = random.Next(0, 50)>=25,
BucketValveIsOpen = random.Next(0, 50) >= 25
});
}
foreach (FLY.Weight.Common.WeighterC w in Items) {
w.Color = WeighterColorDB.GetSelf(w.Index);
......
......@@ -27,10 +27,10 @@
<Run Text="{Binding Accessory.CurrentVelocitySet,StringFormat={}{0:F1}, Mode=OneWay}" />
</TextBlock>
</StackPanel>
<StackPanel x:Name="sp_sysParam" Orientation="Horizontal" Grid.Column="1" Margin="5">
<!--<StackPanel x:Name="sp_sysParam" Orientation="Horizontal" Grid.Column="1" Margin="5">
<CheckBox Content="吹膜宽度mm 绑定 测厚仪"
IsChecked="{Binding BindingTotalFilmWidth}"/>
</StackPanel>
</StackPanel>-->
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
......
......@@ -32,7 +32,7 @@ namespace FLY.Weight.UI.Server
this.gage = gage;
grid_WeightSystem.DataContext = gage.mData;
sp_sysParam.DataContext = gage.mSysParam;
//sp_sysParam.DataContext = gage.mSysParam;
itemcontrol_weighter.ItemsSource = gage.mData.plcos.PLCs;
if (gage.mFeederSystem != null)
......
......@@ -65,6 +65,42 @@ namespace FLY.Weight.Common
[Description("吸料开6")]
public bool IsFeederOn6 { get; set; }
/// <summary>
/// 吸料状态1(0:"",1:等待,2:满桶,3:吸料,4:排空)
/// </summary>
[Description("吸料状态1(0:,1:等待,2:满桶,3:吸料,4:排空)")]
public float FeederStatus1 { get; set; }
/// <summary>
/// 吸料状态2
/// </summary>
[Description("吸料状态2")]
public float FeederStatus2 { get; set; }
/// <summary>
/// 吸料状态3
/// </summary>
[Description("吸料状态3")]
public float FeederStatus3 { get; set; }
/// <summary>
/// 吸料状态4
/// </summary>
[Description("吸料状态4")]
public float FeederStatus4 { get; set; }
/// <summary>
/// 吸料状态5
/// </summary>
[Description("吸料状态5")]
public float FeederStatus5 { get; set; }
/// <summary>
/// 吸料状态6
/// </summary>
[Description("吸料状态6")]
public float FeederStatus6 { get; set; }
/// <summary>
/// 吸料复位1(按1)
/// </summary>
......@@ -355,6 +391,7 @@ namespace FLY.Weight.Common
feeder.Number = no.ToString();
Misc.BindingOperations.SetBinding(this, $"IsFeederOn{no}", feeder, nameof(feeder.IsFeederOn), Misc.BindingOperations.BindingMode.TwoWay);
Misc.BindingOperations.SetBinding(this, $"FeederStatus{no}", feeder, nameof(feeder.FeederStatus), Misc.BindingOperations.BindingMode.TwoWay);
Misc.BindingOperations.SetBinding(this, $"FeederReset{no}", feeder, nameof(feeder.FeederReset), Misc.BindingOperations.BindingMode.TwoWay);
Misc.BindingOperations.SetBinding(this, $"IsFeederResetValid{no}", feeder, nameof(feeder.IsFeederResetValid));
......@@ -382,6 +419,12 @@ namespace FLY.Weight.Common
[Description("吸料开")]
public bool IsFeederOn { get; set; }
/// <summary>
/// 吸料状态(0:"",1:等待,2:满桶,3:吸料,4:排空)
/// </summary>
[Description("吸料状态(0:,1:等待,2:满桶,3:吸料,4:排空)")]
public float FeederStatus { get; set; }
/// <summary>
/// 吸料复位(按1)
/// </summary>
......
......@@ -23,7 +23,7 @@ namespace FLY.Weight.Server
/// <summary>
/// 测厚仪宽度与 吹膜宽度mm 绑定在一起
/// </summary>
public bool BindingTotalFilmWidth { get; set; } = false;
//public bool BindingTotalFilmWidth { get; set; } = false;
/// <summary>
/// 有吸料系统
......
......@@ -112,65 +112,66 @@ namespace FLY.Weight.Server
tDGageServiceClient.DynArea.PropertyChanged += DynArea_PropertyChanged;
this.mSysParam.PropertyChanged += MSysParam_PropertyChanged;
//this.mSysParam.PropertyChanged += MSysParam_PropertyChanged;
timer_saveSysParam = new DispatcherTimer();
timer_saveSysParam.Interval = TimeSpan.FromSeconds(5);
timer_saveSysParam.Tick += Timer_saveSysParam_Tick;
//timer_saveSysParam = new DispatcherTimer();
//timer_saveSysParam.Interval = TimeSpan.FromSeconds(5);
//timer_saveSysParam.Tick += Timer_saveSysParam_Tick;
//这个是从测厚仪获取的,每几秒就写一次,不调试!!!!!
mData.plcos.IgnoreLogProperties.Add(new SenderProperty() { sender = mData.Accessory, propertyName = nameof(mData.Accessory.CurrentVelocitySet) });
mData.plcos.IgnoreLogProperties.Add(new SenderProperty() { sender = mData.Accessory, propertyName = nameof(mData.Accessory.TotalFilmWidth) });
//mData.plcos.IgnoreLogProperties.Add(new SenderProperty() { sender = mData.Accessory, propertyName = nameof(mData.Accessory.TotalFilmWidth) });
}
private void Timer_saveSysParam_Tick(object sender, EventArgs e)
{
timer_saveSysParam.Stop();
mSysParam.Save();
}
//private void Timer_saveSysParam_Tick(object sender, EventArgs e)
//{
// timer_saveSysParam.Stop();
// mSysParam.Save();
//}
DispatcherTimer timer_saveSysParam;
//DispatcherTimer timer_saveSysParam;
private void MSysParam_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(SysParam.BindingTotalFilmWidth)) {
//5秒后保存
timer_saveSysParam.Start();
//private void MSysParam_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
//{
// if (e.PropertyName == nameof(SysParam.BindingTotalFilmWidth)) {
// //5秒后保存
// timer_saveSysParam.Start();
}
}
int lastWidth = 0;
// }
//}
//int lastWidth = 0;
private void DynArea_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Thick.Base.Common.DynArea.Width))
{
if (!mSysParam.BindingTotalFilmWidth)
return;
if (tDGageServiceClient.DynArea.Width <= 100)
return;//小于100,肯定异常
int width = (int)tDGageServiceClient.DynArea.Width;
if (lastWidth < 100)
{
lastWidth = width;
}
else
{
if (Math.Abs(lastWidth - width) > 10) //偏差大于10mm
{
//更新数据
lastWidth = width;
}
}
int v = (int)Math.Round(lastWidth / 10.0);
v *= 10;// 以10mm 4舍5入 取整
mData.Accessory.TotalFilmWidth = v;
}
else if (e.PropertyName == nameof(Thick.Base.Common.DynArea.FilmVelocity))
//if (e.PropertyName == nameof(Thick.Base.Common.DynArea.Width))
//{
// if (!mSysParam.BindingTotalFilmWidth)
// return;
// if (tDGageServiceClient.DynArea.Width <= 100)
// return;//小于100,肯定异常
// int width = (int)tDGageServiceClient.DynArea.Width;
// if (lastWidth < 100)
// {
// lastWidth = width;
// }
// else
// {
// if (Math.Abs(lastWidth - width) > 10) //偏差大于10mm
// {
// //更新数据
// lastWidth = width;
// }
// }
// int v = (int)Math.Round(lastWidth / 10.0);
// v *= 10;// 以10mm 4舍5入 取整
// mData.Accessory.TotalFilmWidth = v;
//}
//else
if (e.PropertyName == nameof(Thick.Base.Common.DynArea.FilmVelocity))
{
double v = Math.Round(tDGageServiceClient.DynArea.FilmVelocity,1);//精度只有0.1m/min
......
<Application x:Class="FLY.Winder.UI.Client.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ut="clr-namespace:FLY.Winder.UI.Client.UnitTests"
>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox" />
</ResourceDictionary>
</Application.Resources>
</Application>
using System.Windows;
namespace FLY.Winder.UI.Client
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}
......@@ -58,6 +58,9 @@
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="Converter\IsGTMultiValueConverter.cs" />
<Compile Include="Converter\RatioConverter.cs" />
<Compile Include="PgMenu.xaml.cs">
......@@ -90,9 +93,6 @@
<DependentUpon>MainPanel.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\CenterWinderPanel\UiModule2_CenterWinderPanel.cs" />
<Compile Include="UiModule\VelocityCtrlPanel\VelocityCtrlPanel.xaml.cs">
<DependentUpon>VelocityCtrlPanel.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\WdManual\WdManual2.xaml.cs">
<DependentUpon>WdManual2.xaml</DependentUpon>
</Compile>
......@@ -106,6 +106,10 @@
<Compile Include="UiModule\WdManual\WdManual.xaml.cs">
<DependentUpon>WdManual.xaml</DependentUpon>
</Compile>
<Page Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="PgMenu.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......@@ -134,7 +138,27 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Dictionary_MyStyle.xaml">
<Page Include="Themes\BaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Color.Dark.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Color.Light.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Color.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Styles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\TableStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
......@@ -166,14 +190,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\VelocityCtrlPanel\VelocityCtrlPanel.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\VelocityCtrlPanel\VelocityCtrlPanelStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\WdManual\WdManual2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......
......@@ -2,8 +2,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FLY.Winder.UI.Client">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Winder.UI.Client;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Winder.UI.Client;component/Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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