Browse Source

git-svn-id: http://10.4.3.168:50001/svn/Furnace@101 dbcde07d-dcf5-c148-8a84-ac3097b7778e

Huangping 1 month ago
parent
commit
da2ae17ae6

+ 6 - 6
FrameworkLocal/Common/Display/DisplayManager.cs

@@ -68,14 +68,14 @@ namespace Aitex.Core.RT.Event
                         XmlNodeList nodeList = AlarmTable.SelectNodes("Display");
                         foreach (XmlElement nodeCategory in nodeList)
                         {
-                            string name = nodeCategory.GetAttribute("DisplayName");
+                            string name = nodeCategory.GetAttribute("Name");
                             if (DisplayDict.ContainsKey(name))
                             {
-                                DisplayDict[name] = nodeCategory.GetAttribute("Name");
+                                DisplayDict[name] = nodeCategory.GetAttribute("DisplayName");
                             }
                             else
                             {
-                                DisplayDict.Add(name, nodeCategory.GetAttribute("Name"));
+                                DisplayDict.Add(name, nodeCategory.GetAttribute("DisplayName"));
                             }
                         }
                     }
@@ -86,14 +86,14 @@ namespace Aitex.Core.RT.Event
                         XmlNodeList nodeList = AlarmTable.SelectNodes("Display");
                         foreach (XmlElement nodeCategory in nodeList)
                         {
-                            string name = nodeCategory.GetAttribute("DisplayName");
+                            string name = nodeCategory.GetAttribute("Name");
                             if (ProcessDetailDisplayDict.ContainsKey(name))
                             {
-                                ProcessDetailDisplayDict[name] = nodeCategory.GetAttribute("Name");
+                                ProcessDetailDisplayDict[name] = nodeCategory.GetAttribute("DisplayName");
                             }
                             else
                             {
-                                ProcessDetailDisplayDict.Add(name, nodeCategory.GetAttribute("Name"));
+                                ProcessDetailDisplayDict.Add(name, nodeCategory.GetAttribute("DisplayName"));
                             }
                         }
                     }

+ 75 - 178
FrameworkLocal/UIClient/CenterViews/DataLogs/DataHistory/DataView.xaml

@@ -9,9 +9,8 @@
     xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
     xmlns:micro="clr-namespace:Caliburn.Micro"
     xmlns:system="clr-namespace:System;assembly=mscorlib"
-    xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
     xmlns:userControls="clr-namespace:MECF.Framework.UI.Client.ClientBase.UserControls"
-    xmlns:dataHistory="clr-namespace:MECF.Framework.UI.Client.CenterViews.DataLogs.DataHistory" xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
+    xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
     d:DesignHeight="450"
     d:DesignWidth="1000"
     mc:Ignorable="d">
@@ -21,11 +20,10 @@
         <converters:ControlWidthOrHeightConverter x:Key="controlWidthOrHeightConverter"/>
         <system:Boolean x:Key="True">True</system:Boolean>
         <system:Boolean x:Key="False">False</system:Boolean>
-      
     </UserControl.Resources>
     <Grid IsEnabled="{Binding IsPermission}">
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="375" />
+            <ColumnDefinition Width="260" />
             <ColumnDefinition Width="Auto" />
             <ColumnDefinition />
         </Grid.ColumnDefinitions>
@@ -36,7 +34,7 @@
 
         <Grid Grid.RowSpan="2" Grid.Column="0">
             <Grid.RowDefinitions>
-                <RowDefinition Height="80" />
+                <RowDefinition Height="100" />
                 <RowDefinition Height="0" />
                 <RowDefinition Height="1" />
                 <RowDefinition Height="*" />
@@ -49,118 +47,61 @@
                 BorderBrush="{StaticResource Table_BD}"
                 BorderThickness="1,0,1,1"
                 IsEnabled="{Binding IsBusy, Converter={StaticResource boolReverseConverter}}">
-                <StackPanel Orientation="Horizontal">
-                    <StackPanel Width="260" Margin="0,5">
-                        <StackPanel.Resources>
-                            <Style TargetType="xctk:DateTimeUpDown">
-                                <Setter Property="Width" Value="180" />
-                                <Setter Property="Format" Value="Custom" />
-                                <Setter Property="FormatString" Value="yyyy/MM/dd HH:mm:ss" />
-                            </Style>
-                        </StackPanel.Resources>
-                        <StackPanel Orientation="Horizontal" >
-                            <TextBlock
-                                Width="70"
-                                VerticalAlignment="Center"
-                                FontFamily="Arial"
-                                FontSize="14"
-                                Foreground="{StaticResource FG_Black}"
-                                Text="Start Time" />
-                            <Button x:Name="wfTimeFrom" Width="175" ContentStringFormat="yyyy-MM-dd HH:mm:ss">
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="Click">
-                                        <micro:ActionMessage MethodName="SelectDate">
-                                            <micro:Parameter Value="Start"/>
-                                        </micro:ActionMessage>
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </Button>
-                            <!--<WindowsFormsHost
-                                Width="170"
-                                Height="22"
-                                Margin="5,0,0,0"
-                                VerticalAlignment="Center"
-                                FontFamily="Arial"
-                                FontSize="14">
-                                <forms:DateTimePicker
-                                    x:Name="wfTimeFrom"
-                                    CustomFormat="yyyy/MM/dd HH:mm:ss"
-                                    Format="Custom"
-                                    Value="2011-8-1" />
-                            </WindowsFormsHost>-->
-                        </StackPanel>
-                        <StackPanel Margin="0,5,0,0" Orientation="Horizontal">
-                            <TextBlock
-                                Width="70"
-                                VerticalAlignment="Center"
-                                FontFamily="Arial"
-                                FontSize="14"
-                                Foreground="{StaticResource FG_Black}"
-                                Text="End Time" />
-                            <Button x:Name="wfTimeTo" Width="175" ContentStringFormat="yyyy-MM-dd HH:mm:ss">
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="Click">
-                                        <micro:ActionMessage MethodName="SelectDate">
-                                            <micro:Parameter Value="End"/>
-                                        </micro:ActionMessage>
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </Button>
-                            <!--<WindowsFormsHost
-                                Width="170"
-                                Height="22"
-                                Margin="5,0,0,0"
-                                VerticalAlignment="Center"
-                                FontFamily="Arial"
-                                FontSize="14">
-                                <forms:DateTimePicker
-                                    x:Name="wfTimeTo"
-                                    CustomFormat="yyyy/MM/dd HH:mm:ss"
-                                    Format="Custom"
-                                    Value="2011-8-1" />
-                            </WindowsFormsHost>-->
-                        </StackPanel>
-                    </StackPanel>
-
-                    <StackPanel>
-                        <Button
-                            Width="100"
-                            Height="30"
-                            Margin="0,5,5,0"
-                            HorizontalAlignment="Right"
-                            Content="Query">
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="Click">
-                                    <micro:ActionMessage MethodName="QueryData">
-                                        <micro:ActionMessage.Parameters>
-                                            <micro:Parameter Value="{StaticResource False}" />
-                                        </micro:ActionMessage.Parameters>
-                                    </micro:ActionMessage>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </Button>
-
-                        <Button
-                            Width="100"
-                            Height="30"
-                            Margin="0,5,5,0"
-                            HorizontalAlignment="Right"
-                            Content="Append"
-                            ToolTip="Append selected items to current chart">
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="Click">
-                                    <micro:ActionMessage MethodName="QueryData">
-                                        <micro:ActionMessage.Parameters>
-                                            <micro:Parameter Value="{StaticResource True}" />
-                                        </micro:ActionMessage.Parameters>
-                                    </micro:ActionMessage>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </Button>
-
-                    </StackPanel>
-                </StackPanel>
+                <Grid>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="72"/>
+                        <ColumnDefinition Width="1*"/>
+                        <ColumnDefinition Width="1*"/>
+                    </Grid.ColumnDefinitions>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="5*"/>
+                        <RowDefinition Height="5*"/>
+                        <RowDefinition Height="6*"/>
+                    </Grid.RowDefinitions>
+                    <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial" FontSize="14" Foreground="{StaticResource FG_Black}" Text="Start Time" />
+                    <Button Grid.Column="1" Grid.ColumnSpan="2" x:Name="wfTimeFrom" Margin="1" ContentStringFormat="yyyy-MM-dd HH:mm:ss">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="Click">
+                                <micro:ActionMessage MethodName="SelectDate">
+                                    <micro:Parameter Value="Start"/>
+                                </micro:ActionMessage>
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </Button>
+                    <TextBlock Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial" FontSize="14" Foreground="{StaticResource FG_Black}" Text=" End Time" />
+                    <Button Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" x:Name="wfTimeTo" Margin="1" ContentStringFormat="yyyy-MM-dd HH:mm:ss">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="Click">
+                                <micro:ActionMessage MethodName="SelectDate">
+                                    <micro:Parameter Value="End"/>
+                                </micro:ActionMessage>
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </Button>
+                    <Button Margin="0,5,5,0"  Content="Query" Grid.Column="1" Grid.Row="2">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="Click">
+                                <micro:ActionMessage MethodName="QueryData">
+                                    <micro:ActionMessage.Parameters>
+                                        <micro:Parameter Value="{StaticResource False}" />
+                                    </micro:ActionMessage.Parameters>
+                                </micro:ActionMessage>
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </Button>
 
