You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
8.1 KiB

<UserControl x:Class="Gumming.CPExecuteView"
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"
mc:Ignorable="d"
xmlns:local="clr-namespace:Gumming"
xmlns:tool="clr-namespace:GummingCommon;assembly=GummingCommon"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
d:DesignHeight="700" d:DesignWidth="1000"
Background="Transparent"
x:Name="rootControl">
<UserControl.Resources>
<tool:RadioButtonConverter x:Key="RadioConverter"/>
<local:ReverseConverter x:Key="ReverseConverter"/>
<tool:BooleanToOpacityConverter x:Key="OpacityConverter"/>
<tool:EditorTextConverter x:Key="TextBrushConverter"/>
<tool:EditorBorderConverter x:Key="BorderBrushConverter"/>
<tool:PathTypeToThemeConverter x:Key="PathTypeConverter"/>
<tool:StepStyleConverter x:Key="StepStyleConverter"/>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="360"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Source="/Gumming;component/Resource/controlCP.png" Stretch="Fill" Width="400" Height="400">
</Image>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="选择配方:" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2" FontSize="12" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<ComboBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="6" BorderThickness="0" ItemsSource="{Binding Path=HardFormulas}" SelectedItem="{Binding SelectedFormula, Mode=TwoWay}" IsEnabled="{Binding ProgressEnabled}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding FormulaCode, Mode=TwoWay}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding DataContext.SelectedFormulaChangedCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</ComboBox>
<TextBlock Grid.Row="2" Grid.Column="0" Text="工位加工" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2" FontSize="12" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<Button Grid.Row="2" Grid.Column="2" Margin="2" FontSize="15" Style="{DynamicResource CommonIconButton}" Command="{Binding PrepareCommand}" Content="准备" IsEnabled="{Binding ProgressEnabled}"></Button>
<Button Grid.Row="2" Grid.Column="4" Margin="2" FontSize="15" Style="{DynamicResource CommonIconButton}" Command="{Binding StartCommand}" Content="加工" IsEnabled="{Binding ProgressEnabled}"></Button>
<Button Grid.Row="2" Grid.Column="6" Margin="2" FontSize="15" Style="{DynamicResource CommonIconButton}" Command="{Binding StopCommand}" Content="终止" IsEnabled="{Binding ProgressEnabled,Converter={StaticResource ReverseConverter}}"></Button>
</Grid>
</Border>
<Border Grid.Row="2" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="当前步骤" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2" FontSize="12" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<TextBox Grid.Column="2" Grid.ColumnSpan="5" IsReadOnly="True" Text="{Binding StepMessage}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14"></TextBox>
<TextBlock Grid.Row="2" Text="时间" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2" FontSize="12" Foreground="{DynamicResource FontBrush1}"></TextBlock>
<TextBox Grid.Row="2" Grid.Column="2" IsReadOnly="True" Text="{Binding ProgressTime}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14"></TextBox>
<TextBlock Grid.Row="2" Grid.Column="3" Text="/" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2" FontSize="12" Foreground="{DynamicResource FontBrush1}"></TextBlock>
<TextBox Grid.Row="2" Grid.Column="4" IsReadOnly="True" Text="{Binding TotalSecond}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14"></TextBox>
<TextBlock Grid.Row="2" Grid.Column="5" Text="S" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2" FontSize="12" Foreground="{DynamicResource FontBrush1}"></TextBlock>
</Grid>
</Border>
<ScrollViewer Grid.Row="4" >
<TextBlock Text="{Binding DetailMessage}" HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
</ScrollViewer>
</Grid>
</Grid>
</UserControl>