Browse Source

优化 boatModify界面

git-svn-id: http://10.4.3.168:50001/svn/Furnace@89 dbcde07d-dcf5-c148-8a84-ac3097b7778e
Jiangjinyuan 1 month ago
parent
commit
aa4d17d12c

+ 20 - 19
FrameworkLocal/UICore/Control/BoatElevatorMap.xaml.cs

@@ -90,7 +90,7 @@ namespace Aitex.Core.UI.Control
         protected override void OnRender(DrawingContext drawingContext)
         {
 
-            if (DesignerProperties.GetIsInDesignMode(this)|| BoatWafers==null)
+            if (DesignerProperties.GetIsInDesignMode(this) || BoatWafers == null)
             {
                 return;
             }
@@ -109,26 +109,27 @@ namespace Aitex.Core.UI.Control
                 }
                 else
                 {
-                    switch (item)
+                    if (item.StartsWith("P"))
                     {
-                        case "PD":
-                            drawingContext.DrawEllipse(PDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "SD":
-                            drawingContext.DrawEllipse(SDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "FD":
-                            drawingContext.DrawEllipse(FDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "M1":
-                            drawingContext.DrawEllipse(M1Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "M2":
-                            drawingContext.DrawEllipse(M2Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        default:
-                            break;
+                        drawingContext.DrawEllipse(PDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
                     }
+                    else if (item == "SD")
+                    {
+                        drawingContext.DrawEllipse(SDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+                    else if (item == "FD" || item == "ED")
+                    {
+                        drawingContext.DrawEllipse(FDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+                    else if (item == "M1")
+                    {
+                        drawingContext.DrawEllipse(M1Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+                    else if (item == "M2")
+                    {
+                        drawingContext.DrawEllipse(M2Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+
                 }
                 indexWafer += 1;
             }

+ 19 - 18
Furnace/FurnaceUI/Controls/BoatElevatorMap.xaml.cs

@@ -102,6 +102,7 @@ namespace FurnaceUI.Controls.Parts
                 drawingContext.DrawImage(bgImage, new Rect(13, 50, 150, 600));
             }
             int fristY = 610;
+            if (BoatWafers== null) { return; }
             foreach (var item in BoatWafers)
             {
                 if (item == "----" || string.IsNullOrEmpty(item))
@@ -110,25 +111,25 @@ namespace FurnaceUI.Controls.Parts
                 }
                 else
                 {
-                    switch (item)
+                    if (item.StartsWith("P"))
                     {
-                        case "PD":
-                            drawingContext.DrawEllipse(PDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "SD":
-                            drawingContext.DrawEllipse(SDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "FD":
-                            drawingContext.DrawEllipse(FDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "M1":
-                            drawingContext.DrawEllipse(M1Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        case "M2":
-                            drawingContext.DrawEllipse(M2Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
-                            break;
-                        default:
-                            break;
+                        drawingContext.DrawEllipse(PDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+                    else if (item == "SD")
+                    {
+                        drawingContext.DrawEllipse(SDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+                    else if (item == "FD" || item == "ED")
+                    {
+                        drawingContext.DrawEllipse(FDBrush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+                    else if (item == "M1")
+                    {
+                        drawingContext.DrawEllipse(M1Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
+                    }
+                    else if (item == "M2")
+                    {
+                        drawingContext.DrawEllipse(M2Brush, new Pen(NoneBrush, 1), new Point(85, fristY - indexWafer * 3), 60, 30);
                     }
                 }
                 indexWafer += 1;

+ 247 - 119
Furnace/FurnaceUI/Views/Operations/TransferMain/BoatModifyView.xaml

@@ -10,123 +10,251 @@
              xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
              xmlns:sys="clr-namespace:System;assembly=mscorlib"
              mc:Ignorable="d" 
-             Height="690" Width="700">
-    <Canvas Width="700" Height="690">
-        <Grid Margin="50,455,0,0" Width="600" IsEnabled="{Binding IsBoatModifyEnabled}">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="20"/>
-                <RowDefinition Height="46"/>
-                <RowDefinition Height="36"/>
-                <RowDefinition Height="36"/>
-                <RowDefinition Height="36"/>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="150"/>
-                <ColumnDefinition />
-            </Grid.ColumnDefinitions>
-            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Grid.Column="0" Grid.ColumnSpan="2" Padding="5,1">
-                <TextBlock Text="Wafer" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
-            </Border>
-            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" IsEnabled="{Binding IsEnableA}" Grid.Row="1" Grid.ColumnSpan="2" Padding="2,1,1,1" RenderTransformOrigin="0.492,0.581">
-                <UniformGrid Columns="5" Rows="1" Margin="16,0">
-                    <RadioButton Content="SD" GroupName="WaferType" IsChecked="{Binding SDIsChecked}"  Height="38" Width="80"/>
-                    <RadioButton Content="ED" GroupName="WaferType" IsChecked="{Binding EDIsChecked}" Height="38" Width="80"/>
-                    <RadioButton Content="P" GroupName="WaferType" IsChecked="{Binding PIsChecked}" Height="38" Width="80"/>
-                    <RadioButton Content="M1" GroupName="WaferType" IsChecked="{Binding M1IsChecked}"  Height="38" Width="80"/>
-                    <RadioButton Content="M2" GroupName="WaferType" IsChecked="{Binding M2IsChecked}" Height="38" Width="80"/>
-                </UniformGrid>
-             
-            </Border>
-            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="2" Grid.ColumnSpan="2" Padding="2,1,1,1">
-                <StackPanel   Orientation="Horizontal" Margin="7,0">
-                    <!--<TextBlock Text="Boat Slot" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Margin="27,5,0,0"/>-->
-                    <Label Content="From"  Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" Width="80" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="0,5,0,0"/>
-                    <TextBox TextChanged="Slot_TextChanged" BorderThickness="1"  Text="{Binding BoatSlotFrom,TargetNullValue={x:Static sys:String.Empty},UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2" Tag="Number"/>
-                    <Label Content="To"  Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" Width="80" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="0,5,0,0"/>
-                    <TextBox TextChanged="Slot_TextChanged" BorderThickness="1"  Text="{Binding BoatSlotTo,TargetNullValue={x:Static sys:String.Empty},UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2" Tag="Number"/>
-                </StackPanel>
-            </Border>
-            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="3" Grid.ColumnSpan="2" Padding="5,1">
-                <StackPanel   Orientation="Horizontal" >
-                    <TextBlock Text="Origin Module" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Margin="5,5,0,0"/>
-                    <ComboBox ItemsSource="{Binding OriginModuleItems}" SelectedItem="{Binding OriginSelectModule,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2"/>
-                    <TextBlock Text="Origin Slot" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Margin="25,5,0,0"/>
-                    <TextBox Text="{Binding OriginSlot,TargetNullValue={x:Static sys:String.Empty},UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2" Tag="Number"/>
-                </StackPanel>
-            </Border>
-            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="4" Grid.ColumnSpan="2" Padding="5,1">
-                <StackPanel   Orientation="Horizontal" >
-                    <Button Content="Create Wafer" Width="120" Height="25" Margin="85,0,0,0" IsEnabled="{Binding IsEnableWaferManualOperation}">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="Click">
-                                <cal:ActionMessage MethodName="CreateWafer"></cal:ActionMessage>
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </Button>
-                    <Button Content="Delete Wafer" Width="120" Height="25" Margin="90,0,0,0" IsEnabled="{Binding IsEnableWaferManualOperation}">
-                        <i:Interaction.Triggers>
-                            <i:EventTrigger EventName="Click">
-                                <cal:ActionMessage MethodName="DeleteWafer"></cal:ActionMessage>
-                            </i:EventTrigger>
-                        </i:Interaction.Triggers>
-                    </Button>
-                </StackPanel>
-            </Border>
-        </Grid>
-        <DataGrid AlternationCount="2" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
-                  VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"
-                  ItemsSource="{Binding BoatWaferInfoItems}" Margin="-50,-30,0,0" IsEnabled="{ Binding IsPermission}" RowHeight="17" Canvas.Left="100" Canvas.Top="30" Height="450">
-            <DataGrid.Columns>
-                <DataGridTemplateColumn Header="Slot" Width="100">
-                    <DataGridTemplateColumn.CellTemplate>
-                        <DataTemplate>
-                            <TextBlock Text="{Binding SlotID}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>
-                        </DataTemplate>
-                    </DataGridTemplateColumn.CellTemplate>
-                </DataGridTemplateColumn>
-                <DataGridTemplateColumn Header="Wafer Info" Width="100">
-                    <DataGridTemplateColumn.CellTemplate>
-                        <DataTemplate>
-                            <ctrl:Slot ViewType="Front" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,2,0,0"/>
-                        </DataTemplate>
-                    </DataGridTemplateColumn.CellTemplate>
-                </DataGridTemplateColumn>
-                <DataGridTemplateColumn Header="Wafer Type" Width="100">
-                    <DataGridTemplateColumn.CellTemplate>
-                        <DataTemplate>
-                            <TextBlock Text="{Binding WaferType}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>
-                        </DataTemplate>
-                    </DataGridTemplateColumn.CellTemplate>
-                </DataGridTemplateColumn>
-                <DataGridTemplateColumn Header="Use Count" Width="100">
-                    <DataGridTemplateColumn.CellTemplate>
-                        <DataTemplate>
-                            <TextBlock Text="{Binding UseCount}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>
-                        </DataTemplate>
-                    </DataGridTemplateColumn.CellTemplate>
-                </DataGridTemplateColumn>
-                <DataGridTemplateColumn Header="Use Time" Width="100">
-                    <DataGridTemplateColumn.CellTemplate>
-                        <DataTemplate>
-                            <TextBlock Text="{Binding UseTime}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>
-                        </DataTemplate>
-                    </DataGridTemplateColumn.CellTemplate>
-                </DataGridTemplateColumn>
-                <DataGridTemplateColumn Header="Use Thick" Width="100">
-                    <DataGridTemplateColumn.CellTemplate>
-                        <DataTemplate>
-                            <TextBlock Text="{Binding UseThick}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>
-                        </DataTemplate>
-                    </DataGridTemplateColumn.CellTemplate>
-                </DataGridTemplateColumn>
-            </DataGrid.Columns>
-        </DataGrid>
-        <Button Content="Close" Canvas.Left="520" Canvas.Top="635" Width="130" Height="45"  Style="{StaticResource CommandButton}">
-            <i:Interaction.Triggers>
-                <i:EventTrigger EventName="Click">
-                    <cal:ActionMessage MethodName="CassetteClose"></cal:ActionMessage>
-                </i:EventTrigger>
-            </i:Interaction.Triggers>
-        </Button>
-    </Canvas>
+             Height="768" Width="1024">
+    <UserControl.Resources>
+        <Style BasedOn="{StaticResource ExScrollViewer}" TargetType="ScrollViewer"/>
+        <Style BasedOn="{StaticResource ExScrollBar}" TargetType="ScrollBar"/>
+        <Style x:Key="BoatMapTextBlock" TargetType="TextBlock">
+            <Setter Property="FontSize" Value="16"/>
+            <Setter Property="Padding" Value="5"/>
+        </Style>
+    </UserControl.Resources>
+    <Grid Margin="5">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="auto"></RowDefinition>
+            <RowDefinition Height="*"></RowDefinition>
+        </Grid.RowDefinitions>
+        <Border Background="#DAE5F1">
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="300"></ColumnDefinition>
+                    <ColumnDefinition></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <Border>
+                    <Canvas >
+                        <parts:BoatElevatorMap BoatWafers="{Binding BoatMapWafers,UpdateSourceTrigger=PropertyChanged}"  Canvas.Top="-60" Canvas.Left="100" Height="500" Width="158">
+                        </parts:BoatElevatorMap>
+                        <Border BorderBrush="LightGray" BorderThickness="2,2,0,0" Canvas.Left="10" Canvas.Top="48" SnapsToDevicePixels="True"  Visibility="{Binding IstBoatMapLogicalVisibility}">
+                            <Border BorderBrush="LightGray" BorderThickness="0,0,2,2" Background="#A1C9F5" SnapsToDevicePixels="True" >
+                                <Grid Width="92" Height="500" Margin="4">
+                                    <Grid.RowDefinitions>
+                                        <RowDefinition/>
+                                        <RowDefinition/>
+                                        <RowDefinition Height="3"/>
+                                        <RowDefinition/>
+                                        <RowDefinition/>
+                                        <RowDefinition Height="3"/>
+                                        <RowDefinition/>
+                                        <RowDefinition/>
+                                        <RowDefinition Height="3"/>
+                                        <RowDefinition/>
+                                        <RowDefinition/>
+                                        <RowDefinition Height="3"/>
+                                        <RowDefinition/>
+                                        <RowDefinition/>
+                                    </Grid.RowDefinitions>
+                                    <TextBlock Text="SD"  Style="{StaticResource BoatMapTextBlock}" />
+                                    <WrapPanel Grid.Row="1">
+                                        <TextBlock  Style="{StaticResource BoatMapTextBlock}" >
+                                        <Run  Text="{Binding UpperSDNum,UpdateSourceTrigger=PropertyChanged}"></Run>
+                                        <Run  Text="(Num)"></Run>
+                                        </TextBlock>
+                                    </WrapPanel>
+                                    <Line Grid.Row="2" X1="-4" Y1="0" X2="96" Y2="0" Margin="0,0,-4,0" StrokeThickness="2" Stroke="LightGray"/>
+
+                                    <TextBlock Grid.Row="3" Text="P"  Style="{StaticResource BoatMapTextBlock}" />
+                                    <WrapPanel Grid.Row="4">
+                                        <TextBlock  Style="{StaticResource BoatMapTextBlock}"  >
+                                               <Run  Text="{Binding ProductNum,UpdateSourceTrigger=PropertyChanged}"></Run>
+                                               <Run  Text="(Num)"></Run>
+                                        </TextBlock>
+                                    </WrapPanel>
+                                    <Line Grid.Row="5" X1="-4" Y1="0" X2="96" Y2="0" Margin="0,0,-4,0" StrokeThickness="2" Stroke="LightGray"/>
+
+                                    <TextBlock Grid.Row="6" Text="M1"   Style="{StaticResource BoatMapTextBlock}" />
+                                    <WrapPanel Grid.Row="7">
+
+                                        <TextBlock  Style="{StaticResource BoatMapTextBlock}"  >
+             <Run  Text="{Binding MonitorNum1,UpdateSourceTrigger=PropertyChanged}"></Run>
+             <Run  Text="(Num)"></Run>
+                                        </TextBlock>
+                                    </WrapPanel>
+
+                                    <Line Grid.Row="8" X1="-4" Y1="0" X2="96" Y2="0" Margin="0,0,-4,0" StrokeThickness="2" Stroke="LightGray"/>
+
+                                    <TextBlock Grid.Row="9" Text="M2"  Style="{StaticResource BoatMapTextBlock}" />
+                                    <WrapPanel Grid.Row="10">
+
+                                        <TextBlock   Style="{StaticResource BoatMapTextBlock}"  >
+<Run  Text="{Binding MonitorNum2,UpdateSourceTrigger=PropertyChanged}"></Run>
+<Run  Text="(Num)"></Run>
+                                        </TextBlock>
+                                    </WrapPanel>
+
+                                    <Line Grid.Row="11" X1="-4" Y1="0" X2="96" Y2="0" Margin="0,0,-4,0" StrokeThickness="2" Stroke="LightGray"/>
+
+                                    <TextBlock Grid.Row="12" Text="ED"  Style="{StaticResource BoatMapTextBlock}" />
+                                    <WrapPanel Grid.Row="13">
+
+                                        <TextBlock   Style="{StaticResource BoatMapTextBlock}"  >
+<Run  Text="{Binding LowerSDNum,UpdateSourceTrigger=PropertyChanged}"></Run>
+<Run  Text="(Num)"></Run>
+                                        </TextBlock>
+                                    </WrapPanel>
+                                </Grid>
+                            </Border>
+                        </Border>
+
+
+
+                    </Canvas>
+                </Border>
+                <Border Grid.Column="1">
+                    <ListView Height="583"  IsEnabled="{ Binding IsPermission}"     HorizontalContentAlignment="Stretch" ItemsSource="{Binding BoatWaferInfoItems}">
+                        <ListView.View>
+                            <GridView>
+                                <GridView.Columns>
+
+                                    <GridViewColumn Width="100"  Header="Slot">
+                                        <GridViewColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <Border  HorizontalAlignment="Center"  Margin="-8,0,-5,0"   BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,0,0">
+                                                    <TextBlock Width="100" TextWrapping="Wrap" Text="{Binding SlotID, Mode=TwoWay}"  HorizontalAlignment="Center"  VerticalAlignment="Center"  TextAlignment="Center"/>
+                                                </Border>
+                                            </DataTemplate>
+                                        </GridViewColumn.CellTemplate>
+                                    </GridViewColumn>
+                                    <GridViewColumn Width="150"  Header="Wafer Info">
+                                        <GridViewColumn.CellTemplate>
+                                            <DataTemplate>
+                                                <Border  HorizontalAlignment="Center"  Margin="-8,0,-5,0"   BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,0,0">
+                                                    <ctrl:Slot Width="150" ViewType="Front" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,2,0,0"/>
+                                                </Border>
+                                            </DataTemplate>
+                                        </GridViewColumn.CellTemplate>
+                                    </GridViewColumn>
+                                    <GridViewColumn Width="100"  Header="Wafer Type">
+                                        <GridViewColumn.CellTemplate>
+                                            <DataTemplate>
+
+                                                <Border  HorizontalAlignment="Center"  Margin="-8,0,-5,0"   BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,0,0">
+                                                    <TextBlock Width="100" TextWrapping="Wrap" Text="{Binding WaferType, Mode=TwoWay}"  HorizontalAlignment="Center"  VerticalAlignment="Center"  TextAlignment="Center"/>
+                                                </Border>
+                                            </DataTemplate>
+                                        </GridViewColumn.CellTemplate>
+                                    </GridViewColumn>
+                                    <GridViewColumn Width="100"  Header="Use Count">
+                                        <GridViewColumn.CellTemplate>
+                                            <DataTemplate>
+
+                                                <Border  HorizontalAlignment="Center"  Margin="-8,0,-5,0"   BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,0,0">
+                                                    <TextBlock Width="100" TextWrapping="Wrap" Text="{Binding UseCount, Mode=TwoWay}"  HorizontalAlignment="Center"  VerticalAlignment="Center"  TextAlignment="Center"/>
+                                                </Border>
+                                            </DataTemplate>
+                                        </GridViewColumn.CellTemplate>
+                                    </GridViewColumn>
+                                    <GridViewColumn Width="100"  Header="Use Time">
+                                        <GridViewColumn.CellTemplate>
+                                            <DataTemplate>
+
+                                                <Border  HorizontalAlignment="Center"  Margin="-8,0,-5,0"   BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,0,0">
+                                                    <TextBlock Width="100" TextWrapping="Wrap" Text="{Binding UseTime, Mode=TwoWay}"  HorizontalAlignment="Center"  VerticalAlignment="Center"  TextAlignment="Center"/>
+                                                </Border>
+                                            </DataTemplate>
+                                        </GridViewColumn.CellTemplate>
+                                    </GridViewColumn>
+                                    <GridViewColumn Width="100"  Header="Use Thick">
+                                        <GridViewColumn.CellTemplate>
+                                            <DataTemplate>
+
+                                                <Border  HorizontalAlignment="Center"  Margin="-8,0,-5,0"   BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,0,0">
+                                                    <TextBlock Width="100" TextWrapping="Wrap" Text="{Binding UseThick, Mode=TwoWay}"  HorizontalAlignment="Center"  VerticalAlignment="Center"  TextAlignment="Center"/>
+                                                </Border>
+                                            </DataTemplate>
+                                        </GridViewColumn.CellTemplate>
+                                    </GridViewColumn>
+                                </GridView.Columns>
+                            </GridView>
+                        </ListView.View>
+
+                    </ListView>
+
+
+                </Border>
+            </Grid>
+
+        </Border>
+
+        <Border Grid.Row="1" >
+            <Grid>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="20"></RowDefinition>
+                    <RowDefinition Height="50"></RowDefinition>
+                    <RowDefinition Height="50"></RowDefinition>
+                    <RowDefinition ></RowDefinition>
+                </Grid.RowDefinitions>
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Grid.Column="0" Grid.ColumnSpan="2" Padding="5,1">
+                    <TextBlock Text="Wafer" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
+                </Border>
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" IsEnabled="{Binding IsEnableA}" Grid.Row="1" Grid.ColumnSpan="2" Padding="2,1,1,1" RenderTransformOrigin="0.492,0.581">
+                    <UniformGrid Columns="5" Rows="1" Margin="0,5,0,5" >
+                        <RadioButton Content="SD" GroupName="WaferType" IsChecked="{Binding SDIsChecked}"   Width="80"/>
+                        <RadioButton Content="ED" GroupName="WaferType" IsChecked="{Binding EDIsChecked}"   Width="80"/>
+                        <RadioButton Content="P" GroupName="WaferType" IsChecked="{Binding PIsChecked}"     Width="80"/>
+                        <RadioButton Content="M1" GroupName="WaferType" IsChecked="{Binding M1IsChecked}"   Width="80"/>
+                        <RadioButton Content="M2" GroupName="WaferType" IsChecked="{Binding M2IsChecked}"   Width="80"/>
+
+                    </UniformGrid>
+
+                </Border>
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="2" Grid.ColumnSpan="2" Padding="2,1,1,1">
+                    <UniformGrid Columns="2" Rows="1" >
+                        <StackPanel   Orientation="Horizontal" Margin="7,0">
+                            <!--<TextBlock Text="Boat Slot" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Margin="27,5,0,0"/>-->
+                            <Label Content="From"  Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" Width="80" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="0,5,0,0"/>
+                            <TextBox TextChanged="Slot_TextChanged" BorderThickness="1"  Text="{Binding BoatSlotFrom,TargetNullValue={x:Static sys:String.Empty},UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2" Tag="Number"/>
+                            <Label Content="To"  Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" Width="80" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="0,5,0,0"/>
+                            <TextBox TextChanged="Slot_TextChanged" BorderThickness="1"  Text="{Binding BoatSlotTo,TargetNullValue={x:Static sys:String.Empty},UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2" Tag="Number"/>
+                        </StackPanel>
+                        <StackPanel   Orientation="Horizontal" >
+                            <TextBlock Text="Origin Module" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Margin="5,5,0,0"/>
+                            <ComboBox ItemsSource="{Binding OriginModuleItems}" SelectedItem="{Binding OriginSelectModule,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2"/>
+                            <TextBlock Text="Origin Slot" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Margin="25,5,0,0"/>
+                            <TextBox Text="{Binding OriginSlot,TargetNullValue={x:Static sys:String.Empty},UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Width="120" Margin="5,2" Tag="Number"/>
+                        </StackPanel>
+                    </UniformGrid>
+                </Border>
+
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="4" Grid.ColumnSpan="2" Padding="5">
+                    <UniformGrid    Columns="3" Rows="1" >
+                        <Button Content="Create Wafer" Width="120" Height="50" Margin="85,0,0,0" IsEnabled="{Binding IsEnableWaferManualOperation}">
+                            <i:Interaction.Triggers>
+                                <i:EventTrigger EventName="Click">
+                                    <cal:ActionMessage MethodName="CreateWafer"></cal:ActionMessage>
+                                </i:EventTrigger>
+                            </i:Interaction.Triggers>
+                        </Button>
+                        <Button Content="Delete Wafer" Width="120" Height="50" Margin="90,0,0,0" IsEnabled="{Binding IsEnableWaferManualOperation}">
+                            <i:Interaction.Triggers>
+                                <i:EventTrigger EventName="Click">
+                                    <cal:ActionMessage MethodName="DeleteWafer"></cal:ActionMessage>
+                                </i:EventTrigger>
+                            </i:Interaction.Triggers>
+                        </Button>
+                        <Button   Content="Close" Width="120" Height="50"  Style="{StaticResource CommandButton}">
+                            <i:Interaction.Triggers>
+                                <i:EventTrigger EventName="Click">
+                                    <cal:ActionMessage MethodName="CassetteClose"></cal:ActionMessage>
+                                </i:EventTrigger>
+                            </i:Interaction.Triggers>
+                        </Button>
+                    </UniformGrid>
+                </Border>
+            </Grid>
+        </Border>
+
+
+
+    </Grid>
+
 </UserControl>

+ 129 - 5
Furnace/FurnaceUI/Views/Operations/TransferMain/BoatModifyViewModel.cs

@@ -31,6 +31,7 @@ namespace FurnaceUI.Views.Operations
             for (int i = count; i > 0; i--)
             {
                 BoatWaferInfoItems.Add(new WaferInfoItem() { SlotID = i });
+                BoatMapWafers.Add("");
             }
         }
         public string ModuleName { set; get; }
@@ -100,7 +101,17 @@ namespace FurnaceUI.Views.Operations
                 return (PM1Status == "Init" || PM1Status == "Idle" || PM1Status == "Error") && (RtStatus == "Init" || RtStatus == "Idle" || RtStatus == "Error");
             }
         }
+        private List<string> _boatMapWafers = new List<string>();
 
+        public List<string> BoatMapWafers
+        {
+            get => _boatMapWafers;
+            set
+            {
+                _boatMapWafers = value;
+                NotifyOfPropertyChange(nameof(BoatMapWafers));
+            }
+        }
         private ObservableCollection<WaferInfoItem> _boatWaferInfoItems = new ObservableCollection<WaferInfoItem>();
         public ObservableCollection<WaferInfoItem> BoatWaferInfoItems
         {
@@ -111,16 +122,127 @@ namespace FurnaceUI.Views.Operations
                 NotifyOfPropertyChange(nameof(BoatWaferInfoItems));
             }
         }
+        private int _upperSDNum = 0;
+
+        public int UpperSDNum
+        {
+            get => _upperSDNum;
+            set
+            {
+                _upperSDNum = value;
+                NotifyOfPropertyChange(nameof(UpperSDNum));
+            }
+        }
+
+        private int _productNum = 0;
+
+        public int ProductNum
+        {
+            get => _productNum;
+            set
+            {
+                _productNum = value;
+                NotifyOfPropertyChange(nameof(ProductNum));
+            }
+        }
+
+        private int _monitorNum1 = 0;
+
+        public int MonitorNum1
+        {
+            get => _monitorNum1;
+            set
+            {
+                _monitorNum1 = value;
+                NotifyOfPropertyChange(nameof(MonitorNum1));
+            }
+        }
+
+        private int _monitorNum2 = 0;
+
+        public int MonitorNum2
+        {
+            get => _monitorNum2;
+            set
+            {
+                _monitorNum2 = value;
+                NotifyOfPropertyChange(nameof(MonitorNum2));
+            }
+        }
+
+        private int _lowerSDNum = 0;
+
+        public int LowerSDNum
+        {
+            get => _lowerSDNum;
+            set
+            {
+                _lowerSDNum = value;
+                NotifyOfPropertyChange(nameof(LowerSDNum));
+            }
+        }
+
+        private int _lowerSideDummyNum = 9;
+        private Tuple<int, int> ComputSD(List<string> dataSource)
+        {
+            List<string> otherSlot = dataSource.Where(a => a != "SD" && !string.IsNullOrEmpty(a)).ToList().Distinct().ToList();
+            if (dataSource == null || dataSource.Count == 0)
+            {
+                return new Tuple<int, int>(0, 0);
+            }
+            List<int> minList = new List<int>();
+            for (int i = 0; i < dataSource.Count; i++)
+            {
+                var item = dataSource[i];
+                if (otherSlot.Contains(item) && !string.IsNullOrEmpty(item))
+                {
+                    break;
+                }
+                if (string.IsNullOrEmpty(item))
+                {
+                    continue;
+                }
+                minList.Add(i);
+            }
+
 
+            dataSource.Reverse();
+            List<int> maxList = new List<int>();
+            for (int i = 0; i < dataSource.Count; i++)
+            {
+
+                var item = dataSource[i];
+                if (otherSlot.Contains(item) && !string.IsNullOrEmpty(item))
+                {
+                    break;
+                }
+                if (string.IsNullOrEmpty(item))
+                {
+                    continue;
+                }
+                maxList.Add(i);
+            }
+            return new Tuple<int, int>(minList.Count(), maxList.Count());
+
+        }
         protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
         {
             RefreshCassetteDataTask();
+            if (null != BoatMapWafers && BoatMapWafers.Count > 0)
+            {
+                BoatMapWafers.Reverse();
+                UpperSDNum = BoatMapWafers.Where(x => x == "SD").Count();
+                LowerSDNum = BoatMapWafers.Where(x => x == "ED").Count();
+
+                ProductNum = BoatMapWafers.Where(x => x.StartsWith("P")).Count();
+                MonitorNum1 = BoatMapWafers.Where(x => x == "M1").Count();
+                MonitorNum2 = BoatMapWafers.Where(x => x == "M2").Count();
+            }
         }
 
         private void RefreshCassetteDataTask()
         {
             var wafers = ModuleManager.ModuleInfos[ModuleName].WaferManager.Wafers;
-
             if (wafers != null)
             {
                 int iIndex = 0;
@@ -151,6 +273,8 @@ namespace FurnaceUI.Views.Operations
                     }
                     iIndex++;
                 }
+
+                BoatMapWafers = BoatWaferInfoItems.Select(a => a.WaferType).ToList();
             }
         }
 
@@ -170,7 +294,7 @@ namespace FurnaceUI.Views.Operations
             else if (M2IsChecked)
                 waferType = WaferType.M2;
 
-           
+
             if (BoatSlotFrom > BoatSlotTo || BoatSlotTo > (int)QueryDataClient.Instance.Service.GetConfig("Boat.SlotCount") || BoatSlotFrom < 1)
             {
                 DialogBox.ShowWarning($"BoatSlot input error,can not create,input range 1 to {(int)QueryDataClient.Instance.Service.GetConfig("Boat.SlotCount")}");
@@ -181,9 +305,9 @@ namespace FurnaceUI.Views.Operations
                 DialogBox.ShowWarning($"OriginSlot input error,can not create,input range 1 to {(int)QueryDataClient.Instance.Service.GetConfig("System.CassetteSlotCount")}");
                 return;
             }
-          
-           InvokeClient.Instance.Service.DoOperation("CreateWaferFromTo", $"{ModuleName}", BoatSlotFrom, BoatSlotTo,new string[] { waferType.ToString(), OriginSelectModule, (OriginSlot - 1).ToString() });
-        // InvokeClient.Instance.Service.DoOperation("CreateWafer", $"{ModuleName}", BoatSlotFrom, waferType.ToString(), OriginSelectModule, OriginSlot - 1);
+
+            InvokeClient.Instance.Service.DoOperation("CreateWaferFromTo", $"{ModuleName}", BoatSlotFrom, BoatSlotTo, new string[] { waferType.ToString(), OriginSelectModule, (OriginSlot - 1).ToString() });
+            // InvokeClient.Instance.Service.DoOperation("CreateWafer", $"{ModuleName}", BoatSlotFrom, waferType.ToString(), OriginSelectModule, OriginSlot - 1);
         }
 
         public void DeleteWafer()