+                    <Button   Margin="0,5,5,0"   Content="Append" ToolTip="Append selected items to current chart" Grid.Column="2" Grid.Row="2">
+                        <i:Interaction.Triggers>
+                            <i:EventTrigger EventName="Click">
+                                <micro:ActionMessage MethodName="QueryData">
+                                    <micro:ActionMessage.Parameters>
+                                        <micro:Parameter Value="{StaticResource True}" />
+                                    </micro:ActionMessage.Parameters>
+                                </micro:ActionMessage>
+                            </i:EventTrigger>
+                        </i:Interaction.Triggers>
+                    </Button>
+                </Grid>
             </Border>
 
             <Border
@@ -200,13 +141,17 @@
             </Grid.RowDefinitions>
             <TabControl x:Name="tabControl">
                 <TabItem Header="Chart">
-                    <userControls:DataViewChart
-                x:Name="chart"
-                AutoRange="{Binding ChartAutoRange}"
-                IsEnabled="{Binding IsBusy, Converter={StaticResource boolReverseConverter}}"
-                RenderableSeries="{Binding SelectedData}"
-                VisibleRangeTime="{Binding VisibleRangeTime}"
-                VisibleRangeValue="{Binding VisibleRangeValue}" />
+                    <Grid>
+                        <userControls:DataViewChart
+                        x:Name="chart"
+                        AutoRange="{Binding ChartAutoRange}"
+                        IsEnabled="{Binding IsBusy, Converter={StaticResource boolReverseConverter}}"
+                        RenderableSeries="{Binding SelectedData}"
+                        VisibleRangeTime="{Binding VisibleRangeTime}"
+                        VisibleRangeValue="{Binding VisibleRangeValue}"
+                        Direction="{Binding Source={x:Reference Name=CbDirection},Path=Text}"/>
+                        <userControls:FourArrowButton ArrowColor="{StaticResource Button_BG}"  VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,50,0"/>
+                    </Grid>
                 </TabItem>
                 <TabItem Header="Table Format" Padding="5" x:Name="tabTable">
                         <!--<TreeView x:Name="treeView" FontSize="16" ItemsSource="{Binding HistoryData}">
@@ -328,44 +273,11 @@
             </userControls:BusyIndicator>
 
             <StackPanel Grid.Row="1" Orientation="Horizontal">
-                <Button Margin="2,2,0,2" Width="95"  Content="Move Left">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="ToLeftClick">
-                            </micro:ActionMessage>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
-                <Button  Margin="1,2,0,2" Width="95"  Content="Move Right">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="ToRightClick">
-                            </micro:ActionMessage>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
-
-                <Button  Margin="1,2,0,2" Width="95"  Content="Move Up">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="ToMoveUpClick">
-                            </micro:ActionMessage>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
-                <Button  Margin="1,2,0,2" Width="95"  Content="Move Down">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="ToMoveDownClick">
-                            </micro:ActionMessage>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
-              
                 <Button Content="Zoom In" Width="95" Margin="1,2,0,2">
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Click">
                             <micro:ActionMessage MethodName="ZoomInClick">
+                                <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
                             </micro:ActionMessage>
                         </i:EventTrigger>
                     </i:Interaction.Triggers>
@@ -374,31 +286,16 @@
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Click">
                             <micro:ActionMessage MethodName="ZoomOutClick">
+                                <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
                             </micro:ActionMessage>
                         </i:EventTrigger>
                     </i:Interaction.Triggers>
                 </Button>
-
-                <Button
-                            Width="95"
-                            Margin="1,2,0,2"
-                            Content="X Zoom In">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="XZoomInClick"/>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
-                <Button
-                            Width="100"
-                            Margin="1,2,0,2"
-                            Content="X Zoom Out">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="XZoomOutClick"/>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
+                <ComboBox x:Name="CbDirection" SelectedIndex="0" IsEditable="False" Margin="2,2,0,2">
+                    <ComboBoxItem Content="XYDirection"/>
+                    <ComboBoxItem Content="XDirection"/>
+                    <ComboBoxItem Content="YDirection"/>
+                </ComboBox>
             </StackPanel>
         </Grid>
 

+ 29 - 41
FrameworkLocal/UIClient/CenterViews/DataLogs/DataHistory/DataViewModel.cs

@@ -289,57 +289,45 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.DataHistory
             }
         }
 
-        public void ToLeftClick()
+        public void ZoomInClick(int index)
         {
             var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.XAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
+            index += 1;
+            if ((index & 0x01) == 1)
+                view.chart.sciChart.ChartModifier.XAxis.ZoomBy(-0.1, -0.1);
+            if ((index & 0x02) == 2)
+                view.chart.sciChart.ChartModifier.YAxis.ZoomBy(-0.1, -0.1);
         }
 
-        public void ToRightClick()
+        public void ZoomOutClick(int index)
         {
             var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.XAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
-        }
-
-        public void ZoomInClick()
+            index += 1;
+            if ((index & 0x01) == 1)
+                view.chart.sciChart.ChartModifier.XAxis.ZoomBy(0.1, 0.1);
+            if ((index & 0x02) == 2)
+                view.chart.sciChart.ChartModifier.YAxis.ZoomBy(0.1, 0.1);
+        }     
+        public void ArrowClick(string direction)
         {
             var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.XAxis.ZoomBy(-0.1, -0.1);
-            view.chart.sciChart.ChartModifier.YAxis.ZoomBy(-0.1, -0.1);
-        }
-
-        public void ZoomOutClick()
-        {
-            var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.XAxis.ZoomBy(0.1, 0.1);
-            view.chart.sciChart.ChartModifier.YAxis.ZoomBy(0.1, 0.1);
-        }
-
-        public void XZoomInClick()
-        {
-            var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.XAxis.ZoomBy(-0.1, -0.1);
-        }
-
-        public void XZoomOutClick()
-        {
-            var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.XAxis.ZoomBy(0.1, 0.1);
-        }
-
-        public void ToMoveUpClick()
-        {
-            var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.YAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
-        }
-
-        public void ToMoveDownClick()
-        {
-            var view = GetView() as DataView;
-            view.chart.sciChart.ChartModifier.YAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
+            switch (direction)
+            {
+                case "Up":
+                    view.chart.sciChart.ChartModifier.YAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
+                    break;
+                case "Down":
+                    view.chart.sciChart.ChartModifier.YAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
+                    break;
+                case "Left":
+                    view.chart.sciChart.ChartModifier.XAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
+                    break;
+                case "Right":
+                    view.chart.sciChart.ChartModifier.XAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
+                    break;
+            }
         }
 
