Zixuan 1 week ago
parent
commit
4dd86366a1

+ 9 - 4
Analizer/ProximaAnalizer/Data/DB.cs

@@ -1,7 +1,4 @@
-using System.ComponentModel.DataAnnotations;
-using System.Reflection.Metadata.Ecma335;
-
-namespace ProximaAnalizer.Data;
+namespace ProximaAnalizer.Data;
 
 
 public class ProcessData
@@ -60,4 +57,12 @@ public class RecipeStepData
     public string? Sub_Recipe_Loop_Info { get; set; }
     public string? Temp_correction { get; set; }
     public string? Temp_pid { get; set; }
+}
+
+public class EventData
+{
+    public string? Level { get; set; }
+    public string? Description { get; set; }
+    public DateTime Occur_Time { get; set; }
+    public string? Source { get; set; }
 }

+ 88 - 24
Analizer/ProximaAnalizer/ViewModels/DBInfoTraceViewModel.cs

@@ -1,16 +1,11 @@
 using Mapster;
-using Prism.Dialogs;
 using ScottPlot;
-using ScottPlot.Colormaps;
 using ScottPlot.Plottables;
 using ScottPlot.WPF;
 using SqlSugar;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows;
 using System.Windows.Media;
 using Universal;
-using static Dm.FldrStatement;
 
 namespace ProximaAnalizer.ViewModels;
 
@@ -34,13 +29,16 @@ internal partial class DBInfoTraceViewModel : ObservableObject
         this.PlotControl.Plot.Grid.XAxisStyle.MajorLineStyle.Width = 1f;
         this.PlotControl.Plot.Grid.YAxisStyle.MajorLineStyle.Width = 1f;
         this.PlotControl.Plot.Axes.Bottom.TickLabelStyle.Alignment = Alignment.MiddleLeft;
+        this.PlotControl.Plot.Axes.DateTimeTicksBottom();
+        this.PlotControl.Background = (Brush)App.Current.Resources.FindName("BackgroundColor");
         this.PlotControl.Plot.RenderManager.RenderStarting += (s, e) =>
         {
             Tick[] ticks = this.PlotControl.Plot.Axes.Bottom.TickGenerator.Ticks;
             for (int i = 0; i < ticks.Length; i++)
             {
                 DateTime dt = DateTime.FromOADate(ticks[i].Position);
-                string label = $"{dt:MM-dd  HH:mm:ss}";
+                //string label = $"{dt:MM-dd  HH:mm:ss}";
+                string label = $"{dt:HH:mm:ss}";
                 ticks[i] = new Tick(ticks[i].Position, label);
             }
         };
@@ -48,9 +46,10 @@ internal partial class DBInfoTraceViewModel : ObservableObject
         this.PlotControl.Plot.FigureBackground.Color = ScottPlot.Colors.Transparent;
         this.PlotControl.Plot.Axes.Bottom.TickLabelStyle.Rotation = 90;
         this.PlotControl.Plot.Axes.Bottom.TickLabelStyle.Alignment = Alignment.MiddleLeft;
-        //PixelPadding padding = new(40, 20, 65, 10);
-        //this.PlotControl.Plot.Layout.Fixed(padding);
+        PixelPadding padding = new(48, 48, 56, 40);
+        this.PlotControl.Plot.Layout.Fixed(padding);
         this.PlotControl.Plot.FigureBackground.Color = ScottPlot.Colors.Transparent;
+
         //UpdateDetail();
     }
 
@@ -471,6 +470,10 @@ internal partial class DBInfoTraceViewModel : ObservableObject
         var f = sqlSugarCustom.Client.Queryable<dynamic>().AS($"\"{start:yyyyMMdd}.PM1\"").Where(whereFunc).ToList();
         var system = sqlSugarCustom.Client.Queryable<dynamic>().AS($"\"{start:yyyyMMdd}.System\"").Where(whereFunc).ToList();
 
+        var alarmwhereFunc = ObjectFuncModel.Create("Format", "time", ">", "{long}:" + $"{start.Ticks}", "&&", "time", "<", "{long}:" + $"{end.Ticks}");
+        var alarm = sqlSugarCustom.Client.Queryable<EventData>().AS($"event_data").Where(t => t.Occur_Time >= start && t.Occur_Time <= end && (t.Level == "Alarm" || t.Level == "Warning")).ToList();
+
+
         f.AddRange(system);
 
         Dictionary<string, List<float>> cacheLeft = [];
@@ -485,28 +488,28 @@ internal partial class DBInfoTraceViewModel : ObservableObject
 
             foreach (string key in Left.Keys)
             {
-                if (data.TryGetValue(key, out object? value) && value is not null)
+                if (!data.TryGetValue(key, out object? value) || value is null)
+                    continue;
+
+                if (!cacheLeft.TryGetValue(key, out List<float>? collections) || collections is null)
                 {
-                    if (!cacheLeft.TryGetValue(key, out List<float>? collections) || collections is null)
-                    {
-                        collections = [];
-                        cacheLeft[key] = collections;
-                    }
-                    collections.Add((float)value);
+                    collections = [];
+                    cacheLeft[key] = collections;
                 }
+                collections.Add((float)value);
             }
 
             foreach (string key in Right.Keys)
             {
-                if (data.TryGetValue(key, out object? value) && value is not null)
+                if (!data.TryGetValue(key, out object? value) || value is null)
+                    continue;
+
+                if (!cacheRight.TryGetValue(key, out List<float>? collections) || collections is null)
                 {
-                    if (!cacheRight.TryGetValue(key, out List<float>? collections) || collections is null)
-                    {
-                        collections = [];
-                        cacheRight[key] = collections;
-                    }
-                    collections.Add((float)value);
+                    collections = [];
+                    cacheRight[key] = collections;
                 }
+                collections.Add((float)value);
             }
 
         }
