Browse Source

add Venus seTMView in simulator

zhouhr 1 year ago
parent
commit
c5b157adf6

+ 2 - 1
Venus/Venus_Simulator/Config/UILayout.xml

@@ -86,7 +86,8 @@
 	</Navigation>
 
   <Navigation Id="TMSE" Name="TMSE">
-    <SubView Id="ioTMSE" Name="IO-TMSE" ViewClass="Venus_Simulator.Views.SimulatorIoSETMView" Assembly="Venus_Simulator"/>
+    <SubView Id="ioSETM" Name="IO-SETM" ViewClass="Venus_Simulator.Views.SimulatorIoSETMView" Assembly="Venus_Simulator"/>
+    <SubView Id="SETMRB" Name="SE TM RB" ViewClass="Venus_Simulator.Views.Simu_seTMView" Assembly="Venus_Simulator"/>
     <!--<SubView Id="TM" Name="TM" ViewClass="Venus_Simulator.Views.Simu_TMSEView" Assembly="Venus_Simulator" />-->
   </Navigation>
 

+ 7 - 0
Venus/Venus_Simulator/Venus_Simulator.csproj

@@ -274,6 +274,9 @@
     <Compile Include="Views\Simu_EfemView.xaml.cs">
       <DependentUpon>Simu_EfemView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Simu_seTMView.xaml.cs">
+      <DependentUpon>Simu_seTMView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Simu_TMView.xaml.cs">
       <DependentUpon>Simu_TMView.xaml</DependentUpon>
     </Compile>
@@ -571,6 +574,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Views\Simu_seTMView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Simu_TMView.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 69 - 0
Venus/Venus_Simulator/Views/Simu_seTMView.xaml