-
         public void Query(object parameter)
         {
             WaferHistoryRecipe waferHistoryRecipe = parameter as WaferHistoryRecipe;

+ 60 - 26
FrameworkLocal/UIClient/CenterViews/DataLogs/ProcessHistory/ProcessDetailView.xaml

@@ -9,6 +9,7 @@
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:micro="clr-namespace:Caliburn.Micro"
     xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
+    xmlns:userControls="clr-namespace:MECF.Framework.UI.Client.ClientBase.UserControls"
     x:Name="userCotrol"
     Width="1280"
     Height="960"
@@ -62,6 +63,8 @@
                         <RowDefinition Height="25"/>
                         <RowDefinition Height="25"/>
                         <RowDefinition Height="*"/>
+                        <RowDefinition Height="25"/>
+                        <RowDefinition Height="*"/>
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
                         <ColumnDefinition Width="80"/>
@@ -74,31 +77,31 @@
                     <TextBox Text="{Binding RecipeNameDisPlay}" Grid.Row="1" Grid.Column="1" IsReadOnly="True"/>
                     <TextBlock Text="StepName" Grid.Row="2" VerticalAlignment="Center"/>
                     <TextBox Text="{Binding StepNameDisPlay}" Grid.Row="2" Grid.Column="1" IsReadOnly="True" />
-                    <TreeView x:Name="ParameterTreeView" ItemsSource="{Binding ParameterNodes}" Grid.Row="3" Grid.ColumnSpan="2">
+                    <TreeView x:Name="ParameterTreeView" ItemsSource="{Binding ParameterNodes}" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="3"
+                               VirtualizingPanel.IsVirtualizingWhenGrouping="True"
+                               VirtualizingStackPanel.CacheLengthUnit="Item"
+                               VirtualizingStackPanel.IsVirtualizing="True"
+                               VirtualizingStackPanel.ScrollUnit="Pixel"
+                               VirtualizingStackPanel.VirtualizationMode="Recycling">
                         <TreeView.ItemTemplate>
                             <HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
                                 <StackPanel Orientation="Horizontal">
-                                    <CheckBox
-                                    Margin="0,11,0,0"
-                                    IsChecked="{Binding Selected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                            Visibility="{Binding IsVisibilityParentNode}">
+                                    <CheckBox  IsChecked="{Binding Selected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsVisibilityParentNode}">
                                         <i:Interaction.Triggers>
                                             <i:EventTrigger EventName="Click">
                                                 <micro:ActionMessage MethodName="ParameterCheck">
                                                     <micro:Parameter Value="{Binding}"/>
+                                                    <micro:Parameter Value="{Binding Source={x:Reference Name=sciChart},Path=RenderableSeries}"/>
                                                 </micro:ActionMessage>
                                             </i:EventTrigger>
                                         </i:Interaction.Triggers>
                                     </CheckBox>
-                                    <TextBlock
-                                    Height="30"
-                                    MinWidth="150"
-                                    Margin="0,10,0,0"
-                                    Text="{Binding Name}">
-                                    <i:Interaction.Triggers>
+                                    <TextBlock Height="30"  MinWidth="150"  Margin="0,10,0,0" Text="{Binding Name}">
+                                    <i:Interaction.Triggers>                                        
                                        <i:EventTrigger EventName="MouseLeftButtonDown">
                                           <micro:ActionMessage MethodName="TxtMouseLeftButtonDown">
                                              <micro:Parameter Value="{Binding}"/>
+                                             <micro:Parameter Value="{Binding Source={x:Reference Name=sciChart},Path=RenderableSeries}"/>
                                           </micro:ActionMessage>
                                        </i:EventTrigger>
                                      </i:Interaction.Triggers>
@@ -107,6 +110,42 @@
                             </HierarchicalDataTemplate>
                         </TreeView.ItemTemplate>
                     </TreeView>
+                    <Border x:Name="treeTitle" BorderThickness="2" BorderBrush="{StaticResource Area_BD}" Grid.ColumnSpan="2" Grid.Row="4" Visibility="Hidden">
+                        <TextBlock Text="Double ParameterNodes" Margin="5" VerticalAlignment="Center" TextAlignment="Center"/>
+                    </Border>
+                    <TreeView x:Name="doubleParameterTree" ItemsSource="{Binding DoubleParameterNodes}" Grid.Row="5" Grid.ColumnSpan="2" Visibility="Collapsed"
+                               VirtualizingPanel.IsVirtualizingWhenGrouping="True"
+                               VirtualizingStackPanel.CacheLengthUnit="Item"
+                               VirtualizingStackPanel.IsVirtualizing="True"
+                               VirtualizingStackPanel.ScrollUnit="Pixel"
+                               VirtualizingStackPanel.VirtualizationMode="Recycling">
+                        <TreeView.ItemTemplate>
+                            <HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
+                                <StackPanel Orientation="Horizontal">
+                                    <CheckBox Margin="0,11,0,0" IsChecked="{Binding Selected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsVisibilityParentNode}">
+                                        <i:Interaction.Triggers>
+                                            <i:EventTrigger EventName="Click">
+                                                <micro:ActionMessage MethodName="ParameterCheck">
+                                                    <micro:Parameter Value="{Binding}"/>
+                                                    <micro:Parameter Value="{Binding Source={x:Reference Name=syncChart},Path=RenderableSeries}"/>
+                                                </micro:ActionMessage>
+                                            </i:EventTrigger>
+                                        </i:Interaction.Triggers>
+                                    </CheckBox>
+                                    <TextBlock  Height="30" MinWidth="150" Margin="0,10,0,0" Text="{Binding Name}">
+                                       <i:Interaction.Triggers>
+                                           <i:EventTrigger EventName="MouseLeftButtonDown">
+                                              <micro:ActionMessage MethodName="TxtMouseLeftButtonDown">
+                                                   <micro:Parameter Value="{Binding}"/>
+                                                   <micro:Parameter Value="{Binding Source={x:Reference Name=syncChart},Path=RenderableSeries}"/>
+                                               </micro:ActionMessage>
+                                            </i:EventTrigger>
+                                       </i:Interaction.Triggers>
+                                    </TextBlock>
+                                </StackPanel>
+                            </HierarchicalDataTemplate>
+                        </TreeView.ItemTemplate>
+                    </TreeView>
                 </Grid>
             </Border>
             <Border
@@ -121,24 +160,19 @@
                     <StackPanel Orientation="Horizontal">
                         <RadioButton x:Name="IsEnablePan" Content="Pan" Width="60" GroupName="PanOrZoom" IsChecked="True" Margin="2,0,2,0"/>
                         <RadioButton Name="IsEnableZoom" Content="Zoom" Width="60" GroupName="PanOrZoom" IsChecked="False" Margin="2,0,2,0"/>
-                        <RadioButton x:Name="SelectSeries" Content="Select Series" Unchecked="SelectSeries_Unchecked"  GroupName="select"/>
-                        <Button x:Name="MoveToLower" Content=">>" Width="60" ToolTip="SelectLine move to Lower Chart" Click="Button_Click"></Button>
-                        <Button x:Name="MoverToUpper" Content="&lt;&lt;" Width="60"  ToolTip="SelectLine move to Upper Chart" Click="Button_Click"></Button>
+                        <RadioButton x:Name="DoubleChart" Content="Double Chart" Click="Double_Click" />
                         <RadioButton x:Name="ZoomByLine" Content="ZoomByLine" ToolTip="Select Two Point To Zoom Chart"  GroupName="select"/>
                         <RadioButton x:Name="ShowVerticalLine" Content="+" Width="60" ToolTip="Add Vertical Line" Checked="RadioButton_Checked" Unchecked="ShowVetical_UnChecked" GroupName="select"/>
                         <RadioButton x:Name="HoldVetical" Content="Hold" Width="60" ToolTip="Hold Vertical Line"  IsEnabled="{Binding Source={x:Reference Name=ShowVerticalLine},Path=IsChecked}" />
                         <RadioButton x:Name="DeleteVertical" Content="-" Width="60" ToolTip="Delect Vertical Line" Checked="RadioButton_Checked" GroupName="select"/>
                     </StackPanel>
                     <Grid Height="698">
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="268*"/>
-                            <ColumnDefinition Width="45*"/>
-                        </Grid.ColumnDefinitions>
                         <Grid.RowDefinitions>
                             <RowDefinition Height="*"/>
                             <RowDefinition Height="*"/>
                         </Grid.RowDefinitions>
-                        <s:SciChartSurface x:Name="sciChart" RenderableSeries="{Binding SelectedData}"   s:ThemeManager.Theme="ExpressionDark"
+                        <userControls:FourArrowButton ArrowColor="{StaticResource Button_BG}"  VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,50,0" Panel.ZIndex="1"/>
+                        <s:SciChartSurface x:Name="sciChart" RenderableSeries="{Binding SelectedData}" s:ThemeManager.Theme="ExpressionDark"
                                            s:SciChartGroup.VerticalChartGroup="SyncedChartsSameAxisSizes" Grid.RowSpan="2"   BorderBrush="Gray"
                                             DebugWhyDoesntSciChartRender="False" Grid.ColumnSpan="2">
                             <i:Interaction.Triggers>
@@ -175,10 +209,10 @@
                                       FontFamily="Arial,SimSun" FontSize="9" IsEnabled="True" ShowAxisLabels="False" SnapsToDevicePixels="False" UseInterpolation="False" ReceiveHandledEvents="True"/>
 
                                     <s:MouseWheelZoomModifier XyDirection="{Binding Direction}"/>
-                                    <s:SeriesSelectionModifier IsEnabled="{Binding Source={x:Reference Name=SelectSeries}, Path=IsChecked}">
+                                    <!--<s:SeriesSelectionModifier IsEnabled="{Binding Source={x:Reference Name=SelectSeries}, Path=IsChecked}">
                                         <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                             <Style TargetType="s:BaseRenderableSeries">
-                                                <!--<Setter Property="Stroke" Value="White"/>-->
+                                                --><!--<Setter Property="Stroke" Value="White"/>--><!--
                                                 <Setter Property="PointMarkerTemplate">
                                                     <Setter.Value>
                                                         <ControlTemplate>
@@ -188,7 +222,7 @@
                                                 </Setter>
                                             </Style>
                                         </s:SeriesSelectionModifier.SelectedSeriesStyle>
-                                    </s:SeriesSelectionModifier>
+                                    </s:SeriesSelectionModifier>-->
                                     <s:VerticalSliceModifier Name="sliceModifier" ReceiveHandledEvents="True"/>
                                     <s:AnnotationCreationModifier x:Name="annotationCreation" IsEnabled="{Binding Source={x:Reference Name=ZoomByLine},Path=IsChecked}" AnnotationType="{x:Type s:LineArrowAnnotation}"
                                                                   AnnotationStyle="{StaticResource lineArrowAnnotationStyle}" AnnotationCreated="OnAnnotationCreated"/>
@@ -222,7 +256,7 @@
                                     <s:RolloverModifier  SourceMode="AllVisibleSeries"  DrawVerticalLine="False" 
                                       FontFamily="Arial,SimSun" FontSize="9" IsEnabled="True"  ShowAxisLabels="False" SnapsToDevicePixels="False" UseInterpolation="False" ReceiveHandledEvents="True" Tag="SecondYAxis"/>
                                     <s:MouseWheelZoomModifier XyDirection="{Binding Direction}"/>
-                                    <s:SeriesSelectionModifier IsEnabled="{Binding Source={x:Reference Name=SelectSeries}, Path=IsChecked}" Tag="SecondYAxis">
+                                    <!--<s:SeriesSelectionModifier IsEnabled="{Binding Source={x:Reference Name=SelectSeries}, Path=IsChecked}" Tag="SecondYAxis">
                                         <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                             <Style TargetType="s:BaseRenderableSeries">
                                                 <Setter Property="PointMarkerTemplate">
@@ -234,7 +268,7 @@
                                                 </Setter>
                                             </Style>
                                         </s:SeriesSelectionModifier.SelectedSeriesStyle>
-                                    </s:SeriesSelectionModifier>
+                                    </s:SeriesSelectionModifier>-->
                                     <s:AnnotationCreationModifier  IsEnabled="{Binding Source={x:Reference Name=ZoomByLine},Path=IsChecked}" AnnotationType="{x:Type s:LineArrowAnnotation}"
                                                                   AnnotationStyle="{StaticResource lineArrowAnnotationStyle}" AnnotationCreated="OnAnnotationCreated"/>
                                 </s:ModifierGroup>
@@ -242,7 +276,7 @@
                         </s:SciChartSurface>
                     </Grid>
                     <StackPanel Orientation="Horizontal">
-                        <Button
+                        <!--<Button
                             Width="90"
                             Margin="0,2,0,2"
                             Content="BackWard">
@@ -261,7 +295,7 @@
                                     <micro:ActionMessage MethodName="ForwardPan"/>
                                 </i:EventTrigger>
                             </i:Interaction.Triggers>
-                        </Button>
+                        </Button>-->
 
                         <Button
                             Width="90"

+ 18 - 41
FrameworkLocal/UIClient/CenterViews/DataLogs/ProcessHistory/ProcessDetailView.xaml.cs

@@ -96,20 +96,28 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
             sciChart.MouseLeftButtonUp -= sciChart_MouseLeftButtonUp;
             e.Handled = true;
         }
