Feiyu/Views/ControlPanel.xaml
2026-04-23 11:42:40 +08:00

232 lines
15 KiB
XML

<UserControl xmlns:Motion="clr-namespace:Views.Motion" x:Class="Views.ControlPanel"
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:Views"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="42"></RowDefinition>
<RowDefinition Height="70*"></RowDefinition>
<RowDefinition Height="30*"></RowDefinition>
</Grid.RowDefinitions>
<Border Background="{Binding ShowStatu.StatusBackground}">
<Viewbox>
<TextBlock Text="{Binding ShowStatu.StatuInfo}" Tag="{Binding ShowStatu.StatuInfo}" FontSize="25" FontWeight="Bold" Foreground="{Binding ShowStatu.StatusForeground}" VerticalAlignment="Center" ></TextBlock>
</Viewbox>
</Border>
<TabControl Grid.Row="1" Background="{x:Null}">
<TabItem Header="资讯" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid Grid.RowSpan="5" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="0" Content="工位1数量:" Foreground="White" VerticalAlignment="Center" HorizontalContentAlignment="Right"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="0" Grid.Column="1" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Content="{Binding CurrentMachine.MyQita.Total1 }"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="1" Foreground="White" Content="产出良品:" HorizontalContentAlignment="Left"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="1" Grid.Column="1" Foreground="White" HorizontalAlignment="Left" Content="{Binding CurrentMachine.MyQita.OK1}"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="2" Foreground="White" Content="产出NG:" HorizontalContentAlignment="Left"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="2" Grid.Column="1" Foreground="White" HorizontalAlignment="Left" Content="{Binding CurrentMachine.MyQita.NG1}"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="3" Foreground="White" Content="生产良率:" HorizontalContentAlignment="Left"></Label>
<Viewbox Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding CurrentMachine.MyQita.Yield1,StringFormat='P'}" Foreground="White"></TextBlock>
</Viewbox>
</Grid>
<Grid Grid.Column="1" Margin="20">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="0" Content="工位2数量:" Foreground="White" VerticalAlignment="Center" HorizontalContentAlignment="Right"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="0" Grid.Column="1" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Content="{Binding CurrentMachine.MyQita.Total2 }"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="1" Foreground="White" Content="产出良品:" HorizontalContentAlignment="Left"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="1" Grid.Column="1" Foreground="White" HorizontalAlignment="Left" Content="{Binding CurrentMachine.MyQita.OK2}"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="2" Foreground="White" Content="产出NG:" HorizontalContentAlignment="Left"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="2" Grid.Column="1" Foreground="White" HorizontalAlignment="Left" Content="{Binding CurrentMachine.MyQita.NG2}"></Label>
<Label Style="{DynamicResource Mylabel1}" Grid.Row="3" Foreground="White" Content="生产良率:" HorizontalContentAlignment="Left"></Label>
<Viewbox Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding CurrentMachine.MyQita.Yield2,StringFormat='P'}" Foreground="White"></TextBlock>
</Viewbox>
</Grid>
</Grid>
<!--<Label Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right">
<Viewbox>
<ContentControl Content="投入数量:"></ContentControl>
</Viewbox>
</Label>
<Label Grid.Column="1" Foreground="White" VerticalAlignment="Center" FontSize="40">
<Viewbox>
<ContentControl Content="{Binding CurrentMachine.Quantitys}"></ContentControl>
</Viewbox>
</Label>
<Label Foreground="White" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right">
<Viewbox>
<ContentControl Content="产出良品:"></ContentControl>
</Viewbox>
</Label>
<Label Grid.Column="1" Grid.Row="1" Foreground="White" VerticalAlignment="Center">
<Viewbox>
<ContentControl Content="{Binding CurrentMachine.Produce}"></ContentControl>
</Viewbox>
</Label>
<Label Foreground="White" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<Viewbox>
<ContentControl Content="产出不良:"></ContentControl>
</Viewbox>
</Label>
<Label Grid.Column="1" Grid.Row="2" Foreground="White" VerticalAlignment="Center">
<Viewbox>
<ContentControl Content="{Binding CurrentMachine.ProduceBads}"></ContentControl>
</Viewbox>
</Label>
<Label Foreground="White" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Name="lb">
<Viewbox>
<ContentControl Content="生产良率:"></ContentControl>
</Viewbox>
</Label>
<Viewbox Grid.Column="1" Grid.Row="3" Height="{Binding ElementName=lb,Path=ActualHeight}" HorizontalAlignment="Left">
<TextBlock Grid.Row="3" Text="{Binding CurrentMachine.RejectRatio,StringFormat='P'}" Foreground="White"></TextBlock>
</Viewbox>-->
<Label Grid.Row="5"
Margin="1"
Style="{DynamicResource Mylabel1}"
DataContext="{Binding FrontStation.Showmsg}"
Content="前站连接"
Foreground="White"
Background="{Binding StatusBackground}"></Label>
<Label Grid.Row="6"
Margin="1"
Style="{DynamicResource Mylabel1}"
DataContext="{Binding NextStation.Showmsg}"
Content="后站连接"
Foreground="White"
Background="{Binding StatusBackground}"></Label>
<Label Grid.Row="7"
Margin="1"
Style="{DynamicResource Mylabel1}"
DataContext="{Binding TestMachine.Showmsg}"
Content="测试机连接"
Foreground="White"
Background="{Binding StatusBackground}"></Label>
<GroupBox Header="前后机台运行状态" Padding="0" Grid.Row="5" Grid.RowSpan="2" Grid.Column="1" Content="{Binding StationStateGrid}"></GroupBox>
<GroupBox Header="良品流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Content="{Binding ProduceLineGrid}"></GroupBox>
<GroupBox Header="缓存流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Grid.Column="1" Content="{Binding CacheLineGrid}"></GroupBox>
<GroupBox Header="测试平台状态" Padding="0" Grid.Row="10" Grid.RowSpan="2" Grid.ColumnSpan="2" Content="{Binding TestBenchGrid}"></GroupBox>
<GroupBox Header="吸嘴状态" Padding="0" Grid.Row="12" Grid.RowSpan="2" Grid.ColumnSpan="2" Content="{Binding XizuiLabelGrid}"></GroupBox>
<!--<Grid Grid.Row="12" Grid.RowSpan="2" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<GroupBox Header="进料平台" Padding="0" Grid.Row="12" Grid.RowSpan="2" Content="{Binding InCacheGrid}"></GroupBox>
--><!--<GroupBox Header="缓存流线" Padding="0" Grid.Row="12" Grid.RowSpan="2" Grid.Column="1" Content="{Binding CacheLineGrid}"></GroupBox>
<GroupBox Header="良品流线" Padding="0" Grid.Row="12" Grid.RowSpan="2" Grid.Column="2" Content="{Binding ProduceLineGrid}"></GroupBox>--><!--
</Grid>-->
</Grid>
</TabItem>
<TabItem Header="输入" Content="{Binding InputGrid}"></TabItem>
<TabItem Header="输出" Content="{Binding OutputGrid}"></TabItem>
<!--<TabItem Header="轴状态" DataContext="{Binding MCVM}">
<Motion:ShaftState />
</TabItem>-->
</TabControl>
<GroupBox Name="GBST" Header="控制按钮" Grid.Row="2" Margin="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Button Style="{DynamicResource commBtn}" Background="{Binding ElementName=GBST,Path=BorderBrush}" Grid.Row="0" FontFamily="楷体" FontSize="50" Margin="1" Command="{Binding StartCommand}" FontWeight="Bold" >
<Viewbox>
<ContentControl Content="启动" ></ContentControl>
</Viewbox>
</Button>
<Button Style="{DynamicResource commBtn}" Background="{Binding ElementName=GBST,Path=BorderBrush}" Grid.Row="0" Grid.Column="1" FontFamily="楷体" FontSize="50" Margin="1" Command="{Binding StopCommand}" FontWeight="Bold">
<Viewbox>
<ContentControl Content="暂停" ></ContentControl>
</Viewbox>
</Button>
<Button Style="{DynamicResource commBtn}" Background="{Binding ElementName=GBST,Path=BorderBrush}" Grid.Row="1" FontFamily="楷体" FontSize="50" Margin="1" Command="{Binding ResetSoftCommand}" FontWeight="Bold">
<Viewbox>
<ContentControl Content="重置" ></ContentControl>
</Viewbox>
</Button>
<Button Style="{DynamicResource commBtn}" Background="{Binding ElementName=GBST,Path=BorderBrush}" Grid.Row="1" Grid.Column="1" FontFamily="楷体" FontSize="50" Margin="1" Command="{Binding CloseCommand}" FontWeight="Bold">
<Viewbox>
<ContentControl Content="退出" ></ContentControl>
</Viewbox>
</Button>
</Grid>
</GroupBox>
</Grid>
</UserControl>