@@ -519,9 +522,26 @@ internal partial class DBInfoTraceViewModel : ObservableObject
         foreach (var item in cacheRight)
             this.SetRightLine(time, item.Value, ((LineType)Right[item.Key])!.LinePattern, MarkerStyle.None, 2f, ((LineType)Right[item.Key])!.HexRGB);
 
-        this.PlotControl.Plot.Axes.Bottom.TickLabelStyle.OffsetY= 0;
-        //this.PlotControl.Plot.
+        foreach (var item in alarm)
+        {
+            switch (item.Level)
+            {
+                case "Alarm":
+                    this.SetAlarmLine(item.Occur_Time, $"{item.Source}");
+                    break;
+
+                case "Warning":
+                    this.SetWarningLine(item.Occur_Time, $"{item.Source}");
+                    break;
+                default:
+                    break;
+            }
+        }
+        this.PlotControl.Plot.Axes.Bottom.TickLabelStyle.OffsetY = 0;
         this.PlotControl.Plot.Axes.AutoScale();
+        this.PlotControl.Plot.Axes.Zoom(1.085, 1);
+        this.PlotControl.Background = (Brush)App.Current.Resources.FindName("BackgroundColor");
+
         PlotControl.Refresh();
 
     }
@@ -545,6 +565,50 @@ internal partial class DBInfoTraceViewModel : ObservableObject
         mainScatter.Color = new ScottPlot.Color(color);
         mainScatter.Axes.YAxis = this.PlotControl.Plot.Axes.Right;
     }
+
+    private void SetAlarmLine(DateTime dateTime, string text)
+    {
+        var line = this.PlotControl.Plot.Add.VerticalLine(dateTime.ToOADate());
+        line.Color = new ScottPlot.Color("DC143C");
+        line.Text = text;
+        line.LineWidth = 0.4f;
+        line.LabelOppositeAxis = true;
+    }
+
+    private void SetWarningLine(DateTime dateTime, string text)
+    {
+        var line = this.PlotControl.Plot.Add.VerticalLine(dateTime.ToOADate());
+        line.Color = new ScottPlot.Color("FFA500");
+        line.LineWidth = 0.4f;
+        line.Text = text;
+        line.LabelOppositeAxis = true;
+    }
+
+    [RelayCommand]
+    private void ReScale(string para)
+    {
+        switch (para)
+        {
+            case "+":
+                this.PlotControl.Plot.Axes.Zoom(1.25, 1);
+                break;
+            case "-":
+                this.PlotControl.Plot.Axes.Zoom(0.8, 1);
+                break;
+            case "add":
+                this.PlotControl.Plot.Axes.Zoom(1, 1.25);
+                break;
+            case "minus":
+                this.PlotControl.Plot.Axes.Zoom(1, 0.8);
+                break;
+
+            default:
+                this.PlotControl.Plot.Axes.AutoScale();
+                this.PlotControl.Plot.Axes.Zoom(1.085, 1);
+                break;
+        }
+        this.PlotControl.Refresh();
+    }
 }
 
 

+ 33 - 26
Analizer/ProximaAnalizer/Views/DBInfoTrace.xaml

@@ -11,11 +11,9 @@
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
-        <ResourceDictionary Source="/UICommon;component/Resources.xaml">
-
-        </ResourceDictionary>
+        <ResourceDictionary Source="/UICommon;component/Resources.xaml"/>
     </UserControl.Resources>
-    <Grid >
+    <Grid Margin="8">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="auto"/>
             <ColumnDefinition Width="2"/>
@@ -27,26 +25,26 @@
             <RowDefinition Height="180"/>
         </Grid.RowDefinitions>
 
-        <Expander ExpandDirection="Right" IsExpanded="True" Margin="0,6" Padding="0,-2" TextElement.FontSize="14">
+        <Expander ExpandDirection="Right"  IsExpanded="True" Margin="0,6" Padding="0,-2" TextElement.FontSize="14">
             <Expander.Header>
-                <TextBlock Text="Data Selector" HorizontalAlignment="Center" Margin="4">
+                <TextBlock Text="数据编辑" HorizontalAlignment="Center" Margin="4">
                     <TextBlock.LayoutTransform>
                         <RotateTransform Angle="-90"/>
                     </TextBlock.LayoutTransform>
                 </TextBlock>
             </Expander.Header>
-            <Grid Background="White">
+            <Grid>
                 <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="auto"/>
                     <ColumnDefinition Width="4"/>
                     <ColumnDefinition Width="auto"/>
                 </Grid.ColumnDefinitions>
-                <GroupBox Header="时间范围" Margin="4,0" MinWidth="240">
-                    <ScrollViewer>
+                <GroupBox Header="时间范围" Margin="4,0" MinWidth="240" BorderBrush="{StaticResource DarkBorderColor}">
+                    <ScrollViewer >
                         <ItemsControl ItemsSource="{Binding RecipeSteps}" Margin="4">
                             <ItemsControl.ItemTemplate>
                                 <DataTemplate>