-
-        private void SelectSeries_Unchecked(object sender, RoutedEventArgs e)
+        int ClickCount = 0;
+        private void Double_Click(object sender, RoutedEventArgs e)
         {
-            foreach (var item in sciChart.RenderableSeries)
+            var t = sender as RadioButton;
+            ClickCount++;
+            if(ClickCount%2==0) t.IsChecked = false;
+            if(t.IsChecked==true)
             {
-                if(item.IsSelected)
-                item.IsSelected = false;
+                Grid.SetRowSpan(sciChart, 1);
+                syncChart.Visibility = Visibility.Visible;
+                doubleParameterTree.Visibility = Visibility.Visible;
+                treeTitle.Visibility = Visibility.Visible;
+                Grid.SetRowSpan(ParameterTreeView, 1);
             }
-            foreach (var item in syncChart.RenderableSeries)
+            else
             {
-                if (item.IsSelected)
-                    item.IsSelected = false;
+                syncChart.Visibility = Visibility.Collapsed;
+                Grid.SetRowSpan(sciChart, 2);
+                treeTitle.Visibility= Visibility.Collapsed;
+                doubleParameterTree.Visibility = Visibility.Collapsed;
+                Grid.SetRowSpan(ParameterTreeView, 3);
             }
-            e.Handled = true;
         }
 
         private void sciChart_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
