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

重新规划服务ID

parent 4cf775ec
......@@ -839,7 +839,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client
private void button_delsnap_Click(object sender, RoutedEventArgs e)
{
if (!WdPassword.Authorize("AirRingHeatList"))
if (!WdPassword.Authorize("AirRing"))
return;
mSnaps.DelSnapShot();
......@@ -1023,7 +1023,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client
FLY.ControlLibrary.Window_WarningTip.Show("应用失败", "当前图是反向,需要先去调换旋转架的正反向信号线", TimeSpan.FromSeconds(2));
return;
}
if (!WdPassword.Authorize("AirRingHeatList"))
if (!WdPassword.Authorize("AirRing"))
return;
blowing.IsUsedMap = IsUsedMap;
......
......@@ -7,8 +7,8 @@
xmlns:misc="clr-namespace:Misc;assembly=MISC"
mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="1024"
Background="White"
Title="Page_RenZiJia">
Background="WhiteSmoke"
d:DataContext="{d:DesignInstance local:PgSetupVm}">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......@@ -18,387 +18,264 @@
</ResourceDictionary.MergedDictionaries>
<Style x:Key="TabControlStyle_ABC" TargetType="{x:Type TabControl}">
<Setter Property="Padding" Value="2"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" VerticalAlignment="Bottom" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="200,0,0,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<Grid Height="110"/>
<Grid Panel.ZIndex="1" Grid.Row="1" >
<Border Background="Black" Height="2" VerticalAlignment="Bottom" />
</Grid>
<Border x:Name="contentPanel" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="2" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="Item.MouseOver.Background" Color="Transparent"/>
<SolidColorBrush x:Key="Item.MouseOver.Foreground" Color="White"/>
<SolidColorBrush x:Key="Item.MouseOver.Border" Color="Black"/>
<SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#FF3B3B3B"/>
<SolidColorBrush x:Key="Item.SelectedInactive.Foreground" Color="White"/>
<SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="Black"/>
<SolidColorBrush x:Key="Item.SelectedActive.Background" Color="White"/>
<SolidColorBrush x:Key="Item.SelectedActive.Foreground" Color="Black"/>
<SolidColorBrush x:Key="Item.SelectedActive.Border" Color="Black"/>
<Style x:Key="TabItemStyle1" TargetType="{x:Type TabItem}">
<Setter Property="FocusVisualStyle">
<Setter.Value>
<Style>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="FontSize" Value="40"/>
<Setter Property="Foreground" Value="{StaticResource Item.SelectedInactive.Foreground}"/>
<Setter Property="Background" Value="{StaticResource Item.SelectedInactive.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Item.SelectedInactive.Border}"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="50,10"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="True">
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" Margin="0"/>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" Focusable="False" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource Item.MouseOver.Background}"/>
<Setter Property="Foreground" Value="{StaticResource Item.MouseOver.Foreground}"/>
<Setter Property="BorderBrush" Value="{StaticResource Item.MouseOver.Border}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource Item.SelectedInactive.Background}"/>
<Setter Property="Foreground" Value="{StaticResource Item.SelectedInactive.Foreground}"/>
<Setter Property="BorderBrush" Value="{StaticResource Item.SelectedInactive.Border}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="Margin" Value="-5,-20,-5,0"/>
<Setter Property="Background" Value="{StaticResource Item.SelectedActive.Background}"/>
<Setter Property="Foreground" Value="{StaticResource Item.SelectedActive.Foreground}"/>
<Setter Property="BorderBrush" Value="{StaticResource Item.SelectedActive.Border}"/>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<local:StableConverter x:Key="stableconv"/>
<local:Direction2VisableConverter x:Key="dir2visableconv"/>
<local:TimeSpan2SecondConverter x:Key="ts2secconv"/>
<local:AutoONoResultConverter x:Key="aorconv"/>
<local:HeatEffectConverter x:Key="heconv"/>
</ResourceDictionary>
</Page.Resources>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid x:Name="grid_heatcell"/>
<Grid x:Name="grid_heatbuf"/>
<Grid x:Name="grid_feedback"/>
<StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}" >
<Button Style="{StaticResource ButtonStyle_back2}" Command="BrowseBack"/>
<TextBlock Style="{StaticResource TextBlockStyle_Title}" Text="自动风环"/>
<TextBlock Text="自控设置" FontSize="30" VerticalAlignment="Center" Margin="5" Foreground="LightGray"/>
</StackPanel>
<StackPanel>
<StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}" >
<Button Style="{StaticResource ButtonStyle_back2}" Click="button_back_Click" />
</StackPanel>
</StackPanel >
<TabControl Style="{DynamicResource TabControlStyle_ABC}">
<TabItem Header="自控" Style="{DynamicResource TabItemStyle1}" >
<ScrollViewer PanningMode="Both" >
<StackPanel DataContext="{Binding DataContext,ElementName=grid_heatcell}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Row="1" PanningMode="Both" >
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonStyle_paramSection}" Click="button_smooth_Click" >
<TextBlock Text="输出平滑&#x0a;应用"/>
</Button>
<Button Style="{StaticResource ButtonStyle_paramSection}" Command="{Binding SmoothCmd}" >
<TextBlock Text="输出平滑&#x0a;应用"/>
</Button>
<StackPanel Grid.Column="1">
<StackPanel Orientation="Horizontal" DataContext="{Binding DataContext,ElementName=grid_heatcell}">
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="平滑阀值" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding ThresholdHeatSigma, StringFormat={}{0:F1}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="当前平滑值" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding MaxHeatSigma, StringFormat={}{0:F1}}" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1">
<StackPanel Orientation="Horizontal" >
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="平滑阀值" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding ThresholdHeatSigma, StringFormat={}{0:F1}}" />
</StackPanel>
</StackPanel>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonStyle_paramSection}" Click="button_apply_Click" >
<TextBlock Text="参数&#x0a;应用"/>
</Button>
<StackPanel Grid.Column="1">
<StackPanel Orientation="Horizontal" DataContext="{Binding DataContext,ElementName=grid_feedback}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="步进" />
<StackPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding HeatCell}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="当前平滑值" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding MaxHeatSigma, StringFormat={}{0:F1}}" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Step}"/>
<Button Style="{StaticResource ButtonStyle_paramSection}" Command="{Binding ApplyCmd}" >
<TextBlock Text="参数&#x0a;应用"/>
</Button>
<StackPanel Grid.Column="1">
<StackPanel Orientation="Horizontal" >
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="检测线速度" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding HasCheckFilmVelocity}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="电流检测功能" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding HasCheck}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="电流" />
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}">
<Setter Property="Text" Value="Off"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasElectricity}" Value="True">
<Setter Property="Text" Value="On"/>
<Setter Property="Background" Value="Yellow"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="风机" />
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}">
<Setter Property="Text" Value="Off"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasFan}" Value="True">
<Setter Property="Text" Value="On"/>
<Setter Property="Background" Value="Yellow"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</StackPanel >
<StackPanel Orientation="Horizontal" >
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding DataContext,ElementName=grid_heatbuf}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="旋转方向" />
<StackPanel Orientation="Horizontal">
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}">
<Setter Property="Text" Value="正"/>
<Style.Triggers>
<DataTrigger Binding="{Binding CurrDirection}" Value="{x:Static misc:DIRECTION.BACKWARD}">
<Setter Property="Text" Value="反"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding DataContext,ElementName=grid_heatbuf}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="测量时间" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrTime,StringFormat={}{0:HH:mm:ss}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding DataContext,ElementName=grid_feedback}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="起效时间" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Delay}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="秒" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding DataContext,ElementName=grid_heatbuf}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="总起效时间" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Delay, Converter={StaticResource ts2secconv}}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="秒" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding DataContext,ElementName=grid_feedback}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="加热修改时间" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding LastChangedTime,StringFormat={}{0:HH:mm:ss}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="步进" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Step}"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="检测线速度" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding HasCheckFilmVelocity}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="电流检测功能" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding HasCheck}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding Feedback}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="电流" />
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}">
<Setter Property="Text" Value="Off"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasElectricity}" Value="True">
<Setter Property="Text" Value="On"/>
<Setter Property="Background" Value="Yellow"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding Feedback}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="风机" />
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}">
<Setter Property="Text" Value="Off"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasFan}" Value="True">
<Setter Property="Text" Value="On"/>
<Setter Property="Background" Value="Yellow"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</StackPanel >
<StackPanel Orientation="Horizontal" >
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding HeatBuf}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="旋转方向" />
<StackPanel Orientation="Horizontal">
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}">
<Setter Property="Text" Value="正"/>
<Style.Triggers>
<DataTrigger Binding="{Binding CurrDirection}" Value="{x:Static misc:DIRECTION.BACKWARD}">
<Setter Property="Text" Value="反"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding HeatBuf}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="测量时间" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrTime,StringFormat={}{0:HH:mm:ss}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="起效时间" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Delay}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="秒" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding HeatBuf}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="总起效时间" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Delay, Converter={StaticResource ts2secconv}}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="秒" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding Feedback}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="加热修改时间" />
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" DataContext="{Binding DataContext,ElementName=grid_heatbuf}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="异常2σ" />
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding ThresholdSigmaMax, StringFormat={}{0:F1}}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding LastChangedTime,StringFormat={}{0:HH:mm:ss}}" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" >
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="异常2σ" />
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding ThresholdSigmaMax, StringFormat={}{0:F1}}" />
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="2σ当前值" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Curr2Sigma, StringFormat={}{0:F1}}"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding HeatBuf}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="2σ当前值" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Curr2Sigma, StringFormat={}{0:F1}}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="没加热稳定范围" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding StableRange0}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="加热稳定范围" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding StableRange}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="没加热稳定范围" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding StableRange0}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DataContext="{Binding DataContext,ElementName=grid_heatbuf}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="使用独立Kp" />
<ToggleButton x:Name="toggleButton_isUsedLocalKp" Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding IsUsedLocalKp}" />
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" Visibility="{Binding IsChecked, ElementName=toggleButton_isUsedLocalKp, Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="加热Kp" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding LocalKp, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="加热/厚度" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="加热效果" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding HeatEffectCurve,Converter={StaticResource heconv}}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="加热稳定范围" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding StableRange}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DataContext="{Binding DataContext,ElementName=grid_heatbuf}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="打散度" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrBreakUp, StringFormat={}{0:F0}}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="稳定性" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrR, StringFormat={}{0:F2}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="稳定状态" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Stability, Converter={StaticResource stableconv}}" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" >
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="使用独立Kp" />
<ToggleButton x:Name="toggleButton_isUsedLocalKp" Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding IsUsedLocalKp}" />
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" Visibility="{Binding IsChecked, ElementName=toggleButton_isUsedLocalKp, Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="加热Kp" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding LocalKp, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="加热/厚度" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="加热效果" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding HeatEffectCurve,Converter={StaticResource heconv}}"/>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DataContext="{Binding HeatBuf}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="打散度" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrBreakUp, StringFormat={}{0:F0}}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="稳定性" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrR, StringFormat={}{0:F2}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="稳定状态" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Stability, Converter={StaticResource stableconv}}" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DataContext="{Binding DataContext,ElementName=grid_heatcell}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="不总体调整" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding IsForbidUpDown}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="打散模式" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding IsBreakUpMode}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="控制线" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding CtrlLine}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="Kp" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Kp, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="加热/厚度" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="不总体调整" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding IsForbidUpDown}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="打散模式" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding IsBreakUpMode}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="控制线" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding CtrlLine}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" />
</StackPanel>
</StackPanel >
</Grid>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="Kp" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Kp, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="加热/厚度" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel >
</StackPanel>
</ScrollViewer>
</Grid>
</TabItem>
</TabControl>
</StackPanel>
</ScrollViewer>
</Grid>
</Page>
......@@ -17,6 +17,7 @@ using FLY.Thick.Base.UI;
using FLY.FeedbackRenZiJia.IService;
using System.ComponentModel;
using Unity;
using GalaSoft.MvvmLight.Command;
namespace FLY.FeedbackRenZiJia.UI.Client
{
......@@ -25,10 +26,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client
/// </summary>
public partial class PgSetup : Page
{
IFeedbackHeatService mFeedback;
IHeatBufService mHeatBuf;
IHeatCellService mHeatCell;
PgSetupVm viewModel;
public PgSetup()
{
InitializeComponent();
......@@ -36,27 +34,101 @@ namespace FLY.FeedbackRenZiJia.UI.Client
[InjectionMethod]
public void Init(
[Dependency("temp")]IFeedbackHeatService feedback,
[Dependency("temp")]IHeatBufService heatBuf,
[Dependency("temp")]IHeatCellService heatCell)
IFeedbackHeatService feedback,
IHeatBufService heatBuf,
IHeatCellService heatCell)
{
mFeedback = feedback;
mHeatBuf = heatBuf;
mHeatCell = heatCell;
//TODO
this.grid_feedback.DataContext = mFeedback;
this.grid_heatbuf.DataContext = mHeatBuf;
this.grid_heatcell.DataContext = mHeatCell;
viewModel = new PgSetupVm();
viewModel.Init(feedback, heatBuf, heatCell);
this.DataContext = viewModel;
}
private void button_back_Click(object sender, RoutedEventArgs e)
private void button_apply_Click(object sender, RoutedEventArgs e)
{
}
}
public class PgSetupVm : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
#region 参数
public double ThresholdHeatSigma { get; set; }
public int Step { get; set; }
public bool HasCheckFilmVelocity { get; set; }
public bool HasCheck { get; set; }
public int Delay { get; set; }
public int ThresholdSigmaMax { get; set; }
public int StableRange0 { get; set; }
public int StableRange { get; set; }
public bool IsUsedLocalKp { get; set; }
public List<int> HeatEffectCurve { get; set; }
public bool IsForbidUpDown { get; set; }
public bool IsBreakUpMode { get; set; }
public int CtrlLine { get; set; }
public double Kp { get; set; }
public double LocalKp { get; set; }
#endregion
#region Command
public RelayCommand SmoothCmd { get; }
public RelayCommand ApplyCmd { get; }
#endregion
public IFeedbackHeatService Feedback{ get; private set; }
public IHeatBufService HeatBuf { get; private set; }
public IHeatCellService HeatCell { get; private set; }
public PgSetupVm()
{
NavigationService.GoBack();
SmoothCmd = new RelayCommand(() => {
HeatCell.ThresholdHeatSigma = this.ThresholdHeatSigma;
HeatCell.Smooth();
});
ApplyCmd = new RelayCommand(Apply);
}
[InjectionMethod]
public void Init(
IFeedbackHeatService feedback,
IHeatBufService heatBuf,
IHeatCellService heatCell)
{
this.Feedback = feedback;
this.HeatBuf = heatBuf;
this.HeatCell = heatCell;
//参数绑定
#region 参数
Misc.BindingOperations.SetBinding(this.HeatCell, "ThresholdHeatSigma", this, "ThresholdHeatSigma");
Misc.BindingOperations.SetBinding(this.Feedback, "Step", this, "Step");
Misc.BindingOperations.SetBinding(this.Feedback, "HasCheckFilmVelocity", this, "HasCheckFilmVelocity");
Misc.BindingOperations.SetBinding(this.Feedback, "HasCheck", this, "HasCheck");
Misc.BindingOperations.SetBinding(this.Feedback, "Delay", this, "Delay");
Misc.BindingOperations.SetBinding(this.HeatBuf, "ThresholdSigmaMax", this, "ThresholdSigmaMax");
Misc.BindingOperations.SetBinding(this.HeatBuf, "StableRange0", this, "StableRange0");
Misc.BindingOperations.SetBinding(this.HeatBuf, "StableRange", this, "StableRange");
Misc.BindingOperations.SetBinding(this.HeatBuf, "IsUsedLocalKp", this, "IsUsedLocalKp");
Misc.BindingOperations.SetBinding(this.HeatBuf, "LocalKp", this, "LocalKp");
Misc.BindingOperations.SetBinding(this.HeatBuf, "HeatEffectCurve", this, "HeatEffectCurve");
Misc.BindingOperations.SetBinding(this.HeatCell, "IsForbidUpDown", this, "IsForbidUpDown");
Misc.BindingOperations.SetBinding(this.HeatCell, "IsBreakUpMode", this, "IsBreakUpMode");
Misc.BindingOperations.SetBinding(this.HeatCell, "CtrlLine", this, "CtrlLine");
Misc.BindingOperations.SetBinding(this.HeatCell, "Kp", this, "Kp");
#endregion
}
bool CheckValid_HeatEffectCurve()
{
List<int> list = mHeatBuf.HeatEffectCurve;
List<int> list = HeatEffectCurve;
if ((list == null) || (list.Count() == 0))
{
......@@ -97,39 +169,43 @@ namespace FLY.FeedbackRenZiJia.UI.Client
return false;
return true;
}
private void button_apply_oNo_Click(object sender, RoutedEventArgs e)
private void Apply()
{
if (!WdPassword.Authorize("AirRingSetup"))
if (!WdPassword.Authorize("AirRing"))
return;
if (CheckValid())
{
mHeatBuf.Apply();
mHeatCell.Apply();
FLY.ControlLibrary.Window_Tip.Show("参数设置", "成功", TimeSpan.FromSeconds(2));
}
}
private void button_apply_Click(object sender, RoutedEventArgs e)
{
if (!WdPassword.Authorize("AirRingSetup"))
if (!CheckValid())
return;
if (CheckValid())
{
mHeatBuf.Apply();
mHeatCell.Apply();
mFeedback.Apply();
FLY.ControlLibrary.Window_Tip.Show("参数设置", "成功", TimeSpan.FromSeconds(2));
}
}
private void button_smooth_Click(object sender, RoutedEventArgs e)
{
mHeatCell.Smooth();
//参数设置
HeatCell.ThresholdHeatSigma=this.ThresholdHeatSigma;
Feedback.Step=this.Step;
Feedback.HasCheckFilmVelocity=this.HasCheckFilmVelocity;
Feedback.HasCheck=this.HasCheck;
Feedback.Delay=this.Delay;
HeatBuf.ThresholdSigmaMax=this.ThresholdSigmaMax;
HeatBuf.StableRange0=this.StableRange0;
HeatBuf.StableRange=this.StableRange;
HeatBuf.IsUsedLocalKp=this.IsUsedLocalKp;
HeatBuf.LocalKp=this.LocalKp;
HeatBuf.HeatEffectCurve=this.HeatEffectCurve;
HeatCell.IsForbidUpDown=this.IsForbidUpDown;
HeatCell.IsBreakUpMode=this.IsBreakUpMode;
HeatCell.CtrlLine=this.CtrlLine;
HeatCell.Kp=this.Kp;
HeatCell.Apply();
HeatBuf.Apply();
Feedback.Apply();
FLY.ControlLibrary.Window_Tip.Show("参数设置", "成功", TimeSpan.FromSeconds(2));
}
}
public class HeatEffectConverter : IValueConverter
{
#region IValueConverter 成员
......@@ -181,6 +257,10 @@ namespace FLY.FeedbackRenZiJia.UI.Client
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (!(value is TimeSpan))
return null;
TimeSpan ts = (TimeSpan)value;
return (int)(ts.TotalSeconds);
}
......@@ -231,65 +311,5 @@ namespace FLY.FeedbackRenZiJia.UI.Client
#endregion
}
public class AutoONoResultConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
EAutoONoResult stable = (EAutoONoResult)value;
switch (stable)
{
case EAutoONoResult.OK:
return "完成:对位成功";
case EAutoONoResult.Idle:
return "等待";
case EAutoONoResult.Err_Break:
return "完成:异常, 数据异常或打断";
case EAutoONoResult.Err_MaxMin:
return "完成:异常, 极差值不够大,可信度不够";
case EAutoONoResult.Err_MaxR:
return "完成:异常, 相关性不够大,可信度不够";
default:
return "???";
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null;
}
#endregion
}
public class Direction2VisableConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Misc.DIRECTION direction = (Misc.DIRECTION)value;
string str = (string)parameter;
str = str.ToUpper();
if ((str.CompareTo("FORW") == 0) && (direction == Misc.DIRECTION.FORWARD))
{
return System.Windows.Visibility.Visible;
}
else if ((str.CompareTo("BACKW") == 0) && (direction == Misc.DIRECTION.BACKWARD))
{
return System.Windows.Visibility.Visible;
}
else
return System.Windows.Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
}
......@@ -12,9 +12,9 @@ namespace FLY.FeedbackRenZiJia.OBJ_INTERFACE
public const UInt32 HEATBUF_ID = 31002;
public const UInt32 HEATCELL_ID = 31003;
/// <summary>
/// 3个
/// </summary>
public const UInt32 WARNING_OBJ_ID = 20000;
public const UInt32 WARNING_OBJ_REASONLIST_ID = 20001;
public const UInt32 WARNING_OBJ_NEWESTLIST_ID = 20002;
}
}
......@@ -109,7 +109,7 @@ namespace FLY.IBC.UI.Client.UiModule
private void Record_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
reason_list_index = mWindow.Record.Count() - 1;
reason_list_index = warningReasonWindow.Record.Count() - 1;
updateError01();
}
......@@ -118,7 +118,7 @@ namespace FLY.IBC.UI.Client.UiModule
FObjBase.PollModule.Current.Poll_JustOnce(
new FObjBase.PollModule.PollHandler(delegate ()
{
reason_list_index = mWindow.Record.Count() - 1;
reason_list_index = warningReasonWindow.Record.Count() - 1;
updateError();
}), this, MARKNO_UPDATEERROR);
......
......@@ -8,15 +8,17 @@ namespace FLY.IBC.OBJ_INTERFACE
{
public class OBJ_INTERFACE
{
//3个
public const UInt32 WARNING_OBJ_ID = 20000;
/// <summary>
/// 4个
/// </summary>
public const UInt32 IBC_OBJ_ID = 32000;
public const UInt32 IBC_OBJ_CTRLLIST_ID = 32004;
//3个
public const UInt32 WARNING_OBJ_ID = 20000;
}
}
......@@ -20,10 +20,11 @@ namespace FLY.Thick.Blowing.OBJ_INTERFACE
public const UInt32 SCANWARNING_ID = 30011;
public const UInt32 BULKDB_ID = 30012;
public const UInt32 WARNING_OBJ_ID = 30013;
public const UInt32 WARNING_OBJ_REASONLIST_ID = 30014;
public const UInt32 WARNING_OBJ_NEWESTLIST_ID = 30015;
/// <summary>
/// 3个
/// </summary>
public const UInt32 WARNING_OBJ_ID = 20000;
public const UInt32 JSONDIST_OBJ_ID = 20000;
public const UInt32 JSONDIST_OBJ_ID = 10000;
}
}
......@@ -214,9 +214,9 @@
<Project>{119c3adc-f8e1-4f72-b89b-006236ff8586}</Project>
<Name>FLY.ControlLibrary</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.UI.Module\FLY.UI.Module\FLY.UI.Module.csproj">
<Project>{4df79671-e814-49bd-864d-8257d6c6e072}</Project>
<Name>FLY.UI.Module</Name>
<ProjectReference Include="..\..\thick_public\Project.FLY.Misc\MISC\Misc.csproj">
<Project>{5ee61ac6-5269-4f0f-b8fa-4334fe4a678f}</Project>
<Name>Misc</Name>
</ProjectReference>
<ProjectReference Include="..\FLY.HeatingHelper\FLY.HeatingHelper.csproj">
<Project>{973f0eed-3181-4fb9-abd6-196a9e816b77}</Project>
......
......@@ -23,6 +23,7 @@ namespace FLY.HeatingHelper.UI.UIModule.UC_SelectData
Command_DefaultLoadDataRange();
Misc.BindingOperations.SetBinding(Dat, "AnalystIndexFrom", () =>
{
AnalystDataFrom = null;
});
Misc.BindingOperations.SetBinding(Dat, "AnalystIndexTo", () =>
......
......@@ -46,7 +46,7 @@ namespace FLY.Weight.UI.Client
private void button_ingredient_Click(object sender, RoutedEventArgs e)
{
if (!WdPassword.Authorize("WeighterMenu"))
if (!WdPassword.Authorize("Weighter"))
return;
PgIngredient p = new PgIngredient();
......@@ -57,7 +57,7 @@ namespace FLY.Weight.UI.Client
private void button_screw_Click(object sender, RoutedEventArgs e)
{
if (!WdPassword.Authorize("WeighterMenu"))
if (!WdPassword.Authorize("Weighter"))
return;
PgScrew p = new PgScrew();
container.BuildUp(p);
......@@ -67,7 +67,7 @@ namespace FLY.Weight.UI.Client
private void button_hopper_Click(object sender, RoutedEventArgs e)
{
if (!WdPassword.Authorize("WeighterMenu"))
if (!WdPassword.Authorize("Weighter"))
return;
PgHopper p = new PgHopper();
container.BuildUp(p);
......@@ -86,7 +86,7 @@ namespace FLY.Weight.UI.Client
private void button_thickness_Click(object sender, RoutedEventArgs e)
{
if (!WdPassword.Authorize("WeighterMenu"))
if (!WdPassword.Authorize("Weighter"))
return;
PgThickness p = new PgThickness();
......
......@@ -67,6 +67,8 @@ namespace FLY.Weight.Client
public WeightSystemServiceClient(UInt32 serviceId, string connName) : base(serviceId) {
Init();
ConnName = connName;
filePath = connName + "." +filePath;
FObjServiceClientManager.Instance.Connect_to_Another_OBJSys(connName, this);
}
......@@ -112,6 +114,7 @@ namespace FLY.Weight.Client
this.PropertyChanged += WeightSystemClient_PropertyChanged;
}
string filePath = "weightSystemClient.json";
void Save()
{
WeightSystemClientJsonDb jsonDb = new WeightSystemClientJsonDb()
......@@ -119,12 +122,12 @@ namespace FLY.Weight.Client
BinCnts = BinCnts
};
string json = Newtonsoft.Json.JsonConvert.SerializeObject(jsonDb);
File.WriteAllText("weightSystemClient.json", json);
File.WriteAllText(filePath, json);
}
void Load() {
if (!File.Exists("weightSystemClient.json"))
if (!File.Exists(filePath))
return;
string json =File.ReadAllText("weightSystemClient.json");
string json =File.ReadAllText(filePath);
var p = Newtonsoft.Json.JsonConvert.DeserializeObject< WeightSystemClientJsonDb>(json);
BinCnts = p.BinCnts;
}
......
......@@ -7,22 +7,19 @@ namespace FLY.Weight.OBJ_INTERFACE
{
public class OBJ_INTERFACE
{
/// <summary>
/// 3个
/// </summary>
public const UInt32 WARNING_OBJ_ID = 20000;
public const UInt32 WARNING_OBJ_REASONLIST_ID = WARNING_OBJ_ID + 1;
public const UInt32 WARNING_OBJ_NEWESTLIST_ID = WARNING_OBJ_ID + 2;
public const UInt32 WEIGHTS_OBJ_ID = 30000;
public const UInt32 WEIGHTS_OBJ_SYNCPROP_ID = WEIGHTS_OBJ_ID + 1;
public const UInt32 WEIGHTS_OBJ_PLCOS_ID = WEIGHTS_OBJ_ID + 2;
public const UInt32 WEIGHTS_OBJ_PLCOS_SYNCPROP_ID = WEIGHTS_OBJ_PLCOS_ID + 1;
/// <summary>
/// 4个
/// </summary>
public const UInt32 WEIGHTS_OBJ_ID = 35000;
public const UInt32 WEIGHTS_OBJ_FLOW_ID = 30004;
public const UInt32 WEIGHTS_OBJ_FLOW_ID = 35004;
public const UInt32 WEIGHTS_OBJ_MIX_BASE_ID = 30005;
public const UInt32 WEIGHTS_OBJ_MIX_BASE_ID = 35005;
/// <summary>
/// 每次配料记录列表, 1~5
/// </summary>
......
......@@ -38,7 +38,7 @@ namespace FLY.Weight.Server.OBJProxy
plcOS_OBJProxy = new PLCProxySystem_OBJProxy(
objsys_idx,
OBJ_INTERFACE.OBJ_INTERFACE.WEIGHTS_OBJ_PLCOS_ID,
ID + 2,
data.PLCos
);
......
Subproject commit 60be62824e5c30d5c322b2230d08098458cf99d9
Subproject commit 634c9abecc11061d5487d82887dee7d76115c519
......@@ -7,7 +7,6 @@
<!--别名-->
<alias alias="IOnInit" type="MultiLayout.UiModule.IOnInit, MultiLayout" />
<container>
<!--客户端配置参数-->
<register type="Misc.ParamDictionary, MISC" >
......@@ -17,7 +16,7 @@
<register type="FLY.OBJComponents.IService.IJsonDistService,FLY.OBJComponents" mapTo="FLY.OBJComponents.Client.JsonDistServiceClient,FLY.OBJComponents">
<lifetime type="singleton" />
<constructor>
<param name="serviceId" value="20000" />
<param name="serviceId" value="10000" />
<param name="connName" value="blowing" />
</constructor>
</register>
......
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