-                                    <CheckBox Margin="0,2" VerticalAlignment="Center"  IsChecked="{Binding Value.IsSelected, Mode=TwoWay}">
+                                    <CheckBox Margin="0,1" VerticalAlignment="Center" Style="{StaticResource StepCheckBox}" IsChecked="{Binding Value.IsSelected, Mode=TwoWay}">
                                         <i:Interaction.Triggers>
                                             <i:EventTrigger EventName="Checked">
                                                 <prism:InvokeCommandAction  Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DBInfoTrace}, 
@@ -83,21 +81,22 @@
                     </ScrollViewer>
                 </GroupBox>
 
-                <GroupBox Grid.Column="2" Margin="4,0" Header="数据选择" MinWidth="240">
+                <GroupBox Grid.Column="2" Margin="4,0" Header="数据选择" MinWidth="240" BorderBrush="{StaticResource DarkBorderColor}">
                     <Grid>
                         <Grid.RowDefinitions>
                             <RowDefinition Height="auto"/>
                             <RowDefinition Height="4"/>
                             <RowDefinition Height="*"/>
+
                         </Grid.RowDefinitions>
-                        <Button Grid.Row="0" Command="{Binding ReturnCommand}" Margin="4">返回上级</Button>
+                        <Button Grid.Row="0" Style="{StaticResource FunctionButton}" Command="{Binding ReturnCommand}" Margin="4">返回上级</Button>
                         <ScrollViewer Grid.Row="2">
                             <ItemsControl ItemsSource="{Binding Hierachy}">
                                 <ItemsControl.ItemTemplate>
                                     <DataTemplate>
                                         <Button Content="{Binding Key}" VerticalContentAlignment="Center" HorizontalContentAlignment="Left"
                                             Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DBInfoTrace}, Path=DataContext.SelectHierachyCommand}"
-                                            CommandParameter="{Binding}" Margin="4" Padding="8,2"></Button>
+                                            CommandParameter="{Binding}" Margin="4" Padding="8,2" Background="Transparent"></Button>
                                         <!--<TextBlock Text="{Binding Key}"></TextBlock>-->
                                     </DataTemplate>
                                 </ItemsControl.ItemTemplate>
@@ -119,15 +118,23 @@
                     <RowDefinition Height="0"/>
                 </Grid.RowDefinitions>
                 <ContentControl Content="{Binding PlotControl, Mode=OneTime}" />
-                
+
                 <WrapPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" >
-                    <Button Width="120" Height="24" Margin="4" Command="{Binding GeneratePlotCommand}">绘制图标</Button>
-                    <Button Width="120" Height="24" Margin="4">查看数据</Button>
-                    <Button Width="120" Height="24" Margin="4">重置缩放</Button>
-                    <Button Width="120" Height="24" Margin="4">横坐标 放大</Button>
-                    <Button Width="120" Height="24" Margin="4">横坐标 缩小</Button>
-                    <Button Width="120" Height="24" Margin="4">纵坐标 放大</Button>
-                    <Button Width="120" Height="24" Margin="4">纵坐标 缩小</Button>
+                    <StackPanel Orientation="Horizontal" Margin="12,0">
+                        <Button Width="120" Height="24"  Style="{StaticResource FunctionButton}" Command="{Binding GeneratePlotCommand}">绘制图标</Button>
+                        <Button Width="120" Height="24" Margin="4" Style="{StaticResource FunctionButton}" >查看数据</Button>
+                    </StackPanel>
+
+                    <StackPanel Orientation="Horizontal" Margin="12,0">
+                        <Button Width="120" Height="24"  Style="{StaticResource FunctionButton}" Command="{Binding ReScaleCommand}" CommandParameter="+">横坐标 放大</Button>
+                        <Button Width="120" Height="24" Margin="4" Style="{StaticResource FunctionButton}" Command="{Binding ReScaleCommand}" CommandParameter="-">横坐标 缩小</Button>
+                    </StackPanel>
+
+                    <StackPanel Orientation="Horizontal" Margin="12,0">
+                        <Button Width="120" Height="24"  Style="{StaticResource FunctionButton}" Command="{Binding ReScaleCommand}" CommandParameter="add">纵坐标 放大</Button>
+                        <Button Width="120" Height="24" Margin="4" Style="{StaticResource FunctionButton}" Command="{Binding ReScaleCommand}" CommandParameter="minus">纵坐标 缩小</Button>
+                    </StackPanel>
+                    <Button Width="120" Height="24" Margin="12,0" Style="{StaticResource FunctionButton}" Command="{Binding ReScaleCommand}" CommandParameter="">重置缩放</Button>
                 </WrapPanel>
 
             </Grid>
@@ -135,7 +142,7 @@
         <Grid Grid.Row="2" Grid.ColumnSpan="3" Margin="2,0,6,2">
             <Grid.ColumnDefinitions>
                 <ColumnDefinition/>
-                <ColumnDefinition Width="12"/>
+                <ColumnDefinition Width="16"/>
                 <ColumnDefinition/>
             </Grid.ColumnDefinitions>
             <Grid >
@@ -146,7 +153,7 @@
 
                 </Grid.RowDefinitions>
                 <TextBlock VerticalAlignment="Center">左侧坐标轴</TextBlock>