@@ -121,37 +129,6 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
             }
             e.Handled = true;
         }
-
-        private void Button_Click(object sender, RoutedEventArgs e)
-        {
-            if (sender is Button btn)
-            {
-                if (btn.Name == "MoveToLower")
-                {   
-                     var series=sciChart.SelectedRenderableSeries.FirstOrDefault();
-                    if (series == null) return;                    
-                    sciChart.RenderableSeries.Remove(series);                   
-                    syncChart.RenderableSeries.Add(series);
-                    if (syncChart.Visibility != Visibility.Visible)
-                    {
-                        Grid.SetRowSpan(sciChart, 1);
-                        syncChart.Visibility = Visibility.Visible; 
-                    }
-                }
-                else if (btn.Name == "MoverToUpper")
-                {
-                    var series = syncChart.SelectedRenderableSeries.FirstOrDefault();
-                    if (series == null) return;
-                    syncChart.RenderableSeries.Remove(series);
-                    sciChart.RenderableSeries.Add(series);
-                    if (syncChart.RenderableSeries == null || syncChart.RenderableSeries.Count == 0)
-                    {
-                        syncChart.Visibility = Visibility.Hidden;
-                        Grid.SetRowSpan(sciChart, 2);
-                    }
-                }
-            }
-
-        }      
+      
     }
 }

+ 80 - 97
FrameworkLocal/UIClient/CenterViews/DataLogs/ProcessHistory/ProcessDetailViewModel.cs

@@ -34,6 +34,9 @@ using System.Windows.Controls;
 using SciChart.Charting.Model.ChartData;
 using MECF.Framework.UI.Client.Converter;
 using MECF.Framework.UI.Client.CenterViews.Operations.RealTime;
+using SciChart.Core.Extensions;
+using System.Linq.Expressions;
+using System.Reflection;
 
 namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
 {
@@ -106,6 +109,8 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
             get { return _ParameterNodes; }
             set { _ParameterNodes = value; NotifyOfPropertyChange("ParameterNodes"); }
         }
+        public List<ParameterNode> DoubleParameterNodes { get; set; }=new List<ParameterNode>();
+       
 
         public ObservableCollection<IRenderableSeries> SelectedData { get; set; }
         public ObservableCollection<IRenderableSeries> SynSelectedData { get; set; }
@@ -292,6 +297,12 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
             DisplayName = "Process Detail";
             RecipeDatas = recipes;
             ParameterNodes = _realtimeProvider.GetParameters(out var dict);
+            DoubleParameterNodes = _realtimeProvider.GetParameters(out dict).ToList();
+            for (int j = 0; j < ParameterNodes.Count; j++)
+            {
+                ParameterNodes[j].IsVisibilityParentNode = Visibility.Hidden;
+                DoubleParameterNodes[j].IsVisibilityParentNode = Visibility.Hidden;
+            }
             _processDetailDisplayDic = dict;
             if (recipes == null || recipes.Count == 0)
             {
@@ -452,11 +463,6 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                 if (_isAdding)
                     return true;
                 bool allUpdated = true;
-                for (int j = 0; j < ParameterNodes.Count; j++)
-                {
-                    ParameterNode par = ParameterNodes[j];
-                    par.IsVisibilityParentNode = Visibility.Hidden;
-                }
                 lock (_lockSelection)
                 {
                     foreach (var item in _lstTokenTimeData)
@@ -621,34 +627,8 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
             {
                 try
                 {
-                    var items = SelectedData.Where(x => (x as ChartDataLine<T>).DataSource == dataSource);
-                    foreach (var item in items)
-                    {
-                        var seriesItem = item as ChartDataLine<T>;
-                        if (seriesItem == null)
-                            continue;
-
-                        foreach (var data in historyData)
-                        {
-                            var dataKey = _processDetailDisplayDic.ContainsKey(seriesItem.DataName) ? _processDetailDisplayDic[seriesItem.DataName] : seriesItem.DataName;
-                            if (data.Key != dataKey)
-                                continue;
-
-                            seriesItem.Capacity += data.Value.Count;
-                            //DateTime beginTime = StepStartTime;
-                            for (int i = 0; i < data.Value.Count; i++)
-                            {
-                                var historyDataItem = data.Value[i];
-                                if (typeof(T) == typeof(double))
-                                {
-                                    //xData = Math.Round((historyDataItem.dateTime - beginTime).TotalMilliseconds / 1000, 0, MidpointRounding.AwayFromZero);
-                                    seriesItem.Append((T)Convert.ChangeType((historyDataItem.dateTime- StepStartTime).TotalMilliseconds/1000d, typeof(T)), historyDataItem.value);
-                                }
-                                else
-                                    seriesItem.Append((T)Convert.ChangeType(historyDataItem.dateTime, typeof(T)), historyDataItem.value);
-                            }
-                        }
-                    }
+                    FillDataToChart(SelectedData,dataSource, historyData);
+                    FillDataToChart(SynSelectedData, dataSource, historyData);
                     RefresCharView();
                 }
                 catch (Exception ex)
@@ -657,6 +637,39 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                 }
             }));
         }
+
+        void FillDataToChart(ObservableCollection<IRenderableSeries> series,string dataSource, Dictionary<string, List<HistoryDataItem>> historyData)
+        {
+            var items = series.Where(x => (x as ChartDataLine<T>).DataSource == dataSource);
+            if (items == null) return;
+            foreach (var item in items)
+            {
+                var seriesItem = item as ChartDataLine<T>;
+                if (seriesItem == null)
+                    continue;
+
+                foreach (var data in historyData)
+                {
+                    var dataKey = _processDetailDisplayDic.ContainsKey(seriesItem.DataName) ? _processDetailDisplayDic[seriesItem.DataName] : seriesItem.DataName;
+                    if (data.Key != dataKey)
+                        continue;
+
+                    seriesItem.Capacity += data.Value.Count;
+                    //DateTime beginTime = StepStartTime;
+                    for (int i = 0; i < data.Value.Count; i++)
+                    {
+                        var historyDataItem = data.Value[i];
+                        if (typeof(T) == typeof(double))
+                        {
+                            //xData = Math.Round((historyDataItem.dateTime - beginTime).TotalMilliseconds / 1000, 0, MidpointRounding.AwayFromZero);
+                            seriesItem.Append((T)Convert.ChangeType((historyDataItem.dateTime - StepStartTime).TotalMilliseconds / 1000d, typeof(T)), historyDataItem.value);
+                        }
+                        else
+                            seriesItem.Append((T)Convert.ChangeType(historyDataItem.dateTime, typeof(T)), historyDataItem.value);
+                    }
+                }
+            }
+        }
         /// <summary>
         /// 获取时间列表
         /// </summary>
@@ -699,14 +712,14 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                 }
             }
         }
-        public void TxtMouseLeftButtonDown(ParameterNode node)
+        public void TxtMouseLeftButtonDown(ParameterNode node,ObservableCollection<IRenderableSeries> series)
         {
             node.Selected = !node.Selected;
-            ParameterCheck(node);
+            ParameterCheck(node,series);
         }
