457 lines
26 KiB
XML
457 lines
26 KiB
XML
<UserControl x:Class="Views.StandWindow"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:local="clr-namespace:Views"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
d:DesignHeight="300" d:DesignWidth="600" mc:Ignorable="d">
|
||
<GroupBox Name="GB" Grid.Row="1" Margin="1,0" Padding="0"
|
||
FontFamily="楷体"
|
||
Header="{Binding MyStand.StandName}">
|
||
<Border Background="Black">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<Border Grid.ColumnSpan="4" Margin="0,1">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="20*">
|
||
</ColumnDefinition>
|
||
<ColumnDefinition Width="80*">
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Background="{Binding Showmsg.StatusBackground}"
|
||
Content="{Binding Showmsg.StatuInfo}"
|
||
DataContext="{Binding MyConnect}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Column="1"
|
||
Background="{Binding MyStand.StandState.StatusBackground}"
|
||
Content="{Binding MyStand.StandState.StatuInfo}"
|
||
Foreground="Black"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
|
||
</Grid>
|
||
</Border>
|
||
|
||
<TabControl Grid.Row="1" Grid.RowSpan="6" Grid.ColumnSpan="4"
|
||
Background="Transparent"
|
||
Style="{x:Null}">
|
||
<TabItem Header="资讯">
|
||
<Border Grid.RowSpan="2" Grid.Column="3" Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Border Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Content="投入数量:" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Column="1" Content="{Binding MyStand.InputQuantity}" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
</Grid>
|
||
|
||
</Border>
|
||
<Border Grid.Row="1" Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Content="产出数量:" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Column="1" Content="{Binding MyStand.OutputQuantity}" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
</Grid>
|
||
|
||
</Border>
|
||
<Border Grid.Row="2" Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Content="不良数量:" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Column="1" Content="{Binding MyStand.BadQuantity}" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
</Grid>
|
||
|
||
</Border>
|
||
<Border Grid.Row="3" Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Content="生产良率:" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Viewbox Grid.Column="1" HorizontalAlignment="Left">
|
||
<TextBlock Grid.Row="3" Foreground="White" Text="{Binding MyStand.Yield, StringFormat='P'}">
|
||
</TextBlock>
|
||
</Viewbox>
|
||
|
||
</Grid>
|
||
|
||
</Border>
|
||
<Border Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Content="连续NG:" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Column="1" Content="{Binding MyStand.NgCount}" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
</Grid>
|
||
|
||
</Border>
|
||
<Border Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Content="CT时间:" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Column="1" Content="{Binding MyStand.CTime}" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
</Grid>
|
||
|
||
</Border>
|
||
<Border Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Label Content="生产产能:" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Column="1" Content="{Binding MyStand.Capacity}" Foreground="White" Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
</Grid>
|
||
|
||
</Border>
|
||
|
||
</Grid>
|
||
</Border>
|
||
</TabItem>
|
||
<TabItem Header="IO">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<GroupBox Grid.Row="1" Grid.RowSpan="4" Foreground="White" Header="输入"
|
||
Style="{x:Null}">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
</Grid.RowDefinitions>
|
||
<Label Grid.Row="0" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[0]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Row="1" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[1]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Row="2" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[2]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Row="3" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[3]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Row="4" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[4]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Row="5" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[5]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Row="6" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[6]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<Label Grid.Row="7" Margin="1"
|
||
Background="{Binding InputColor}"
|
||
Content="{Binding InputMeaning}"
|
||
DataContext="{Binding InputList[7]}"
|
||
Foreground="White"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
</Grid>
|
||
</GroupBox>
|
||
<GroupBox Grid.Row="1" Grid.RowSpan="4" Grid.Column="1"
|
||
Foreground="White" Header="输出"
|
||
Style="{x:Null}">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
</Grid.RowDefinitions>
|
||
<Viewbox Grid.Row="0">
|
||
<CheckBox Background="{Binding OutputColor}"
|
||
BorderBrush="White"
|
||
Content="{Binding OutputMeaning}"
|
||
DataContext="{Binding OutputList[0]}"
|
||
FontFamily="楷体" Foreground="White"
|
||
IsChecked="{Binding Switchs}"
|
||
Style="{StaticResource CheckBoxStyle1}">
|
||
</CheckBox>
|
||
</Viewbox>
|
||
<Viewbox Grid.Row="1">
|
||
<CheckBox Background="{Binding OutputColor}"
|
||
BorderBrush="White"
|
||
Content="{Binding OutputMeaning}"
|
||
DataContext="{Binding OutputList[1]}"
|
||
FontFamily="楷体" Foreground="White"
|
||
IsChecked="{Binding Switchs}"
|
||
Style="{StaticResource CheckBoxStyle1}">
|
||
</CheckBox>
|
||
</Viewbox>
|
||
<Viewbox Grid.Row="2">
|
||
<CheckBox Background="{Binding OutputColor}"
|
||
BorderBrush="White"
|
||
Content="{Binding OutputMeaning}"
|
||
DataContext="{Binding OutputList[2]}"
|
||
FontFamily="楷体" Foreground="White"
|
||
IsChecked="{Binding Switchs}"
|
||
Style="{StaticResource CheckBoxStyle1}">
|
||
</CheckBox>
|
||
</Viewbox>
|
||
<Viewbox Grid.Row="3">
|
||
<CheckBox Background="{Binding OutputColor}"
|
||
BorderBrush="White"
|
||
Content="{Binding OutputMeaning}"
|
||
DataContext="{Binding OutputList[3]}"
|
||
FontFamily="楷体" Foreground="White"
|
||
IsChecked="{Binding Switchs}"
|
||
Style="{StaticResource CheckBoxStyle1}">
|
||
</CheckBox>
|
||
</Viewbox>
|
||
<Viewbox Grid.Row="4">
|
||
<CheckBox Background="{Binding OutputColor}"
|
||
BorderBrush="White"
|
||
Content="{Binding OutputMeaning}"
|
||
DataContext="{Binding OutputList[4]}"
|
||
FontFamily="楷体" Foreground="White"
|
||
IsChecked="{Binding Switchs}"
|
||
Style="{StaticResource CheckBoxStyle1}">
|
||
</CheckBox>
|
||
</Viewbox>
|
||
<Viewbox Grid.Row="5">
|
||
<CheckBox Background="{Binding OutputColor}"
|
||
BorderBrush="White"
|
||
Content="{Binding OutputMeaning}"
|
||
DataContext="{Binding OutputList[5]}"
|
||
FontFamily="楷体" Foreground="White"
|
||
IsChecked="{Binding Switchs}"
|
||
Style="{StaticResource CheckBoxStyle1}">
|
||
</CheckBox>
|
||
</Viewbox>
|
||
|
||
</Grid>
|
||
</GroupBox>
|
||
</Grid>
|
||
</TabItem>
|
||
<TabItem Header="交互">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
<ColumnDefinition>
|
||
</ColumnDefinition>
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
<RowDefinition>
|
||
</RowDefinition>
|
||
</Grid.RowDefinitions>
|
||
<Viewbox Grid.Column="3">
|
||
<CheckBox BorderBrush="{Binding BorderBrush, ElementName=GB}"
|
||
Content="连接" FontFamily="楷体" Foreground="White"
|
||
IsChecked="{Binding MyPLC.SerialComSwitch}"
|
||
IsEnabled="{Binding IsEnable}"
|
||
Style="{StaticResource CheckBoxStyle1}">
|
||
</CheckBox>
|
||
</Viewbox>
|
||
|
||
<Label Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2"
|
||
Margin="0,5"
|
||
Background="{Binding StatusBackground}"
|
||
Content="{Binding StatuInfo}"
|
||
DataContext="{Binding MyStand.Product}"
|
||
Foreground="Black"
|
||
Style="{DynamicResource Mylabel1}">
|
||
</Label>
|
||
<TextBox Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2"
|
||
VerticalAlignment="Center" HorizontalContentAlignment="Left"
|
||
VerticalContentAlignment="Center" FontSize="20"
|
||
Text="{Binding SnCode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
||
</TextBox>
|
||
|
||
<ComboBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="3"
|
||
Background="#4CFFFFFF" BorderBrush="Transparent"
|
||
DisplayMemberPath="CommonName" FontFamily="楷体" FontSize="16"
|
||
Foreground="White"
|
||
ItemsSource="{Binding CmdList}"
|
||
SelectedItem="{Binding SelectCmd}">
|
||
</ComboBox>
|
||
<Button Grid.Row="4" Grid.Column="3" Margin="2,2"
|
||
Background="{Binding ElementName=GB, Path=BorderBrush}"
|
||
Command="{Binding ShouDongSendCmdCommand}"
|
||
FontFamily="楷体"
|
||
IsEnabled="{Binding IsEnable}"
|
||
Style="{DynamicResource commBtn}"
|
||
Visibility="{Binding LayFlatButtonShow}">
|
||
<Viewbox>
|
||
<ContentControl Content="发送指令">
|
||
</ContentControl>
|
||
</Viewbox>
|
||
</Button>
|
||
|
||
|
||
</Grid>
|
||
</TabItem>
|
||
</TabControl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</Grid>
|
||
</Border>
|
||
</GroupBox>
|
||
</UserControl>
|