-                <Button HorizontalAlignment="Right" Width="80" Command="{Binding ClearCommand}" CommandParameter="L">清除</Button>
+                <Button HorizontalAlignment="Right" Width="80" Style="{StaticResource FunctionButton}" Command="{Binding ClearCommand}" CommandParameter="L">清除</Button>
                 <Border Grid.Row="2" BorderBrush="{StaticResource DarkBorderColor}" BorderThickness="1">
                     <ScrollViewer >
                         <ItemsControl ItemsSource="{Binding Left}">
@@ -166,7 +173,7 @@
                                                  CommandParameter="{Binding}">
                                             <Line X1="0" Y1="0" X2="100" Y2="0" Stretch="Fill" Stroke="{Binding Value.Brush}" StrokeDashArray="{Binding Value.DashArray}" StrokeThickness="3"/>
                                         </Button>
-                                        <Button Grid.Column="4" Background="Transparent"
+                                        <Button Grid.Column="4" Style="{StaticResource FunctionButton}"
                                                 Command="{Binding RelativeSource={RelativeSource AncestorType=local:DBInfoTrace, Mode=FindAncestor}, 
                                                         Path=DataContext.RemoveLeftCommand}"
                                                 CommandParameter="{Binding Key}">移除</Button>
@@ -184,7 +191,7 @@
                     <RowDefinition/>
                 </Grid.RowDefinitions>
                 <TextBlock VerticalAlignment="Center">右侧坐标轴</TextBlock>
-                <Button HorizontalAlignment="Right" Width="80" Command="{Binding ClearCommand}" CommandParameter="R">清除</Button>
+                <Button HorizontalAlignment="Right" Width="80" Style="{StaticResource FunctionButton}" Command="{Binding ClearCommand}" CommandParameter="R">清除</Button>
                 <Border Grid.Row="2" BorderBrush="{StaticResource DarkBorderColor}" BorderThickness="1">
                     <ScrollViewer>
                         <ItemsControl ItemsSource="{Binding Right}">
@@ -204,7 +211,7 @@
                                                         CommandParameter="{Binding}">
                                             <Line X1="0" Y1="0" X2="100" Y2="0" Stretch="Fill" Stroke="{Binding Value.Brush}" StrokeDashArray="{Binding Value.DashArray}" StrokeThickness="3"/>
                                         </Button>
-                                        <Button Grid.Column="4" Background="Transparent"
+                                        <Button Grid.Column="4" Style="{StaticResource FunctionButton}"
                                               Command="{Binding RelativeSource={RelativeSource AncestorType=local:DBInfoTrace, Mode=FindAncestor}, 
                                                       Path=DataContext.RemoveRightCommand}"
                                               CommandParameter="{Binding Key}">移除</Button>

+ 1 - 1
Analizer/ProximaAnalizer/Views/MainWindow.xaml

@@ -10,6 +10,6 @@
         mc:Ignorable="d"
         Width="800"
         Height="240"
-        Title="MainWindow">
+        Title="Proxima Data Analizer">
 
 </Window>

+ 101 - 100
Analizer/ProximaAnalizer/Views/RecipeStepNavi.xaml

@@ -12,125 +12,126 @@
     <UserControl.Resources>
         <ResourceDictionary Source="/UICommon;component/Resources.xaml"/>
     </UserControl.Resources>
-    <Grid Margin="8">
-        <Grid.RowDefinitions>
-            <RowDefinition Height="auto"/>
-            <RowDefinition Height="8"/>
-            <RowDefinition/>
-        </Grid.RowDefinitions>
-        <Grid Panel.ZIndex="1" Grid.RowSpan="3" Background="#90ffffff" Visibility="{Binding Masking}">
+    <Grid Background="{StaticResource BackgroundColor}">
+        <Grid Margin="8">
             <Grid.RowDefinitions>
                 <RowDefinition Height="auto"/>
                 <RowDefinition Height="8"/>
                 <RowDefinition/>
             </Grid.RowDefinitions>
-            <StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center">
-                <Image Source="{StaticResource Icon_Search}" Width="200"></Image>
-                <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20">查询中...</TextBlock>
-            </StackPanel>
-        </Grid>
-        <Grid>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="auto"/>
-                <ColumnDefinition Width="12"/>
-                <ColumnDefinition Width="auto"/>
-                <ColumnDefinition Width="12"/>
-                <ColumnDefinition Width="auto"/>
-            </Grid.ColumnDefinitions>
-            <GroupBox Header="根据日期查询" HorizontalAlignment="Left" VerticalAlignment="Center">
-                <StackPanel Orientation="Horizontal">
-                    <DatePicker Width="160" Margin="8" VerticalAlignment="Center" HorizontalAlignment="Center" SelectedDate="{Binding SelectedTime}"/>
-                    <Button Margin="4" Width="28" Height="24" Command="{Binding DayOperatorCommand}" CommandParameter="-">-</Button>
-                    <Button Margin="4" Width="28" Height="24" Command="{Binding DayOperatorCommand}" CommandParameter="+">+</Button>
+            <Grid Panel.ZIndex="1" Grid.RowSpan="3" Background="#90ffffff" Visibility="{Binding Masking}">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="auto"/>
+                    <RowDefinition Height="8"/>
+                    <RowDefinition/>
+                </Grid.RowDefinitions>
+                <StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center">
+                    <Image Source="{StaticResource Icon_Search}" Width="200"></Image>
+                    <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20">查询中...</TextBlock>
                 </StackPanel>
