|
|
@@ -22,7 +22,7 @@
|
|
|
lex:LocalizeDictionary.DesignCulture="zh-CN"
|
|
|
mc:Ignorable="d"
|
|
|
d:DataContext="{d:DesignInstance Type=vm:SettingViewModel}"
|
|
|
- d:Height="600"
|
|
|
+ d:Height="1080"
|
|
|
d:Width="1024"
|
|
|
d:Background="White"
|
|
|
x:Class="TeamAAS_VP.Views.SettingView"
|
|
|
@@ -1559,6 +1559,223 @@
|
|
|
</ScrollViewer>
|
|
|
</Grid>
|
|
|
</TabItem>
|
|
|
+
|
|
|
+ <!--螺丝供料器-->
|
|
|
+ <TabItem>
|
|
|
+ <TabItem.Header>
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
+ <materialDesign:PackIcon Width="24"
|
|
|
+ Height="24"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Kind="Screwdriver" />
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
+ Text="{lex:Loc 螺丝供料器}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
+ </StackPanel>
|
|
|
+ </TabItem.Header>
|
|
|
+ <Grid Margin="16">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="50" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <!--增删改查-->
|
|
|
+ <StackPanel Grid.ColumnSpan="2"
|
|
|
+ IsEnabled="{Binding IsAllowEdit}"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <Button Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
|
|
+ ToolTip="增加螺丝供料器"
|
|
|
+ Command="{Binding AddScrewFeederCommand}">
|
|
|
+ <materialDesign:PackIcon Kind="Plus" />
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ <Button Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
|
|
|
+ ToolTip="移除螺丝供料器"
|
|
|
+ Margin="20,0"
|
|
|
+ Command="{Binding RemoveScrewFeederCommand}">
|
|
|
+ <materialDesign:PackIcon Kind="DeleteForeverOutline" />
|
|
|
+ </Button>
|
|
|
+ <Button Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
|
|
|
+ ToolTip="{lex:Loc 保存}"
|
|
|
+ Command="{Binding SaveScrewFeedersCommand}">
|
|
|
+ <materialDesign:PackIcon Kind="ContentSaveCheck" />
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
+ <!--PLC列表-->
|
|
|
+ <TreeView Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ SelectedItemChanged="TreeView_SelectedItemChanged">
|
|
|
+ <TreeViewItem Header="螺丝供料器列表"
|
|
|
+ FontSize="{DynamicResource Font.Size.Title4}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ IsExpanded="True"
|
|
|
+ ItemsSource="{Binding ScrewFeederList}">
|
|
|
+ <TreeViewItem.ItemTemplate>
|
|
|
+ <HierarchicalDataTemplate>
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
|
|
|
+ <TextBlock.Text>
|
|
|
+ <MultiBinding StringFormat="{}{0} . {1}">
|
|
|
+ <Binding Path="FeederNumber" />
|
|
|
+ <Binding Path="Name" />
|
|
|
+ </MultiBinding>
|
|
|
+ </TextBlock.Text>
|
|
|
+ </TextBlock>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="每包螺丝的数量:"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}"
|
|
|
+ Margin="10,0,0,0" />
|
|
|
+ <TextBlock Text="{Binding PackSize,Mode=TwoWay}"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="低量报警阈值:"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}"
|
|
|
+ Margin="10,0,0,0" />
|
|
|
+ <TextBlock Text="{Binding LowLevelThreshold,Mode=TwoWay}"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="是否启用低量报警:"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}"
|
|
|
+ Margin="10,0,0,0" />
|
|
|
+ <CheckBox IsChecked="{Binding LowLevelAlarmEnabled,Mode=TwoWay}"
|
|
|
+ IsEnabled="False"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}" />
|
|
|
+ </StackPanel>
|
|
|
+ <Border Height="2"
|
|
|
+ Margin="0"
|
|
|
+ BorderThickness="2"
|
|
|
+ BorderBrush="Green" />
|
|
|
+ </StackPanel>
|
|
|
+ </HierarchicalDataTemplate>
|
|
|
+ </TreeViewItem.ItemTemplate>
|
|
|
+ </TreeViewItem>
|
|
|
+ </TreeView>
|
|
|
+ <!--参数详情-->
|
|
|
+ <ScrollViewer Grid.Row="1"
|
|
|
+ IsEnabled="{Binding IsAllowEdit}"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="20"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Top"
|
|
|
+ Visibility="{Binding SelectScrewFeeder,Converter={StaticResource ObjectToVisibilityConverter}}">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="200" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <!-- Id -->
|
|
|
+ <TextBlock Text="Id: "
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBlock Text="{Binding SelectScrewFeeder.Id}"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+
|
|
|
+ <!-- Name -->
|
|
|
+ <TextBlock Text="{lex:Loc 名称, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBox Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ Text="{Binding SelectScrewFeeder.Name,Mode=TwoWay}" />
|
|
|
+
|
|
|
+ <!-- 供料器编号 -->
|
|
|
+ <!--<TextBlock Text="供料器编号:"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBox Text="{Binding SelectScrewFeeder.FeederNumber,Mode=TwoWay}"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ Width="200"
|
|
|
+ TextAlignment="Center" />-->
|
|
|
+
|
|
|
+ <!-- 每包螺丝数量 -->
|
|
|
+ <TextBlock Text="每包螺丝数量:"
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <mah:NumericUpDown Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ Width="200"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="10000"
|
|
|
+ Value="{Binding SelectScrewFeeder.PackSize,Mode=TwoWay}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}" />
|
|
|
+
|
|
|
+ <!-- 低量报警阈值 -->
|
|
|
+ <TextBlock Text="低量报警阈值:"
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <mah:NumericUpDown Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ Width="200"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="10000"
|
|
|
+ Value="{Binding SelectScrewFeeder.LowLevelThreshold,Mode=TwoWay}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}" />
|
|
|
+
|
|
|
+ <!-- 是否启用低量报警 -->
|
|
|
+ <TextBlock Grid.Row="5"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <CheckBox Grid.Row="5"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ IsChecked="{Binding SelectScrewFeeder.LowLevelAlarmEnabled,Mode=TwoWay}"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+ </ScrollViewer>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+
|
|
|
|
|
|
<!--通讯-->
|
|
|
<TabItem>
|