123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <UserControl x:Class="Aitex.Sorter.UI.Views.Maintenance.LoadPortViewBase"
- 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:Aitex.Sorter.UI.Views.Maintenance"
- xmlns:Common="clr-namespace:Aitex.Sorter.Common;assembly=Aitex.Sorter.Common"
- xmlns:FWCommon="clr-namespace:Aitex.Sorter.Common;assembly=MECF.Framework.Common"
- xmlns:ctrlCommon="clr-namespace:Aitex.Sorter.UI.Controls.Common"
- xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
- xmlns:uc="clr-namespace:Aitex.Sorter.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid x:Name="root">
- <ScrollViewer>
- <ItemsControl ItemsSource="{Binding FoupList}" VerticalAlignment="Center" HorizontalAlignment="Center">
- <ItemsControl.Resources>
- <Style TargetType="Label">
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- </Style>
- <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
- <DataTemplate x:Key="opencassette">
- <uc:HeaderPanel Grid.Row="0" Width="800" Height="220" HorizontalAlignment="left" VerticalAlignment="Top" Header="{Binding DeviceName}" Margin="10,10,0,0">
- <Grid ctrlCommon:GridHelper.Column0="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column1="Transparent" ctrlCommon:GridHelper.Column2="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column3="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.8*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Label Grid.Row="0" Grid.Column="0" Content="Present" />
- <ctrlCommon:LED Grid.Row="0" Grid.Column="1" On="{Binding Present}" />
- <Label Grid.Row="1" Grid.Column="0" Content="Placed" />
- <ctrlCommon:LED Grid.Row="1" Grid.Column="1" On="{Binding Placement}" />
- <Label Grid.Row="2" Grid.Column="0" Content="Carrier ID" />
- <TextBox Grid.Row="2" Grid.Column="1" Width="200" Height="28" Text="{Binding FoupID}" ctrlCommon:CommandHelper.CommandName="{x:Static Common:OperationName.WriteFoupID}" ctrlCommon:CommandHelper.Target="{Binding DeviceName}" ctrlCommon:CommandHelper.Parameter1="{Binding Text, RelativeSource={RelativeSource Self}}" ctrlCommon:TextBoxBehavior.SelectAllTextOnFocus="True">
- <TextBox.InputBindings>
- <KeyBinding Command="{Binding DataContext.LoadPortCommand, ElementName=root}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TextBox}}}" Key="Return" />
- </TextBox.InputBindings>
- </TextBox>
- <!--<Button Grid.Row="2" Grid.Column="2" Content="Read" Command="{Binding DataContext.LoadPortCommand, ElementName=root}" ctrlCommon:CommandHelper.CommandName="{x:Static Common:OperationName.ReadFoupID}" ctrlCommon:CommandHelper.Target="{Binding DeviceName}"/>-->
- <Button Grid.Row="2" Grid.Column="2" Content="Read" Command="{Binding DataContext.LoadPortCommand, ElementName=root}" ctrlCommon:CommandHelper.CommandName="{x:Static Common:OperationName.Scan}" ctrlCommon:CommandHelper.Target="{Binding Station}"/>
- </Grid>
- </uc:HeaderPanel>
- </DataTemplate>
- <DataTemplate x:Key="opencassettenoreadid">
- <uc:HeaderPanel Grid.Row="0" Width="800" Height="220" HorizontalAlignment="left" VerticalAlignment="Top" Header="{Binding DeviceName}" Margin="10,10,0,0">
- <Grid ctrlCommon:GridHelper.Column0="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column1="Transparent" ctrlCommon:GridHelper.Column2="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column3="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.8*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Label Grid.Row="0" Grid.Column="0" Content="Present" />
- <ctrlCommon:LED Grid.Row="0" Grid.Column="1" On="{Binding Present}" />
- <Label Grid.Row="1" Grid.Column="0" Content="Placed" />
- <ctrlCommon:LED Grid.Row="1" Grid.Column="1" On="{Binding Placement}" />
-
- </Grid>
- </uc:HeaderPanel>
- </DataTemplate>
-
- <DataTemplate x:Key="loadport" >
- <uc:HeaderPanel Grid.Column="0" HorizontalAlignment="left" VerticalAlignment="Top" Width="800" Header="{Binding DeviceName}" Margin="10,10,0,0">
- <uc:LPStatus
- Present="{Binding IndicatiorPresence, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- Placed="{Binding IndicatiorPlacement, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- ClampStatus="{Binding ClampState}"
- FoupDoorStatus="{Binding DoorState}"
- Status="{Binding Status}"
- CassetteState="{Binding CassetteState}"
- LoadPortLoaded="{Binding IndicatiorLoad, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- LoadPortUnloaded="{Binding IndicatiorUnload, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- IsAlarm="{Binding IndicatiorAlarm, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- Station="{Binding DeviceName}"
- IsAutoMode="{Binding IndicatiorAccessAuto, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- IsManualMode="{Binding IndicatiorAccessManual, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- >
- </uc:LPStatus>
- </uc:HeaderPanel>
- </DataTemplate>
- <DataTemplate x:Key="SMIF" >
- <uc:HeaderPanel Grid.Column="0" HorizontalAlignment="left" VerticalAlignment="Top" Width="800" Header="{Binding DeviceName}" Margin="10,10,0,0">
- <uc:SMIFStatus
- Present="{Binding IndicatiorPresence, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- Placed="{Binding IndicatiorPlacement, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- ClampStatus="{Binding ClampState}"
- FoupDoorStatus="{Binding DoorState}"
- Status="{Binding Status}"
- CassetteState="{Binding CassetteState}"
- LoadPortLoaded="{Binding IndicatiorLoad, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- LoadPortUnloaded="{Binding IndicatiorUnload, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- IsAlarm="{Binding IndicatiorAlarm, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- Station="{Binding DeviceName}"
-
- >
- </uc:SMIFStatus>
- </uc:HeaderPanel>
- </DataTemplate>
- <DataTemplate x:Key="LoadportMapButtonControl" >
- <uc:HeaderPanel Grid.Column="0" HorizontalAlignment="left" VerticalAlignment="Top" Width="800" Header="{Binding DeviceName}" Margin="10,10,0,0">
- <uc:LPStatus
- Present="{Binding IndicatiorPresence, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- Placed="{Binding IndicatiorPlacement, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- ClampStatus="{Binding ClampState}"
- FoupDoorStatus="{Binding DoorState}"
- Status="{Binding Status}"
- CassetteState="{Binding CassetteState}"
- LoadPortLoaded="{Binding IndicatiorLoad, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- LoadPortUnloaded="{Binding IndicatiorUnload, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- IsAlarm="{Binding IndicatiorAlarm, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
- Station="{Binding DeviceName}"
-
- >
- </uc:LPStatus>
- </uc:HeaderPanel>
- </DataTemplate>
- <DataTemplate x:Key="nothing">
- <uc:HeaderPanel Grid.Row="0" Width="800" Height="220" HorizontalAlignment="left" VerticalAlignment="Top" Margin="10,10,0,0" Visibility="Collapsed">
- </uc:HeaderPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <ContentControl Content="{Binding}">
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Style.Triggers>
- <DataTrigger Binding="{Binding FoupType}" Value="SMIF">
- <Setter Property="ContentTemplate" Value="{StaticResource SMIF}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding FoupType}" Value="LoadportMapButtonControl">
- <Setter Property="ContentTemplate" Value="{StaticResource LoadportMapButtonControl}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding FoupType}" Value="Loadport">
- <Setter Property="ContentTemplate" Value="{StaticResource loadport}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding FoupType}" Value="OpenCassette">
- <Setter Property="ContentTemplate" Value="{StaticResource opencassette}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding FoupType}" Value="OpenCassetteNoReadID">
- <Setter Property="ContentTemplate" Value="{StaticResource opencassettenoreadid}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding FoupType}" Value="Nothing">
- <Setter Property="ContentTemplate" Value="{StaticResource nothing}" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </UserControl>
|