@@ -0,0 +1,69 @@
+<UserControl x:Class="Venus_Simulator.Views.Simu_seTMView"
+              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:Venus_Simulator.Views"
+             xmlns:commons="clr-namespace:MECF.Framework.Simulator.Core.Commons;assembly=MECF.Framework.Simulator.Core"
+             mc:Ignorable="d" 
+             d:DesignHeight="900" d:DesignWidth="1500">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="100"></RowDefinition>
+            <RowDefinition Height="150"></RowDefinition>
+            <RowDefinition Height="*"></RowDefinition>
+        </Grid.RowDefinitions>
+
+        <commons:SocketTitleView Grid.Row="0"></commons:SocketTitleView>
+
+        <Canvas  Grid.Row="1"  Width="1200">
+            <StackPanel Grid.Row="1" Orientation="Horizontal" Width="1200">
+                <Button Content="Clear Log" Width="100" Height="35"   Command="{Binding ClearLogCommand}"></Button>
+                <!--<CheckBox Content="Cassette Door Open" IsChecked="{Binding DoorOpen, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10,10,0,4" Width="150" Height="35" />
+                <CheckBox Content="Maintain" IsChecked="{Binding Maintain, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10,10,0,4" Width="150" Height="35" />
+                <CheckBox Content="Protrude1" IsChecked="{Binding Protrude1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10,10,0,4" Width="150" Height="35" />
+                <CheckBox Content="Protrude2" IsChecked="{Binding Protrude2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10,10,0,4" Width="150" Height="35" />-->
+            </StackPanel>
+
+            <StackPanel Grid.Row="1" Orientation="Horizontal" Width="1300" Canvas.Top="50">
+                <!--<Button Content="Place1" Margin="10,6,0,0" Width="100" Height="35"   Command="{Binding Place1Command}"  ></Button>
+                <Button Content="Remove1" Margin="20,6,0,0" Width="100" Height="35"   Command="{Binding Remove1Command}"  ></Button>
+                <Button Content="Place2" Margin="20,6,0,0" Width="100" Height="35"   Command="{Binding Place2Command}"  ></Button>
+                <Button Content="Remove2" Margin="20,6,0,0" Width="100" Height="35"   Command="{Binding Remove2Command}"  ></Button>
+                <ComboBox Width="100" Height="26" ItemsSource="{Binding WaferSizeItems}" SelectedItem="{Binding SelectedWaferSize}" ></ComboBox>
+                <Label Content="{Binding WaferMap}" Width="300"  Height="30"  HorizontalContentAlignment="Center"  Background="LightBlue" BorderThickness="2" Margin="10,60"/>
+                <Button Content="SetAll" Width="100" Height="35"   Command="{Binding SetAllCommand}"  Margin="20,6,0,0"></Button>
+                <Button Content="Random" Width="100" Height="35"   Command="{Binding RandomCommand}" Margin="20,6,0,0"></Button>
+                <Button Content="Clear" Width="100" Height="35"   Command="{Binding ClearCommand}"  Margin="20,6,0,0"></Button>-->
+
+            </StackPanel>
+
+        </Canvas>
+
+        <DataGrid Grid.Row="2" FontSize="16" AutoGenerateColumns="False" CanUserAddRows="False" CanUserResizeRows="False" CanUserSortColumns="False" ItemsSource="{Binding TransactionLogItems}"
+                      ScrollViewer.CanContentScroll="True"
+                      ScrollViewer.VerticalScrollBarVisibility="Auto"
+                      ScrollViewer.HorizontalScrollBarVisibility="Auto"
+                      Width="1200" VerticalAlignment="Top">
+            <DataGrid.Columns>
+                <DataGridTextColumn Header="Time" Width="200" IsReadOnly="True" Binding="{Binding OccurTime, UpdateSourceTrigger=PropertyChanged}" />
+                <DataGridTextColumn Header="Incoming" Width="500" IsReadOnly="True"  Binding="{Binding Incoming, UpdateSourceTrigger=PropertyChanged}">
+                    <DataGridTextColumn.ElementStyle>
+                        <Style TargetType="TextBlock">
+                            <Setter Property="TextWrapping" Value="Wrap" />
+                            <Setter Property="Height" Value="auto" />
+                        </Style>
+                    </DataGridTextColumn.ElementStyle>
+                </DataGridTextColumn>
+                <DataGridTextColumn Header="Outgoing" Width="500" IsReadOnly="True"  Binding="{Binding Outgoing, UpdateSourceTrigger=PropertyChanged}">
+                    <DataGridTextColumn.ElementStyle>
+                        <Style TargetType="TextBlock">
+                            <Setter Property="TextWrapping" Value="Wrap" />
+                            <Setter Property="Height" Value="auto" />
+                        </Style>
+                    </DataGridTextColumn.ElementStyle>
+                </DataGridTextColumn>
+            </DataGrid.Columns>
+        </DataGrid>
+    </Grid>
+</UserControl>

+ 62 - 0
Venus/Venus_Simulator/Views/Simu_seTMView.xaml.cs

@@ -0,0 +1,62 @@
+using Aitex.Core.UI.MVVM;
+using MECF.Framework.Simulator.Core.Commons;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Venus_Simulator.Devices;
+
+namespace Venus_Simulator.Views
+{
+    /// <summary>
+    /// Simu_seTMView.xaml 的交互逻辑
+    /// </summary>
+    public partial class Simu_seTMView : UserControl
+    {
+        public Simu_seTMView()
+        {
+
+            InitializeComponent();
+            this.DataContext = new seTMSimulatorViewModel();
+            this.Loaded += OnViewLoaded;
+        }
+
+        private void OnViewLoaded(object sender, RoutedEventArgs e)
+        {
+            (DataContext as TimerViewModelBase)?.Start();
+        }
+    }
+
+    class seTMSimulatorViewModel : SocketDeviceViewModel
+    {
+        public string Title
+        {
+            get { return "TM Simulator"; }
+        }
+
+
+
+        private SETMSimulatorServer _sim;
+
+
+
+        public seTMSimulatorViewModel() : base("seTMSimuViewModel")
+        {
+
+
+            _sim = new SETMSimulatorServer();
+
+            Init(_sim);
+        }
+    }
+}