-        public void ParameterCheck(ParameterNode node)
+        public void ParameterCheck(ParameterNode node, ObservableCollection<IRenderableSeries> series)
         {
-            bool result = RefreshTreeStatusToChild(node);
+            bool result = RefreshTreeStatusToChild(node,series);
             if (!result)
             {
                 node.Selected=!node.Selected;
@@ -719,7 +732,7 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
         /// <summary>
         /// Refresh tree node status from current to children, and add data to SelectedData
         /// </summary>
-        private bool RefreshTreeStatusToChild(ParameterNode node)
+        private bool RefreshTreeStatusToChild(ParameterNode node, ObservableCollection<IRenderableSeries> SelectedData)
         {
             if (node?.ChildNodes.Count > 0)
             {
@@ -728,7 +741,7 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                     ParameterNode n = node.ChildNodes[i];
                     n.Selected = node.Selected;
 
-                    if (!RefreshTreeStatusToChild(n))
+                    if (!RefreshTreeStatusToChild(n, SelectedData))
                     {
                         n.Selected = !n.Selected;
                         return false;
@@ -741,17 +754,10 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                 try
                 {
                     var item = SelectedData?.FirstOrDefault(x => (x as ChartDataLine<T>).DataName == node.Name);
-                    if (item == null) item = SynSelectedData.FirstOrDefault(x => (x as ChartDataLine<T>).DataName == node.Name);
                     bool isExist = item != null;
                     if (isExist && !node.Selected)//删除
                     {
                         SelectedData.Remove(item);
-                        SynSelectedData.Remove(item);
-                        if (SynSelectedData.Count == 0 && this.view.syncChart.Visibility == Visibility.Visible)
-                        {
-                            this.view.syncChart.Visibility = Visibility.Hidden;
-                            Grid.SetRowSpan(this.view.sciChart, 2);
-                        }
                     }
                     else
                     {
@@ -858,12 +864,6 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                 RefreshTreeStatusToParent(cp.Tag as ParameterNode);
             }
             SelectedData.Clear();
-            SynSelectedData.Clear();
-            if (this.view.syncChart.Visibility == Visibility.Visible)
-            {
-                this.view.syncChart.Visibility = Visibility.Hidden;
-                Grid.SetRowSpan(this.view.sciChart, 2);
-            }
         }
 
         private void SetParameterNode(ObservableCollection<ParameterNode> nodes, bool isChecked)
@@ -884,10 +884,8 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                     //uncheck tree node
                     (cp.Tag as ParameterNode).Selected = false;
                     RefreshTreeStatusToParent(cp.Tag as ParameterNode);
-
                     SelectedData.Remove(cp);
                 }
-                if (SynSelectedData.Contains(cp)) { SynSelectedData.Remove(cp); }
             }
         }
 
@@ -1236,51 +1234,37 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
         public void RefresCharView()
         {
             this.view.sciChart.ZoomExtents();
-        }
-        public void BackPan()//前移
-        {
-            if ((_directionByte & 0x01) == 1)//x
-            {
-                // LOG.Info($"A BackPan.X:scale{XScale},{VisibleRangeTime.Min}:{VisibleRangeTime.Max}");
-                if (VisibleRangeTime is DoubleRange range)
-                {
-                    VisibleRangeTime = new DoubleRange(range.Min - XScale, range.Max - XScale);
-                    // LOG.Info($"BackPan.X:scale{XScale},{VisibleRangeTime.Min}:{VisibleRangeTime.Max}");
-                }
-            }
-            if ((_directionByte & 0x02) == 2)
-            {
-                // LOG.Info($"A BackPan.Y:scale{YScale},{VisibleRangeValue.Min}:{VisibleRangeValue.Max}");
-                if (VisibleRangeValue is DoubleRange range)
-                {
-                    VisibleRangeValue = new DoubleRange(range.Min - YScale, range.Max - YScale);
-                    //LOG.Info($"BackPan.Y:scale{YScale},{VisibleRangeValue.Min}:{VisibleRangeValue.Max}");
-                }
-            }
-        }
-
-        public void ForwardPan()//后移
+        }   
+        public void ArrowClick(string direction)
         {
-            if ((_directionByte & 0x01) == 1)//x
+            switch (direction)
             {
-                // LOG.Info($"A ForwardPan.X:scale{XScale},{VisibleRangeTime.Min}:{VisibleRangeTime.Max}");
-                if (VisibleRangeTime is DoubleRange range)
-                {
-                    VisibleRangeTime = new DoubleRange(range.Min + XScale, range.Max + XScale);
-                    // LOG.Info($"ForwardPan.X:scale{XScale},{VisibleRangeTime.Min}:{VisibleRangeTime.Max}");
-                }
-            }
-            if ((_directionByte & 0x02) == 2)
-            {
-                //LOG.Info($"A ForwardPan.Y:scale{YScale},{VisibleRangeValue.Min}:{VisibleRangeValue.Max}");
-                if (VisibleRangeValue is DoubleRange range)
-                {
-                    VisibleRangeValue = new DoubleRange(range.Min + YScale, range.Max + YScale);
-                    //LOG.Info($"ForwardPan.Y:scale{YScale},{VisibleRangeValue.Min}:{VisibleRangeValue.Max}");
-                }
+                case "Up":
+                    if (VisibleRangeValue is DoubleRange uprange)
+                    {
+                        VisibleRangeValue = new DoubleRange(uprange.Min + YScale, uprange.Max + YScale);                       
+                    }
+                    break;
+                case "Down":
+                    if (VisibleRangeValue is DoubleRange downrange)
+                    {
+                        VisibleRangeValue = new DoubleRange(downrange.Min - YScale, downrange.Max - YScale);
+                    }
+                    break;
+                case "Left":
+                    if (VisibleRangeTime is DoubleRange leftrange)
+                    {
+                        VisibleRangeTime = new DoubleRange(leftrange.Min - XScale, leftrange.Max - XScale);               
+                    }
+                    break;
+                case "Right":
+                    if (VisibleRangeTime is DoubleRange range)
+                    {
+                        VisibleRangeTime = new DoubleRange(range.Min + XScale, range.Max + XScale);                       
+                    }
+                    break;
             }
         }
-
         public void ZoomInClick()//放大
         {
             double scale = 0;
@@ -1374,7 +1358,7 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                     allCheckNode.AddRange(GetAllCheckedLeafNode(x));
                 });
 
-                allCheckNode.ForEach(x => { ParameterCheck(x); });
+                allCheckNode.ForEach(x => { ParameterCheck(x,SelectedData); });
             }
         }
 
@@ -1445,7 +1429,6 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
             }
         }
     }
-
     public class ProcessDataLot : NotifiableItem
     {
         private string _guid;

+ 2 - 2
FrameworkLocal/UIClient/CenterViews/DataLogs/ProcessHistory/ProcessHistoryTwoView.xaml

@@ -257,13 +257,13 @@
                         IsReadOnly="True"/>
                     <DataGridTextColumn
                         Width="150"
-                        Binding="{Binding StartTime}"
+                        Binding="{Binding StartTime,StringFormat=yyyy-MM-dd HH:mm:ss}"
                         CanUserResize="False"
                         Header="Start Time"
                         IsReadOnly="True"/>
                     <DataGridTextColumn
                         Width="150"
-                        Binding="{Binding EndTime}"
+                        Binding="{Binding EndTime,StringFormat=yyyy-MM-dd HH:mm:ss}"
                         CanUserResize="False"
                         Header="End Time"
                         IsReadOnly="True"/>

+ 1 - 18
FrameworkLocal/UIClient/CenterViews/Operations/RealTime/RealTimeView.xaml

@@ -167,6 +167,7 @@
             </s:SciChartSurface>
             <CheckBox Margin="10"   VerticalAlignment="Top" Content="Auto Zoom" HorizontalAlignment="Left"
                   IsChecked="{Binding EnableAutoZoom, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+            <userControls:FourArrowButton ArrowColor="{StaticResource Button_BG}"  VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,50,0" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}"/>
         </Grid>
         <StackPanel
             Grid.Row="1"
