|
- <UserControl
- x:Class="BPASmartClient.DosingSystem.View.CommParSetView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.DataContext>
- <vm:CommparSetViewModel />
- </UserControl.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
-
- <ResourceDictionary>
- <SolidColorBrush x:Key="foreground" Color="#009DFF" />
- <SolidColorBrush x:Key="borderBrush" Color="#009DFF" />
- <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
- <Setter Property="Foreground" Value="{DynamicResource foreground}" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Margin" Value="0,0,0,0" />
- <Setter Property="Padding" Value="0" />
- <Setter Property="Height" Value="24" />
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="Both" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="IsTextSearchCaseSensitive" Value="true" />
- <Setter Property="IsEditable" Value="true" />
- <Setter Property="StaysOpenOnEdit" Value="true" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ComboBox}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
- <Grid>
- <Themes1:ClassicBorderDecorator
- x:Name="Border"
- BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
- BorderStyle="None"
- BorderThickness="2">
- <Popup
- x:Name="PART_Popup"
- AllowsTransparency="true"
- Focusable="False"
- IsOpen="{TemplateBinding IsDropDownOpen}"
- Placement="Bottom"
- PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <Themes1:SystemDropShadowChrome
- x:Name="Shdw"
- MinWidth="{Binding ActualWidth, ElementName=Border}"
- MaxHeight="{TemplateBinding MaxDropDownHeight}"
- Color="Transparent">
- <Border
- x:Name="DropDownBorder"
- BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
- BorderThickness="1">
- <Border.Background>
- <SolidColorBrush Color="#264c73" />
- </Border.Background>
- <ScrollViewer x:Name="DropDownScrollViewer">
- <Grid RenderOptions.ClearTypeHint="Enabled">
- <Canvas
- Width="0"
- Height="0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top">
- <Rectangle
- x:Name="OpaqueRect"
- Width="{Binding ActualWidth, ElementName=DropDownBorder}"
- Height="{Binding ActualHeight, ElementName=DropDownBorder}"
- Fill="{Binding Background, ElementName=DropDownBorder}" />
- </Canvas>
- <ItemsPresenter
- x:Name="ItemsPresenter"
- KeyboardNavigation.DirectionalNavigation="Contained"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- </ScrollViewer>
- </Border>
- </Themes1:SystemDropShadowChrome>
- </Popup>
- </Themes1:ClassicBorderDecorator>
- <DockPanel Margin="2">
- <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
- <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
- <ContentPresenter
- Margin="1,1,1,1"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding SelectionBoxItem}"
- ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
- ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
- ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </DockPanel>
- <ToggleButton
- Width="Auto"
- MinWidth="0"
- MinHeight="0"
- Margin="2"
- ClickMode="Press"
- Focusable="false"
- IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ComboBoxTransparentButtonStyle}" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsDropDownOpen" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
- </MultiTrigger>
- <Trigger Property="HasItems" Value="false">
- <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true" />
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
- </MultiTrigger>
- <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
- <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
- <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
- </Trigger>
- <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
- <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
- <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsEditable" Value="true">
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Padding" Value="1" />
- <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <Button
- Grid.Column="3"
- Width="120"
- Height="30"
- Margin="5,0,5,0"
- HorizontalAlignment="Left"
- Command="{Binding SaveCommand}"
- Content="保存参数"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
-
- <WrapPanel Grid.Row="1" Grid.ColumnSpan="4">
-
- <Grid Width="350" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="配料设备网段:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.NetworkSegAddress, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
-
- <Grid Width="350" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="输送带PLC地址:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.DeviceAddress, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
- <Grid Width="350" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="输送线类型:" />
- <ComboBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- ItemsSource="{Binding CommBaseParModel.ConveryTypeList, UpdateSourceTrigger=PropertyChanged}"
- Text="{Binding CommBaseParModel.ConveryType, UpdateSourceTrigger=PropertyChanged}">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="#009DFF" />
-
-
- </Style>
- </ComboBox.ItemContainerStyle>
- </ComboBox>
-
-
- <!--<TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.StockCount, UpdateSourceTrigger=PropertyChanged}" />-->
- </Grid>
- <Grid Width="350" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="料仓数量:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.StockCount, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
- <Grid Width="350" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="升降气缸数量:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.LiftCylinderCount, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
-
- <Grid Width="350" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="阻挡气缸数量:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.BlockCylinderCount, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
-
- <Grid
- Width="350"
- Margin="5"
- Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="托盘气缸数量:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.PalletCylinderCount, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
-
- <Grid
- Width="350"
- Margin="5"
- Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="输送带数量:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.ConveyerBeltCount, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
-
- <Grid
- Width="350"
- Margin="5"
- Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="0,0,2,0"
- HorizontalAlignment="Right"
- Style="{StaticResource TextBlockStyle}"
- Text="下料重量限制/g:" />
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding CommBaseParModel.Limit, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
- </WrapPanel>
-
- <!--<Grid Grid.Row="2" Grid.ColumnSpan="4">
- <ListView
-
- Grid.Column="1"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding CommBaseParModel.ConveyerBeltModels}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid
- Width="350"
- Margin="5"
- Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding Name}" />
- <TextBlock
- Margin="0,0,2,0"
- Style="{StaticResource TextBlockStyle}"
- Text=":" />
- </StackPanel>
-
- <TextBox
- Grid.Column="1"
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding Speed, UpdateSourceTrigger=PropertyChanged}" />
- </Grid>
-
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>-->
-
-
- </Grid>
- </UserControl>
|