-            </GroupBox>
+            </Grid>
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="auto"/>
+                    <ColumnDefinition Width="12"/>
+                    <ColumnDefinition Width="auto"/>
+                    <ColumnDefinition Width="12"/>
+                    <ColumnDefinition Width="auto"/>
+                </Grid.ColumnDefinitions>
+                <GroupBox Header="根据日期查询" HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="{StaticResource DarkBorderColor}">
+                    <StackPanel Orientation="Horizontal">
+                        <DatePicker Width="160" Margin="8" VerticalAlignment="Center" HorizontalAlignment="Center" SelectedDate="{Binding SelectedTime}"/>
+                        <Button Margin="4" Height="24" Style="{StaticResource FunctionButton}" Command="{Binding DayOperatorCommand}" CommandParameter="-">-</Button>
+                        <Button Margin="4" Height="24" Style="{StaticResource FunctionButton}" Command="{Binding DayOperatorCommand}" CommandParameter="+">+</Button>
+                    </StackPanel>
+                </GroupBox>
 
-            <TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">或</TextBlock>
+                <TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">或</TextBlock>
 
-            <GroupBox Grid.Column="4" Header="根据名称查询" HorizontalAlignment="Left" VerticalAlignment="Center">
-                <StackPanel Orientation="Horizontal" >
-                    <TextBox x:Name="NameBox" Width="140" Height="24" Margin="8" VerticalContentAlignment="Center" Padding="4,0"></TextBox>
-                    <Button Margin="8" Width="60" Height="24"
+                <GroupBox Grid.Column="4" Header="根据名称查询" HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="{StaticResource DarkBorderColor}">
+                    <StackPanel Orientation="Horizontal" >
+                        <TextBox x:Name="NameBox" Width="140" Height="24" Margin="8" VerticalContentAlignment="Center" Padding="4,0"></TextBox>
+                        <Button Margin="8" Width="60" Height="24" Style="{StaticResource FunctionButton}"
                             Command="{Binding NameSearchCommand}"
                             CommandParameter="{Binding ElementName=NameBox, Path=Text}">查询</Button>
-                </StackPanel>
-            </GroupBox>
-        </Grid>
-
-        <GroupBox Grid.Row="2" Header="工艺历史记录">
+                    </StackPanel>
+                </GroupBox>
+            </Grid>
 
-            <Grid Margin="8">
-                <Grid.RowDefinitions>
-                    <RowDefinition/>
-                    <RowDefinition Height="8"/>
-                    <RowDefinition Height="auto"/>
-                </Grid.RowDefinitions>
-                <ScrollViewer>
-                    <ItemsControl ItemsSource="{Binding ProcessData}" TextElement.FontSize="14">
-                        <ItemsControl.ItemTemplate>
-                            <DataTemplate>
-                                <Border Margin="4" BorderBrush="Black" BorderThickness="0.5">
-                                    <Grid>
-                                        <Grid.ColumnDefinitions>
-                                            <ColumnDefinition Width="auto"/>
-                                            <ColumnDefinition Width="24"/>
-                                            <ColumnDefinition Width="*"/>
-                                            <ColumnDefinition Width="24"/>
-                                            <ColumnDefinition Width="auto" MinWidth="100"/>
-                                            <ColumnDefinition Width="24"/>
-                                            <ColumnDefinition Width="auto" MinWidth="100"/>
-                                            <ColumnDefinition Width="24"/>
-                                            <ColumnDefinition Width="auto"/>
-                                        </Grid.ColumnDefinitions>
-                                        <Grid.RowDefinitions>
-                                            <RowDefinition/>
-                                            <RowDefinition/>
-                                        </Grid.RowDefinitions>
+            <GroupBox Grid.Row="2" Header="工艺历史记录" BorderBrush="{StaticResource DarkBorderColor}">
+                <Grid Margin="8">
+                    <Grid.RowDefinitions>
+                        <RowDefinition/>
+                        <RowDefinition Height="8"/>
+                        <RowDefinition Height="auto"/>
+                    </Grid.RowDefinitions>
+                    <ScrollViewer>
+                        <ItemsControl ItemsSource="{Binding ProcessData}" TextElement.FontSize="14">
+                            <ItemsControl.ItemTemplate>
+                                <DataTemplate>
+                                    <Border Margin="4" BorderBrush="Black" BorderThickness="0.5">
+                                        <Grid>
+                                            <Grid.ColumnDefinitions>
+                                                <ColumnDefinition Width="auto"/>
+                                                <ColumnDefinition Width="24"/>
+                                                <ColumnDefinition Width="*"/>
+                                                <ColumnDefinition Width="24"/>
+                                                <ColumnDefinition Width="auto" MinWidth="100"/>
+                                                <ColumnDefinition Width="24"/>
+                                                <ColumnDefinition Width="auto" MinWidth="100"/>
+                                                <ColumnDefinition Width="24"/>
+                                                <ColumnDefinition Width="auto"/>
+                                            </Grid.ColumnDefinitions>
+                                            <Grid.RowDefinitions>
+                                                <RowDefinition/>
+                                                <RowDefinition/>
+                                            </Grid.RowDefinitions>
 