@@ -182,24 +183,6 @@
                     <ComboBoxItem Content="YDirection"/>
                     <ComboBoxItem Content="XYDirection"/>
                 </ComboBox>
-                <Button Margin="2,2,0,2" Width="95"  Content="BackWard" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="ToLeftClick">
-                                <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
-                            </micro:ActionMessage>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
-                <Button  Margin="1,2,0,2" Width="95"  Content="Forward" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}">
-                    <i:Interaction.Triggers>
-                        <i:EventTrigger EventName="Click">
-                            <micro:ActionMessage MethodName="ToRightClick">
-                                <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
-                            </micro:ActionMessage>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>
-                </Button>
                 <Button Content="Zoom In" Width="95" Margin="1,2,0,2" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}">
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Click">

+ 14 - 16
FrameworkLocal/UIClient/CenterViews/Operations/RealTime/RealTimeViewModel.cs

@@ -311,28 +311,26 @@ namespace MECF.Framework.UI.Client.CenterViews.Operations.RealTime
             }
         }
 
-        public void ToLeftClick(int index)
+        public void ArrowClick(string direction)
         {
             var view = GetView() as RealtimeView;
-            index += 1;//从0开始
-            if ((index & 0x01) == 1)
-                view.sciChart.ChartModifier.XAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMin);
-            if ((index & 0x02) == 2)
+            switch (direction)
             {
-                view.sciChart.ChartModifier.YAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMin);
+                case "Up":
+                    view.sciChart.ChartModifier.YAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
+                    break;
+                case "Down":
+                    view.sciChart.ChartModifier.YAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
+                    break;
+                case "Left":
+                    view.sciChart.ChartModifier.XAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
+                    break;
+                case "Right":
+                    view.sciChart.ChartModifier.XAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
+                    break;
             }
         }
 
-        public void ToRightClick(int index)
-        {
-            var view = GetView() as RealtimeView;
-            index += 1;
-            if ((index & 0x01) == 1)
-                view.sciChart.ChartModifier.XAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMax);
-            if ((index & 0x02) == 2)
-                view.sciChart.ChartModifier.YAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMax);
-        }
-
         public void ZoomInClick(int index)
         {
             var view = GetView() as RealtimeView;

+ 98 - 0
FrameworkLocal/UIClient/ClientBase/UserControls/FourArrowButton.xaml

@@ -0,0 +1,98 @@
+<UserControl x:Class="MECF.Framework.UI.Client.ClientBase.UserControls.FourArrowButton"
+             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:cal="clr-namespace:Caliburn.Micro"
+             mc:Ignorable="d" 
+             d:DesignHeight="70" d:DesignWidth="70">
+    <UserControl.Resources>
+        <ControlTemplate x:Key="ArrowButtonTemplate" TargetType="Button">
+            <Viewbox>
+                <Path x:Name="arrowPath"
+              Data="{TemplateBinding Tag}"
+              Fill="{Binding ArrowColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
+              Stretch="Uniform"
+              RenderTransformOrigin="0.5,0.5">
+                    <Path.RenderTransform>
+                        <ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1"/>
+                    </Path.RenderTransform>
+                </Path>
+            </Viewbox>
+            <ControlTemplate.Triggers>
+                <!-- 鼠标悬停动画 -->
+                <Trigger Property="IsMouseOver" Value="True">
+                    <Trigger.EnterActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation Storyboard.TargetName="scaleTransform"
+                                         Storyboard.TargetProperty="ScaleX"
+                                         To="1.5" Duration="0:0:0.2"/>
+                                <DoubleAnimation Storyboard.TargetName="scaleTransform"
+                                         Storyboard.TargetProperty="ScaleY"
+                                         To="1.5" Duration="0:0:0.2"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </Trigger.EnterActions>
+                    <Trigger.ExitActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation Storyboard.TargetName="scaleTransform"
+                                         Storyboard.TargetProperty="ScaleX"
+                                         To="1" Duration="0:0:0.1"/>
+                                <DoubleAnimation Storyboard.TargetName="scaleTransform"
+                                         Storyboard.TargetProperty="ScaleY"
+                                         To="1" Duration="0:0:0.1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </Trigger.ExitActions>
+                </Trigger>
+                <Trigger Property="IsEnabled" Value="false">
+                    <Setter TargetName="arrowPath" Property="Fill" Value="{StaticResource Button_BG_Unable}"/>
+                </Trigger>
+            </ControlTemplate.Triggers>
+        </ControlTemplate>
+
+        <!-- 方向箭头路径数据 -->
+        <Geometry x:Key="UpArrow">M 8 14 L 16 6 24 14 20 14 20 22 12 22 12 14 8 14</Geometry>
+        <Geometry x:Key="DownArrow">M 8 18 L 12 18 12 10 20 10 20 18 24 18 16 26 8 18</Geometry>
+        <Geometry x:Key="LeftArrow">M 14 8 L 6 16 14 24 14 20 22 20 22 12 14 12 14 8</Geometry>
+        <Geometry x:Key="RightArrow">M 18 8 L 18 12 10 12 10 20 18 20 18 24 26 16 18 8</Geometry>
+    </UserControl.Resources>
+    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="Auto"/>
+            <ColumnDefinition Width="Auto"/>
+            <ColumnDefinition Width="Auto"/>
+        </Grid.ColumnDefinitions>
+
+        <!-- 上箭头 -->
+        <Button Grid.Row="0" Grid.Column="1"
+ Template="{StaticResource ArrowButtonTemplate}"
+ Tag="{StaticResource UpArrow}"
+ cal:Message.Attach="ArrowClick('Up')"/>
+
+         <!--左箭头--> 
+        <Button Grid.Row="1" Grid.Column="0"
+ Template="{StaticResource ArrowButtonTemplate}"
+ Tag="{StaticResource LeftArrow}"
+ cal:Message.Attach="ArrowClick('Left')"/>
+
+         <!--下箭头--> 
+        <Button Grid.Row="2" Grid.Column="1"
+ Template="{StaticResource ArrowButtonTemplate}"
+ Tag="{StaticResource DownArrow}"
+cal:Message.Attach="ArrowClick('Down')"/>
+
+         <!--右箭头--> 
+        <Button Grid.Row="1" Grid.Column="2"
+ Template="{StaticResource ArrowButtonTemplate}"
+ Tag="{StaticResource RightArrow}"
+cal:Message.Attach="ArrowClick('Right')"/>
+    </Grid>
+</UserControl>

+ 38 - 0
FrameworkLocal/UIClient/ClientBase/UserControls/FourArrowButton.xaml.cs

@@ -0,0 +1,38 @@
+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;
+
+namespace MECF.Framework.UI.Client.ClientBase.UserControls
+{
+    /// <summary>
+    /// FourArrowButton.xaml 的交互逻辑
+    /// </summary>
+    public partial class FourArrowButton : UserControl
+    {
+        public static readonly DependencyProperty ArrowColorProperty =
+        DependencyProperty.Register("ArrowColor", typeof(Brush),
+            typeof(FourArrowButton),
+            new PropertyMetadata(Brushes.DodgerBlue));
+
+        public Brush ArrowColor
+        {
+            get => (Brush)GetValue(ArrowColorProperty);
+            set => SetValue(ArrowColorProperty, value);
+        }
+        public FourArrowButton()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 1 - 2
FrameworkLocal/UIClient/ClientBase/UserControls/ParameterNodeTreeViewControl.xaml

@@ -152,9 +152,8 @@
                 <HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
                     <StackPanel Orientation="Horizontal">
                         <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay, Delay=10}"  MinWidth="100">
-                            <TextBlock Text="{Binding DisplayName}"  Margin="5,10,0,5" TextWrapping="Wrap" Width="200"/>
+                            <TextBlock Text="{Binding DisplayName}"  Margin="5,10,0,5" MinWidth="200"/>
                             <CheckBox.Resources>
-
                                 <Style x:Key="FocusVisual">
                                     <Setter Property="Control.Template">
                                         <Setter.Value>

+ 7 - 0
FrameworkLocal/UIClient/UIClient.csproj

@@ -443,6 +443,9 @@
     <Compile Include="ClientBase\UserControls\CirclePointRingLoading.cs" />
     <Compile Include="ClientBase\UserControls\DataViewChart.xaml.cs" />
     <Compile Include="ClientBase\UserControls\DataViewDataGrid.xaml.cs" />
+    <Compile Include="ClientBase\UserControls\FourArrowButton.xaml.cs">
+      <DependentUpon>FourArrowButton.xaml</DependentUpon>
+    </Compile>
     <Compile Include="ClientBase\UserControls\ParameterNodeTreeViewControl.xaml.cs" />
     <Compile Include="ClientBase\WaferMoveManager.cs" />
     <Compile Include="ClientBase\ModuleDataMonitor.cs" />
@@ -1239,6 +1242,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="ClientBase\UserControls\FourArrowButton.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="ClientBase\UserControls\ParameterNodeTreeViewControl.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 24 - 24
Furnace/FurnaceRT/Config/DisplayReplace.xml

@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <Displays>
 	<HistoryGroup name="ProcessHistory" display="Process History">
-		<Display Name="PM1.APC.PressureSetPoint" DisplayName="Pressure.Pressure Set" />
-		<Display Name="PM1.APC.Pressure1Feedback" DisplayName="Pressure.APC Sensor1" />
-		<Display Name="PM1.APC.Pressure2Feedback" DisplayName="Pressure.APC Sensor2" />
-		<Display Name="PM1.VG11.Value" DisplayName="Pressure.VG11 Actual" />
-		<Display Name="PM1.VG12.Value" DisplayName="Pressure.VG12 Actual" />
-		<Display Name="PM1.VG13.Value" DisplayName="Pressure.VG13 Actual" />
-		<Display Name="PM1.VG21.Value" DisplayName="Pressure.VG21 Actual" />
-		<Display Name="PM1.VG22.Value" DisplayName="Pressure.VG22 Actual" />
-		<Display Name="PM1.APC.ModeFeedback" DisplayName="Pressure.Mode Actual" />
-		<Display Name="PM1.APC.SlowRateSetPoint" DisplayName="Pressure.Slow Rate Set" />
-		<Display Name="PM1.APC.PositionSetPoint" DisplayName="Pressure.Valve Angle Set" />
-		<Display Name="PM1.APC.PositionFeedback" DisplayName="Pressure.Valve Angle Actual" />
+		<Display Name="PM1.APC.PressureSetPoint" DisplayName="Pressure.Pressure.Set" />
+		<Display Name="PM1.APC.Pressure1Feedback" DisplayName="Pressure.APC.Sensor1" />
+		<Display Name="PM1.APC.Pressure2Feedback" DisplayName="Pressure.APC.Sensor2" />
+		<Display Name="PM1.VG11.Value" DisplayName="Pressure.VG11.Actual" />
+		<Display Name="PM1.VG12.Value" DisplayName="Pressure.VG12.Actual" />
+		<Display Name="PM1.VG13.Value" DisplayName="Pressure.VG13.Actual" />
+		<Display Name="PM1.VG21.Value" DisplayName="Pressure.VG21.Actual" />
+		<Display Name="PM1.VG22.Value" DisplayName="Pressure.VG22.Actual" />
+		<Display Name="PM1.APC.ModeFeedback" DisplayName="Pressure.Mode.Actual" />
+		<Display Name="PM1.APC.SlowRateSetPoint" DisplayName="Pressure.Slow Rate.Set" />
+		<Display Name="PM1.APC.PositionSetPoint" DisplayName="Pressure.Valve Angle.Set" />
+		<Display Name="PM1.APC.PositionFeedback" DisplayName="Pressure.Valve Angle.Actual" />
 		<Display Name="PM1.BoatElevatorServo.CurrentPosition" DisplayName="Boat.BoatElevator.Real" />
 		<Display Name="PM1.BoatElevatorServo.TargetPosition" DisplayName="Boat.BoatElevator.Target" />
 		<Display Name="PM1.BoatElevatorServo.CurrentSpeed" DisplayName="Boat.BoatElevator.Speed" />
@@ -461,18 +461,18 @@
 		<Display Name="System.HeaterL.HeaterControlModeSV" DisplayName="Heater.L.Heater Control Mode SV" />
 	</HistoryGroup>
 	<DetailGroup name="ProcessDetail" display="Process Detail">
-		<Display Name="PM1.APC.PressureSetPoint" DisplayName="Pressure.Pressure Set" />
-		<Display Name="PM1.APC.Pressure1Feedback" DisplayName="Pressure.APC Sensor1" />
-		<Display Name="PM1.APC.Pressure2Feedback" DisplayName="Pressure.APC Sensor2" />
-		<Display Name="PM1.VG11.Value" DisplayName="Pressure.VG11 Actual" />
-		<Display Name="PM1.VG12.Value" DisplayName="Pressure.VG12 Actual" />
-		<Display Name="PM1.VG13.Value" DisplayName="Pressure.VG13 Actual" />
-		<Display Name="PM1.VG21.Value" DisplayName="Pressure.VG21 Actual" />
-		<Display Name="PM1.VG22.Value" DisplayName="Pressure.VG22 Actual" />
-		<Display Name="PM1.APC.ModeFeedback" DisplayName="Pressure.Mode Actual" />
-		<Display Name="PM1.APC.SlowRateSetPoint" DisplayName="Pressure.Slow Rate Set" />
-		<Display Name="PM1.APC.PositionSetPoint" DisplayName="Pressure.Valve Angle Set" />
-		<Display Name="PM1.APC.PositionFeedback" DisplayName="Pressure.Valve Angle Actual" />
+		<Display Name="PM1.APC.PressureSetPoint" DisplayName="Pressure.Pressure.Set" />
+		<Display Name="PM1.APC.Pressure1Feedback" DisplayName="Pressure.APC.Sensor1" />
+		<Display Name="PM1.APC.Pressure2Feedback" DisplayName="Pressure.APC.Sensor2" />
+		<Display Name="PM1.VG11.Value" DisplayName="Pressure.VG11.Actual" />
+		<Display Name="PM1.VG12.Value" DisplayName="Pressure.VG12.Actual" />
+		<Display Name="PM1.VG13.Value" DisplayName="Pressure.VG13.Actual" />
+		<Display Name="PM1.VG21.Value" DisplayName="Pressure.VG21.Actual" />
+		<Display Name="PM1.VG22.Value" DisplayName="Pressure.VG22.Actual" />
+		<Display Name="PM1.APC.ModeFeedback" DisplayName="Pressure.Mode.Actual" />
+		<Display Name="PM1.APC.SlowRateSetPoint" DisplayName="Pressure.Slow Rate.Set" />
+		<Display Name="PM1.APC.PositionSetPoint" DisplayName="Pressure.Valve Angle.Set" />
+		<Display Name="PM1.APC.PositionFeedback" DisplayName="Pressure.Valve Angle.Actual" />
 		<Display Name="PM1.BoatElevatorServo.CurrentPosition" DisplayName="Boat.BoatElevator.Real" />
 		<Display Name="PM1.BoatElevatorServo.TargetPosition" DisplayName="Boat.BoatElevator.Target" />
 		<Display Name="PM1.BoatElevatorServo.CurrentSpeed" DisplayName="Boat.BoatElevator.Speed" />