-                                        <Border Background="{StaticResource LightNormalColor}">
-                                            <Grid Margin="4,2">
-                                                <Grid.ColumnDefinitions>
-                                                    <ColumnDefinition Width="60"/>
-                                                    <ColumnDefinition Width="4"/>
-                                                    <ColumnDefinition/>
-                                                </Grid.ColumnDefinitions>
-                                                <TextBlock VerticalAlignment="Center">开始时间</TextBlock>
-                                                <TextBlock Grid.Column="2" Text="{Binding Process_Begin_Time, StringFormat=yyyy-MM-dd HH:mm:ss}"/>
-                                            </Grid>
-                                        </Border>
+                                            <Border Background="{StaticResource LightNormalColor}">
+                                                <Grid Margin="4,2">
+                                                    <Grid.ColumnDefinitions>
+                                                        <ColumnDefinition Width="60"/>
+                                                        <ColumnDefinition Width="4"/>
+                                                        <ColumnDefinition/>
+                                                    </Grid.ColumnDefinitions>
+                                                    <TextBlock VerticalAlignment="Center">开始时间</TextBlock>
+                                                    <TextBlock Grid.Column="2" Text="{Binding Process_Begin_Time, StringFormat=yyyy-MM-dd HH:mm:ss}"/>
+                                                </Grid>
+                                            </Border>
 
-                                        <Border Grid.Row="1" Background="{StaticResource LightWarningColor}">
-                                            <Grid Margin="4,2">
-                                                <Grid.ColumnDefinitions>
-                                                    <ColumnDefinition Width="60"/>
-                                                    <ColumnDefinition Width="4"/>
-                                                    <ColumnDefinition/>
-                                                </Grid.ColumnDefinitions>
-                                                <TextBlock VerticalAlignment="Center">结束时间</TextBlock>
-                                                <TextBlock Grid.Column="2" Text="{Binding Process_End_Time, StringFormat=yyyy-MM-dd HH:mm:ss}"/>
-                                            </Grid>
-                                        </Border>
+                                            <Border Grid.Row="1" Background="{StaticResource LightWarningColor}">
+                                                <Grid Margin="4,2">
+                                                    <Grid.ColumnDefinitions>
+                                                        <ColumnDefinition Width="60"/>
+                                                        <ColumnDefinition Width="4"/>
+                                                        <ColumnDefinition/>
+                                                    </Grid.ColumnDefinitions>
+                                                    <TextBlock VerticalAlignment="Center">结束时间</TextBlock>
+                                                    <TextBlock Grid.Column="2" Text="{Binding Process_End_Time, StringFormat=yyyy-MM-dd HH:mm:ss}"/>
+                                                </Grid>
+                                            </Border>
 
-                                        <!--<TextBlock Grid.Column="2" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">配方名称</TextBlock>-->
-                                        <TextBlock Grid.Column="2" Grid.RowSpan="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding Recipe_Name}"/>
+                                            <!--<TextBlock Grid.Column="2" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">配方名称</TextBlock>-->
+                                            <TextBlock Grid.Column="2" Grid.RowSpan="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding Recipe_Name}"/>
 
-                                        <TextBlock Grid.Column="4" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">配方种类</TextBlock>
-                                        <TextBlock Grid.Column="4" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Recipe_Type}"/>
+                                            <TextBlock Grid.Column="4" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">配方种类</TextBlock>
+                                            <TextBlock Grid.Column="4" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Recipe_Type}"/>
 
-                                        <TextBlock Grid.Column="6" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">执行状态</TextBlock>
-                                        <TextBlock Grid.Column="6" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Process_Status}"/>
+                                            <TextBlock Grid.Column="6" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">执行状态</TextBlock>
+                                            <TextBlock Grid.Column="6" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Process_Status}"/>
 
-                                        <Button Grid.Column="10" Grid.RowSpan="2" Margin="4" Width="80" Background="Transparent"
+                                            <Button Grid.Column="10" Grid.RowSpan="2" Margin="4" Width="80" Style="{StaticResource FunctionButton}"
                                         Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:RecipeStepNavi}, Path=DataContext.NaviCommand}"
                                         CommandParameter="{Binding}">查询数据</Button>
-                                    </Grid>
-                                </Border>
-                            </DataTemplate>
-                        </ItemsControl.ItemTemplate>
-                    </ItemsControl>
-                </ScrollViewer>
+                                        </Grid>
+                                    </Border>
+                                </DataTemplate>
+                            </ItemsControl.ItemTemplate>
+                        </ItemsControl>
+                    </ScrollViewer>
 
-            </Grid>
-        </GroupBox>
+                </Grid>
+            </GroupBox>
+        </Grid>
     </Grid>
 </UserControl>

+ 7 - 2
Analizer/ProximaAnalizer/Views/Summary.xaml

@@ -8,13 +8,18 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
-    <Grid>
+    <UserControl.Resources>
+        <ResourceDictionary Source="/UICommon;component/Resources.xaml">
+            
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid  Background="{StaticResource BackgroundColor}">
         <Grid.RowDefinitions>
             <RowDefinition Height="auto"/>
             <RowDefinition Height="0"/>
             <RowDefinition/>
         </Grid.RowDefinitions>
-        <Button Grid.Row="0" HorizontalAlignment="Left" Width="80" Height="24" Command="{Binding ReturnCommand}">返回</Button>
+        <Button Grid.Row="0" HorizontalAlignment="Left" Width="80" Height="24" Command="{Binding ReturnCommand}" Style="{StaticResource FunctionButton}">返回主页</Button>
         <!--<StackPanel Orientation="Horizontal">
             <Button Command="{Binding TestCommand}" CommandParameter="DBInfoTrace">Trace</Button>
             <Button Command="{Binding TestCommand}" CommandParameter="DBInfoAlarm">Alarm</Button>

+ 5 - 29
UICommon/Styles/CheckBoxStyle.xaml

@@ -249,40 +249,16 @@
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="CheckBox">
-                    <Border Background="{TemplateBinding Background}"  BorderThickness="{TemplateBinding BorderThickness}" Margin="{TemplateBinding Margin}" CornerRadius="0">
-
-                        <Grid >
-                            <ContentPresenter Panel.ZIndex="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" TextElement.Foreground="{StaticResource TextColor}" Margin="{TemplateBinding Margin}"/>
-                            <Border x:Name="_borderOver" Background="Transparent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Margin="0">
-
-                            </Border>
-                            <Border x:Name="_borderChecked" Visibility="Collapsed" Background="{StaticResource SubThemeColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="12" Height="12">
-                                <Path Data="M2,7 5,10 11,2" Margin="0 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="White" StrokeThickness="2"/>
-                            </Border>
-                        </Grid>
+                    <Border x:Name="_borderChecked"  Background="{TemplateBinding Background}"  BorderThickness="{TemplateBinding BorderThickness}" Margin="{TemplateBinding Margin}" CornerRadius="0">
+                        <ContentPresenter x:Name="_content" Panel.ZIndex="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" TextElement.Foreground="{StaticResource TextColor}" Margin="4,0"/>
                     </Border>
                     <ControlTemplate.Triggers>
-                        <Trigger Property="HasContent" Value="True">
-                            <Setter Property="FocusVisualStyle">
-                                <Setter.Value>
-                                    <Style>
-                                        <Setter Property="Control.Template">
-                                            <Setter.Value>
-                                                <ControlTemplate>
-                                                    <Rectangle Margin="14,0,0,0" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
-                                                </ControlTemplate>
-                                            </Setter.Value>
-                                        </Setter>
-                                    </Style>
-                                </Setter.Value>
-                            </Setter>
-
-                        </Trigger>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="BorderBrush" TargetName="_borderOver" Value="White"/>
+                            <Setter Property="BorderBrush" TargetName="_borderChecked" Value="{StaticResource ThemeColor}"/>
                         </Trigger>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter Property="Visibility" TargetName="_borderChecked" Value="Visible"/>
+                            <Setter Property="Background" TargetName="_borderChecked" Value="{StaticResource SubThemeColor}"/>
+                            <Setter Property="TextElement.Foreground" TargetName="_content" Value="White"/>
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 242 - 0
UICommon/Styles/OtherStyle.xaml

@@ -677,4 +677,246 @@
         </Setter>
     </Style>
 
+
+    <!-- ScrollViewer 滚动条 -->
+    <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
+        <Setter Property="OverridesDefaultStyle" Value="true"/>
+        <Setter Property="IsTabStop" Value="false"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type Thumb}">
+                    <Grid>
+                        <!--滚动条颜色-->
+                        <Border Background="{StaticResource SubThemeColor}" CornerRadius="3"/>
+                    </Grid>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
+        <Setter Property="OverridesDefaultStyle" Value="true"/>
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="Focusable" Value="false"/>
+        <Setter Property="IsTabStop" Value="false"/>
+        <Setter Property="Opacity" Value="0.2"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RepeatButton}">
+                    <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
+        <Setter Property="OverridesDefaultStyle" Value="true"/>
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="Focusable" Value="false"/>
+        <Setter Property="IsTabStop" Value="false"/>
+        <Setter Property="Opacity" Value="0.2"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RepeatButton}">
+                    <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <!--滚动条上下按钮-->
+    <Style x:Key="VerticalScrollBarPageButton2" TargetType="{x:Type RepeatButton}">
+        <Setter Property="OverridesDefaultStyle"  Value="true"/>
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="Focusable" Value="false"/>
+        <Setter Property="IsTabStop" Value="false"/>
+        <Setter Property="Opacity"  Value="0"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RepeatButton}">
+                    <Rectangle Fill="{StaticResource SubThemeColor}" Width="0" Height="0"/>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    <Style x:Key="for_scrollbar" TargetType="{x:Type ScrollBar}">
+        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
+        <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="Margin" Value="0,1,1,6"/>
+        <Setter Property="Width"  Value="10"/>
+        <Setter Property="MinWidth"  Value="5"/>
+        <Setter Property="Opacity"   Value="0.2"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ScrollBar}">
+                    <Grid x:Name="Bg" SnapsToDevicePixels="true">
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="auto"></RowDefinition>
+                            <RowDefinition Height="*"></RowDefinition>
+                            <RowDefinition Height="auto"></RowDefinition>
+                        </Grid.RowDefinitions>
+                        <RepeatButton  Grid.Row="0" Style="{StaticResource VerticalScrollBarPageButton2}" Command="{x:Static ScrollBar.PageUpCommand}"/>
+                        <Track x:Name="PART_Track"   Grid.Row="1" IsEnabled="{TemplateBinding IsMouseOver}" IsDirectionReversed="true">
+                            <Track.DecreaseRepeatButton>
+                                <RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageUpCommand}"/>
+                            </Track.DecreaseRepeatButton>
+                            <Track.IncreaseRepeatButton>
+                                <RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageDownCommand}"/>
+                            </Track.IncreaseRepeatButton>
+                            <Track.Thumb>
+                                <Thumb Style="{StaticResource ScrollBarThumb}"/>
+                            </Track.Thumb>
+                        </Track>
+                        <RepeatButton Grid.Row="2" Style="{StaticResource VerticalScrollBarPageButton2}" Command="{x:Static ScrollBar.PageDownCommand}"/>
+                    </Grid>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <Trigger Property="Orientation" Value="Horizontal">
+                <Setter Property="Background"  Value="Transparent"/>
+                <Setter Property="Margin" Value="1,0,6,1"/>
+                <Setter Property="Height"   Value="5"/>
+                <Setter Property="MinHeight"  Value="5"/>
+                <Setter Property="Width"    Value="Auto"/>
+                <Setter Property="Opacity" Value="0.2"/>
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type ScrollBar}">
+                            <Grid x:Name="Bg" SnapsToDevicePixels="true">
+                                <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
+                                    <Track.DecreaseRepeatButton>
+                                        <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}"  Command="{x:Static ScrollBar.PageLeftCommand}"/>
+                                    </Track.DecreaseRepeatButton>
+                                    <Track.IncreaseRepeatButton>
+                                        <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}"  Command="{x:Static ScrollBar.PageRightCommand}"/>
+                                    </Track.IncreaseRepeatButton>
+                                    <Track.Thumb>
+                                        <Thumb Style="{StaticResource ScrollBarThumb}"/>
+                                    </Track.Thumb>
+                                </Track>
+                            </Grid>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Trigger>
+        </Style.Triggers>
+    </Style>
+    <Style x:Key="for_scrollviewer"
+           TargetType="{x:Type ScrollViewer}">
+        <Setter Property="BorderBrush" Value="{StaticResource SubThemeColor}"/>
+        <Setter Property="BorderThickness" Value="0"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ScrollViewer}">
+                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
+                        <Grid Background="{TemplateBinding Background}">
+                            <ScrollContentPresenter  Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
+                            <ScrollBar x:Name="PART_VerticalScrollBar"
+                                       HorizontalAlignment="Right"
+                                       Maximum="{TemplateBinding ScrollableHeight}"
+                                       Orientation="Vertical"
+                                       Style="{StaticResource for_scrollbar}"
+                                       ViewportSize="{TemplateBinding ViewportHeight}"
+                                       Value="{TemplateBinding VerticalOffset}"
+                                       Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
+                            <ScrollBar x:Name="PART_HorizontalScrollBar"
+                                       Maximum="{TemplateBinding ScrollableWidth}"
+                                       Orientation="Horizontal"
+                                       Style="{StaticResource for_scrollbar}"
+                                       VerticalAlignment="Bottom"
+                                       Value="{TemplateBinding HorizontalOffset}"
+                                       ViewportSize="{TemplateBinding ViewportWidth}"
+                                       Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
+                        </Grid>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <EventTrigger RoutedEvent="ScrollChanged" >
+                            <BeginStoryboard>
+                                <Storyboard>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_VerticalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.8"
+                                        Duration="0:0:1"/>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_VerticalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.2"
+                                        Duration="0:0:1"
+                                        BeginTime="0:0:1"/>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_HorizontalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.8"
+                                        Duration="0:0:1"/>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_HorizontalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.2"
+                                        Duration="0:0:1"
+                                        BeginTime="0:0:1"/>
+                                </Storyboard>
+                            </BeginStoryboard>
+                        </EventTrigger>
+                        <EventTrigger RoutedEvent="MouseEnter"
+                                      SourceName="PART_VerticalScrollBar">
+                            <BeginStoryboard>
+                                <Storyboard>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_VerticalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.8"
+                                        Duration="0:0:0.7"/>
+                                </Storyboard>
+                            </BeginStoryboard>
+                        </EventTrigger>
+                        <EventTrigger RoutedEvent="MouseLeave"
+                                      SourceName="PART_VerticalScrollBar">
+                            <BeginStoryboard>
+                                <Storyboard>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_VerticalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.2"
+                                        Duration="0:0:0.7"/>
+                                </Storyboard>
+                            </BeginStoryboard>
+                        </EventTrigger>
+                        <EventTrigger RoutedEvent="MouseEnter"
+                                      SourceName="PART_HorizontalScrollBar">
+                            <BeginStoryboard>
+                                <Storyboard>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_HorizontalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.8"
+                                        Duration="0:0:0.7"/>
+                                </Storyboard>
+                            </BeginStoryboard>
+                        </EventTrigger>
+                        <EventTrigger RoutedEvent="MouseLeave"
+                                      SourceName="PART_HorizontalScrollBar">
+                            <BeginStoryboard>
+                                <Storyboard>
+                                    <DoubleAnimation
+                                        Storyboard.TargetName="PART_HorizontalScrollBar"
+                                        Storyboard.TargetProperty="Opacity"
+                                        To="0.2"
+                                        Duration="0:0:0.7"/>
+                                </Storyboard>
+                            </BeginStoryboard>
+                        </EventTrigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <!--默认ScrollBar-->
+    <Style TargetType="ScrollBar" BasedOn="{StaticResource for_scrollbar}"/>
+
+    <!--默认ScrollView-->
+    <Style TargetType="ScrollViewer" BasedOn="{StaticResource for_scrollviewer}"/>
+    
+
 </ResourceDictionary>