Commit 9d1ee2ca authored by 冯伟球's avatar 冯伟球

适配分辨率1280*1024的界面

parent eaae9d79
......@@ -5,39 +5,71 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.HeatingHelper.UI.UIModule"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
mc:Ignorable="d" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" d:DesignHeight="450" d:DesignWidth="800">
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" d:DesignHeight="750" d:DesignWidth="1200">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:LockFramesConverter x:Key="lfc"/>
</ResourceDictionary>
</UserControl.Resources>
<Style TargetType="{x:Type Button}" >
<Setter Property="Background" Value="#cc119eda"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="SnapsToDevicePixels" Value="False"/>
<Setter Property="FontSize" Value="13" />
<Setter Property="Height" Value="33" />
<Setter Property="Width" Value="90" />
<Setter Property="Margin" Value="5,10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<!--<Grid.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="5"/>
<ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="#66119eda"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="#ff444444"/>
<Setter Property="Foreground" Value="#ffffffff" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextBlock" x:Key="textblock">
<Setter Property="FontSize" Value="25" />
<Setter Property="Margin" Value="3,10" />
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="FontSize" Value="12"/>
<Style TargetType="RadioButton">
<Setter Property="FontSize" Value="18" />
<Setter Property="Margin" Value="5,10" />
</Style>
</Grid.Resources>-->
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="4*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<local:UC_FramePicker x:Name="FP_select1" Grid.Column="0" Margin="3"/>
<local:UC_FramePicker x:Name="FP_select2" Grid.Column="1" Margin="3"/>
<Grid Grid.Row="1" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2">
<lvc:CartesianChart Series="{Binding VarSeries}" Margin="3"
......@@ -58,39 +90,44 @@
</lvc:CartesianChart>
</Border>
<!--<DockPanel Grid.Column="2">
<TextBlock Text="锁定设置:" Style="{StaticResource TextBlockStyle_FieldHeader}" HorizontalAlignment="Center" DockPanel.Dock="Top"/>
<DockPanel DockPanel.Dock="Left" LastChildFill="False" >
<DockPanel.Resources>
--><!--<Style x:Key="tb_style" TargetType="TextBlock">
<Setter Property="Background" Value="AntiqueWhite"/>
<Setter Property="FontSize" Value="16"/>
</Style>--><!--
</DockPanel.Resources>
<Grid DockPanel.Dock="Top" Margin="0,0,0,5">
<Border Grid.Column="2">
<DockPanel Margin="5">
<TextBlock Text="锁定设置:" HorizontalAlignment="Center" DockPanel.Dock="Top" Style="{StaticResource textblock}" Margin="5"/>
<Grid DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<RadioButton Content="锁定1幅" Grid.Column="0" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=1}"/>
<RadioButton Content="锁定2幅" Grid.Column="1" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=2}"/>
<RadioButton Content="无锁定" Grid.Column="2" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=0}"/>
<RadioButton Content="锁定1幅" Grid.Column="0" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=1}" />
<RadioButton Content="锁定2幅" Grid.Column="1" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=2}" />
<RadioButton Content="无锁定" Grid.Column="2" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=0}" />
<CheckBox IsChecked="{Binding LockAngle}" Content="锁定旋转角" Grid.Column="3" FontSize="14"/>
</Grid>
<DockPanel DockPanel.Dock="Left" LastChildFill="False" Margin="3" >
<Grid DockPanel.Dock="Top">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ProgressBar Value="{Binding SearchProgressValue}" Width="{Binding ElementName=searchBtn, Path=ActualWidth}"/>
<Button Content="搜索最大相关度" Click="AutoSearch_Shift" x:Name="searchBtn"
HorizontalAlignment="Center"
IsEnabled="{Binding SearchEnabled}"
Opacity="0.8" Style="{DynamicResource AccentedSquareButtonStyle}"/>
<Button Content="自动计算" Click="AutoCal_Shift" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1"/>
<ProgressBar Value="{Binding SearchProgressValue}" Width="{Binding ElementName=searchBtn, Path=ActualWidth}" Margin="{Binding ElementName=searchBtn, Path=Margin}"/>
<Button Click="AutoSearch_Shift" x:Name="searchBtn"
IsEnabled="{Binding SearchEnabled}" Width="160"
Opacity="0.8" >
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Magnify" VerticalAlignment="Center" Margin="0,2,6,0" />
<TextBlock Text="搜索最大相关度" HorizontalAlignment="Center" Margin="0,0,8,0" />
</StackPanel>
</Button>
<Button Click="AutoCal_Shift" Grid.Column="1" Width="105">
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconFontAwesome Kind="RobotSolid" VerticalAlignment="Center" Margin="5,0,5,0" />
<TextBlock Text="自动计算" HorizontalAlignment="Center" Margin="0,0,8,0" />
</StackPanel>
</Button>
</Grid>
</Grid>
<Grid DockPanel.Dock="Top">
<Grid.RowDefinitions>
......@@ -103,114 +140,34 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="偏转数:" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<TextBlock Text="{Binding AirRingShift}" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
<TextBlock Text="偏转数:" Style="{StaticResource textblock}" />
<TextBlock Text="{Binding AirRingShift}" Style="{StaticResource textblock}" />
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock Text="相关度:" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
<TextBlock Text="{Binding TandH_Corel, StringFormat={}{0:f3}}" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<TextBlock Text="相关度:" Style="{StaticResource textblock}" />
<TextBlock Text="{Binding TandH_Corel, StringFormat={}{0:f3}}" Style="{StaticResource textblock}" />
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Content="手动前" Margin="3,0,0,0" Click="AirRingShift_Add" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="0"/>
<Button Content="手动后" Margin="3,0,0,0" Click="AirRingShift_Sub" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1"/>
<Button Content="复位偏转数" Margin="3,0,0,0" Click="AirRingShift_Reset" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="2"/>
</Grid>
</Grid>
<Grid DockPanel.Dock="Top">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<Button Click="AirRingShift_Add" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="旋转角度:" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
<TextBlock Text="{Binding RotAngle,StringFormat={}{0:f1}}" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
<iconPacks:PackIconIonicons Kind="ArrowDropleftMD" Margin="0,0,5,0" VerticalAlignment="Center"/>
<TextBlock Text="手动前" Margin="0,0,5,0" />
</StackPanel>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Content="增加" Margin="3,0,0,0" Click="Angle_Add" Style="{DynamicResource AccentedSquareButtonStyle}" />
<Button Content="减少" Margin="3,0,0,0" Click="Angle_Sub" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1"/>
<Button Content="搜索旋转角度" Margin="3,0,0,0" Click="Search_Angle" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="2"/>
</Grid>
</Grid>
</DockPanel>
<Button Content="应用" DockPanel.Dock="Right" Style="{DynamicResource AccentedSquareButtonStyle}" Margin="10"/>
</DockPanel>-->
<Border Grid.Column="2">
<DockPanel Margin="5">
<TextBlock Text="锁定设置:" Style="{StaticResource TextBlockStyle_FieldHeader}" HorizontalAlignment="Center" DockPanel.Dock="Top" FontSize="25"/>
<DockPanel DockPanel.Dock="Top" LastChildFill="False" Margin="3" >
<DockPanel.Resources>
<!--<Style x:Key="tb_style" TargetType="TextBlock">
<Setter Property="Background" Value="AntiqueWhite"/>
<Setter Property="FontSize" Value="16"/>
</Style>-->
</DockPanel.Resources>
<Grid DockPanel.Dock="Top" Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<RadioButton Content="锁定1幅" Grid.Column="0" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=1}" Margin="5,0,0,0" FontSize="20"/>
<RadioButton Content="锁定2幅" Grid.Column="1" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=2}" Margin="5,0,0,0" FontSize="20"/>
<RadioButton Content="无锁定" Grid.Column="2" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=0}" Margin="5,0,0,0" FontSize="20"/>
<CheckBox IsChecked="{Binding LockAngle}" Content="锁定旋转角" Grid.Column="3" Margin="5,0,0,0" FontSize="20"/>
</Grid>
<Grid DockPanel.Dock="Top">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ProgressBar Value="{Binding SearchProgressValue}" Width="{Binding ElementName=searchBtn, Path=ActualWidth}" Margin="5"/>
<Button Content="搜索最大相关度" Click="AutoSearch_Shift" x:Name="searchBtn" Margin="5"
HorizontalAlignment="Center"
IsEnabled="{Binding SearchEnabled}" FontFamily="YouYuan"
Opacity="0.8" Style="{DynamicResource AccentedSquareButtonStyle}"/>
<Button Content="自动计算" Click="AutoCal_Shift" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1" Margin="5" FontFamily="YouYuan"/>
</Grid>
</Grid>
<Grid DockPanel.Dock="Top">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
</Button>
<Button Click="AirRingShift_Sub" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="偏转数:" Style="{StaticResource TextBlockStyle_FieldHeader}" Margin="5" FontSize="25"/>
<TextBlock Text="{Binding AirRingShift}" Style="{StaticResource TextBlockStyle_FieldHeader}" Margin="5" FontSize="25"/>
<TextBlock Text="手动后" Margin="5,0,0,0" />
<iconPacks:PackIconIonicons Kind="ArrowDroprightMD" VerticalAlignment="Center" Margin="5,0,0,0"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock Text="相关度:" Style="{StaticResource TextBlockStyle_FieldHeader}" Margin="5" FontSize="25"/>
<TextBlock Text="{Binding TandH_Corel, StringFormat={}{0:f3}}" Style="{StaticResource TextBlockStyle_FieldHeader}" Margin="5" FontSize="25"/>
</Button>
<Button Click="AirRingShift_Reset" Width="110" >
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="BackupRestore" VerticalAlignment="Center" Margin="5,0,0,0"/>
<TextBlock Text="复位偏转数" Margin="5,0,5,0" />
</StackPanel>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Content="手动前" Click="AirRingShift_Add" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="0" FontFamily="YouYuan" Margin="5"/>
<Button Content="手动后" Click="AirRingShift_Sub" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1" FontFamily="YouYuan" Margin="5"/>
<Button Content="复位偏转数" Click="AirRingShift_Reset" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="2" FontFamily="YouYuan" Margin="5"/>
</Grid>
</Grid>
<Grid DockPanel.Dock="Top">
<Grid.RowDefinitions>
......@@ -218,22 +175,35 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="旋转角度:" Style="{StaticResource TextBlockStyle_FieldHeader}" Margin="5" FontSize="25"/>
<TextBlock Text="{Binding RotAngle,StringFormat={}{0:f1}}" Style="{StaticResource TextBlockStyle_FieldHeader}" Margin="5" FontSize="25"/>
<TextBlock Text="旋转角度:" Style="{StaticResource textblock}" />
<TextBlock Text="{Binding RotAngle,StringFormat={}{0:f1}}" Style="{StaticResource textblock}" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<Button Click="Angle_Add" >
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconIonicons Kind="ArrowDropupMD" Margin="0,2,8,0"/>
<TextBlock Text="增加" />
</StackPanel>
</Button>
<Button Click="Angle_Sub" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="减少" />
<iconPacks:PackIconIonicons Kind="ArrowDropdownMD" Margin="8,3,0,0"/>
</StackPanel>
</Button>
<Button Click="Search_Angle" Width="120">
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconEntypo Kind="BackInTime" VerticalAlignment="Center" Margin="5,0,0,0"/>
<TextBlock Text="搜索旋转角度" Margin="5,0,5,0" />
</StackPanel>
</Button>
</StackPanel>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Content="增加" Click="Angle_Add" Style="{DynamicResource AccentedSquareButtonStyle}" FontFamily="YouYuan" Margin="5"/>
<Button Content="减少" Click="Angle_Sub" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1" FontFamily="YouYuan" Margin="5"/>
<Button Content="搜索旋转角度" Click="Search_Angle" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="2" FontFamily="YouYuan" Margin="5"/>
</Grid>
</Grid>
</DockPanel>
<Button Content="应用" DockPanel.Dock="Bottom" Style="{DynamicResource AccentedSquareButtonStyle}" Margin="5" FontFamily="YouYuan"/>
<StackPanel DockPanel.Dock="Right">
<Button Content="应用" Height="241" Width="50" Margin="0,15"/>
</StackPanel>
</DockPanel>
</Border>
</Grid>
......
......@@ -12,7 +12,10 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="TextBlock" >
<Setter Property="FontSize" Value="13"/>
<Setter Property="Margin" Value="7,13,7,5" />
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
......@@ -57,8 +60,8 @@
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>-->
<StackPanel Orientation="Horizontal" Grid.Row="1">
<TextBlock Text="{Binding FrameIdx1, StringFormat=第一幅号:{0}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5"/>
<TextBlock Text="{Binding FrameIdx2, StringFormat=第二幅号:{0}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5"/>
<TextBlock Text="{Binding FrameIdx1, StringFormat=第一幅号:{0}}" />
<TextBlock Text="{Binding FrameIdx2, StringFormat=第二幅号:{0}}" />
</StackPanel>
</Grid>
......
......@@ -6,7 +6,8 @@
xmlns:local="clr-namespace:FLY.HeatingHelper.UI.UIModule"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:c1c="clr-namespace:C1.WPF.C1Chart;assembly=C1.WPF.C1Chart.4.5.2"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="FLY.HeatingHelper.UI.UIModule.UC_FramePicker"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" x:Class="FLY.HeatingHelper.UI.UIModule.UC_FramePicker"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="600">
<UserControl.Resources>
......@@ -14,18 +15,6 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--<Style TargetType="{x:Type Button}">
<Setter Property="FontSize" Value="12"/>
</Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Setter Property="Margin" Value="0,0,5,0"/>
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="#4C000F14" Opacity="0.7"/>
</Setter.Value>
</Setter>
</Style>-->
<Style TargetType="{x:Type c1c:C1Chart}">
<!--<Setter Property="Foreground" Value="#FFF0F8FE" />
<Setter Property="Background" Value="#4C000F14" />-->
......@@ -35,13 +24,84 @@
<Setter Property="Margin" Value="0 10" />
<Setter Property="FontSize" Value="12"/>
</Style>
<Style TargetType="{x:Type Button}" x:Key="LeftButton">
<Setter Property="Background" Value="#cc119eda"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="SnapsToDevicePixels" Value="False"/>
<Setter Property="FontSize" Value="12" />
<Setter Property="Height" Value="33" />
<Setter Property="Width" Value="65" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="5"/>
<StackPanel Orientation="Horizontal" >
<iconPacks:PackIconIonicons Kind="ArrowDropleftMD" VerticalAlignment="Center" Margin="3,0,3,0" HorizontalAlignment="Center"/>
<ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="#66119eda"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="#ff444444"/>
<Setter Property="Foreground" Value="#ffffffff" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type Button}" x:Key="RightButton">
<Setter Property="Background" Value="#cc119eda"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="SnapsToDevicePixels" Value="False"/>
<Setter Property="FontSize" Value="12" />
<Setter Property="Height" Value="33" />
<Setter Property="Width" Value="65" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="5"/>
<StackPanel Orientation="Horizontal" >
<!--<iconPacks:PackIconIonicons x:Name="LeftBiao" Kind="ArrowDropleftMD" VerticalAlignment="Center" Margin="5,0" HorizontalAlignment="Center"/>-->
<ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="8,0,3,0" />
<iconPacks:PackIconIonicons Kind="ArrowDroprightMD" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="#66119eda"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="#ff444444"/>
<Setter Property="Foreground" Value="#ffffffff" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextBlock" >
<Setter Property="FontSize" Value="13"/>
<Setter Property="Margin" Value="7,13,7,5" />
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<Grid>
......@@ -78,17 +138,19 @@
Value="{Binding SelectedFrame}"/>
</Grid>
</Border>
<DockPanel Grid.Row="1">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right">
<Button Content="前一幅" Command="{Binding PreCmd}" FontFamily="YouYuan" Style="{DynamicResource AccentedSquareButtonStyle}" FontSize="20" Margin="3,0,3,0" />
<Button Content="后一幅" Command="{Binding NxtCmd}" FontFamily="YouYuan" Style="{DynamicResource SquareButtonStyle}" FontSize="20" Margin="3,0,5,0" />
<Button Content="前一幅" Command="{Binding PreCmd}" Margin="0,5,0,5" Style="{StaticResource LeftButton}" />
<Button Content="后一幅" Command="{Binding NxtCmd}" Margin="10,5,5,5" Style="{StaticResource RightButton}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Left" >
<TextBlock Text="{Binding FrameID, Mode=OneWay, StringFormat=ID:\{0\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="5"/>
<TextBlock Text="{Binding FrameTime, Mode=OneWay, StringFormat=\{0:MM/dd HH:mm:ss\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5"/>
<TextBlock Text="{Binding ResetBolt, StringFormat=复位分区:\{0\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5"/>
<TextBlock Text="{Binding RotAngle, StringFormat=旋转角度:\{0:f1\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5">
<TextBlock Text="{Binding FrameID, Mode=OneWay, StringFormat=ID:\{0\}}" />
<TextBlock Text="{Binding FrameTime, Mode=OneWay, StringFormat=\{0:MM/dd HH:mm:ss\}}" />
<TextBlock Text="{Binding ResetBolt, StringFormat=复位分区:\{0\}}" />
<TextBlock Text="{Binding RotAngle, StringFormat=旋转角度:\{0:f1\}}" />
<TextBlock >
<TextBlock.Text >
<MultiBinding StringFormat="{}{0}/({1})-({2})">
<Binding Path="SelectedFrame" />
......@@ -99,22 +161,6 @@
</TextBlock>
</StackPanel>
</DockPanel>
<!--<StackPanel Orientation="Horizontal" >
<TextBlock Text="{Binding FrameID, Mode=OneWay, StringFormat=ID:\{0\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18"/>
<TextBlock Text="{Binding FrameTime, Mode=OneWay, StringFormat=\{0:MM/dd HH:mm:ss\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18"/>
<TextBlock Text="{Binding ResetBolt, StringFormat=复位分区:\{0\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18"/>
<TextBlock Text="{Binding RotAngle, StringFormat=旋转角度:\{0:f1\}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18">
<TextBlock.Text >
<MultiBinding StringFormat="{}{0}/({1})-({2})">
<Binding Path="SelectedFrame" />
<Binding Path="MinFrame"/>
<Binding Path="MaxFrame"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<Button Content="前一幅" Command="{Binding PreCmd}" FontFamily="YouYuan" Style="{DynamicResource SquareButtonStyle}" FontSize="18" Margin="3,0,3,0" />
<Button Content="后一幅" Command="{Binding NxtCmd}" FontFamily="YouYuan" Style="{DynamicResource SquareButtonStyle}" FontSize="18" Margin="3,0,3,0" />
</StackPanel>-->
</Grid>
</UserControl>
......@@ -12,7 +12,16 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="5"/>
<Setter Property="FontFamily" Value="YouYuan" />
<Setter Property="FontSize" Value="25" />
</Style>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="YouYuan" />
<Setter Property="Margin" Value="0,5,5,5" />
</Style>
</ResourceDictionary>
</UserControl.Resources>
......@@ -26,41 +35,41 @@
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Name="SP_0">
<StackPanel Orientation="Vertical" Name="SP_0" Margin="5,10">
<DockPanel>
<TextBlock Text="最大幅间隔" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" DockPanel.Dock="Left" />
<TextBox Text="{Binding MaxFrameInterval}" Style="{StaticResource TextBoxStyle1}" DockPanel.Dock="Right" />
<TextBlock Text="最大幅间隔:" Background="LightBlue" DockPanel.Dock="Left" />
<TextBox Text="{Binding MaxFrameInterval}" />
</DockPanel>
<DockPanel>
<TextBlock Text="总加热变化量" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<TextBox Text="{Binding HeatRateVar}" Style="{StaticResource TextBoxStyle1}" />
<TextBlock Text="总加热变化量:" Background="LightBlue" />
<TextBox Text="{Binding HeatRateVar}" />
</DockPanel>
<DockPanel>
<TextBlock Text="忽略加热变化量" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<TextBox Text="{Binding NeglectHeatRate}" Style="{StaticResource TextBoxStyle1}" />
<TextBlock Text="忽略加热变化量:" Background="LightBlue" />
<TextBox Text="{Binding NeglectHeatRate}" />
</DockPanel>
<DockPanel>
<TextBlock Text="分离螺丝数" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<TextBox Text="{Binding Separation}" Style="{StaticResource TextBoxStyle1}" />
<TextBlock Text="分离螺丝数:" Background="LightBlue" />
<TextBox Text="{Binding Separation}" />
</DockPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Path=HeatBoltItems.Count, StringFormat=搜索结果:{0}}" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<TextBlock Text="{Binding Path=HeatBoltItems.Count, StringFormat=搜索结果:{0}}" Background="LightBlue" />
<Grid Grid.Column="1">
<DockPanel>
<Controls:ToggleSwitch Content="过滤" IsChecked="{Binding IsFilter}" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitch.Win10}" FontSize="22" Margin="5"/>
<Button Content="搜索" Click="Button_Click" FontFamily="YouYuan" Margin="5"
<StackPanel Orientation="Horizontal">
<Controls:ToggleSwitch Content="过滤" IsChecked="{Binding IsFilter}" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitch.Win10}" FontSize="20" Margin="15,5,5,5" Width="100"/>
<Button Content="搜索" Click="Button_Click" FontFamily="YouYuan" Margin="5" Width="75" FontSize="20"
Style="{DynamicResource AccentedSquareButtonStyle}" />
</DockPanel>
</StackPanel>
</Grid>
</Grid>
</StackPanel>
<ListView x:Name="lv_result" ItemsSource="{Binding HeatBoltItems}" Grid.Row="1" Margin="5,5,5,20"
SelectionChanged="Lv_result_SelectionChanged"
SelectedIndex="{Binding SelectItem}" FontFamily="YouYuan" >
SelectedIndex="{Binding SelectItem}" FontFamily="YouYuan" FontSize="20">
<ListView.View>
<GridView>
<GridView.Columns>
......@@ -89,7 +98,7 @@
</Grid.RowDefinitions>
<local:UC_FramePicker Grid.Row="0" DataContext="{Binding vm1}" Margin="5"/>
<local:UC_FramePicker Grid.Row="1" DataContext="{Binding vm2}" Margin="5"/>
<local:UC_FrameDiff Grid.Row="2" DataContext="{Binding vmDiff}" Margin="5"/>
<local:UC_FrameDiff Grid.Row="2" DataContext="{Binding vmDiff}" Margin="5,5,5,20"/>
</Grid>
</Grid>
</UserControl>
......@@ -10,27 +10,61 @@
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" Background="WhiteSmoke" x:Name="uc1" Loaded="uc1_Loaded">
<!--<UserControl.Resources>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
--><!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />-->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />-->
<!-- accent resource -->
<!-- change "Cobalt" to the accent color you want -->
<!--accent resource
change "Cobalt" to the accent color you want-->
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Cobalt.xaml" />-->
<!-- theme resource -->
<!-- change "BaseLight" to the theme you want -->
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />--><!--
<!--theme resource
change "BaseLight" to the theme you want-->
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />-->
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Button}" >
<Setter Property="Background" Value="#cc119eda"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="SnapsToDevicePixels" Value="False"/>
<Setter Property="FontSize" Value="15" />
<Setter Property="Height" Value="33" />
<Setter Property="Width" Value="80" />
<Setter Property="Margin" Value="5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="5"/>
<ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="#66119eda"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="#ff444444"/>
<Setter Property="Foreground" Value="#ffffffff" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Label" >
<Setter Property="FontSize" Value="20" />
<Setter Property="Margin" Value="0,5" />
</Style>
<Style TargetType="StackPanel">
<Setter Property="Width" Value="250" />
<Setter Property="Margin" Value="10,0" />
</Style>
</ResourceDictionary>
</UserControl.Resources>-->
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
......@@ -44,8 +78,8 @@
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="15,0,15,0">
<Label x:Uid="123" Content="数据范围:" Margin="0,0,0,3" FontFamily="YouYuan"/>
<StackPanel Orientation="Vertical" Grid.Column="0" >
<Label x:Uid="123" Content="数据范围:" />
<Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" MinWidth="180"
SelectedDateTime="{Binding Dat.TotalDataFrom, Mode=OneWay}"
Margin="0,0,0,5"
......@@ -56,10 +90,9 @@
Margin="0,1,0,0" IsEnabled="False">
</Controls:DateTimePicker>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="15,0,15,0">
<Label Content="加载数据范围:" Margin="0,0,0,3" FontFamily="YouYuan"/>
<StackPanel Orientation="Vertical" Grid.Column="1" >
<Label Content="加载数据范围:" />
<Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" MinWidth="180"
SelectedDateTime="{Binding Path=Dat.LoadDataFrom}"
Margin="0,0,0,5">
......@@ -73,18 +106,16 @@
</Controls:DateTimePicker>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="2" Margin="15,0,15,0">
<Controls:ToggleSwitch Content="过滤加热重复项" Margin="0,10,0,15" IsChecked="{Binding Path=Dat.IsDataFilter}" FontFamily="YouYuan" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitch.Win10}" FontSize="20"/>
<Button Content="缺省数据范围" FontFamily="YouYuan" Margin="0,0,0,10"
Style="{DynamicResource AccentedSquareButtonStyle}"
<StackPanel Orientation="Vertical" Grid.Column="2" >
<Controls:ToggleSwitch Content="过滤加热重复项" Margin="30,10" IsChecked="{Binding Path=Dat.IsDataFilter}" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitch.Win10}" FontSize="15"/>
<Button Content="缺省数据范围" Width="180"
Command="{Binding DefaultLoadDataRange}"/>
<Button Content="加载数据" FontFamily="YouYuan"
Style="{DynamicResource AccentedSquareButtonStyle}"
<Button Content="加载数据" Width="180"
Command="{Binding ReloadData}"/>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="3" Margin="15,0,0,0">
<Label Content="加载数据数量:" FontFamily="YouYuan"/>
<TextBox Controls:TextBoxHelper.Watermark="Watermark" Margin="0,5" FontSize="25"
<StackPanel Orientation="Vertical" Grid.Column="3" >
<Label Content="加载数据数量:" />
<TextBox Controls:TextBoxHelper.Watermark="Watermark" Margin="0,5" FontSize="20"
Text="{Binding RecordCount, Mode=OneWay}"
IsEnabled="False" />
</StackPanel>
......@@ -97,10 +128,10 @@
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="0,0,5,0">
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="0,0,5,0" Style="{x:Null}">
<StackPanel Orientation="Horizontal" Style="{x:Null}">
<Label Content="分析数据范围:"/>
<TextBlock Margin="10,5">
<TextBlock Margin="25,10,0,0" FontSize="20">
<TextBlock.Text>
<MultiBinding StringFormat="{}({0:MM/dd HH:mm:ss})-({1:MM/dd HH:mm:ss})">
<Binding Path="AnalystDataFrom" />
......@@ -108,7 +139,7 @@
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Margin="10,5">
<TextBlock Margin="25,10,0,0" FontSize="20">
<TextBlock.Text>
<MultiBinding StringFormat="{}({0})-({1})">
<Binding Path="Dat.AnalystIndexFrom" />
......@@ -125,18 +156,18 @@
</Controls:RangeSlider>
</StackPanel>
<Button Content="前一项" Style="{DynamicResource AccentedSquareButtonStyle}" FontFamily="YouYuan"
<Button Content="前一项"
Grid.Column="1" MinWidth="80" Margin="5"
Command="{Binding PreData}"/>
<Button Content="后一项" Style="{DynamicResource AccentedSquareButtonStyle}" FontFamily="YouYuan"
<Button Content="后一项"
Grid.Column="2" MinWidth="80" Margin="5"
Command="{Binding NextData}"/>
<Button Content="缺省项" Style="{DynamicResource AccentedSquareButtonStyle}" FontFamily="YouYuan"
<Button Content="缺省项"
Grid.Column="3" MinWidth="80" Margin="5"
Command="{Binding DefaultAnalystData}"/>
<Button Content="test" Click="Button_Click" Grid.Column="4" FontFamily="YouYuan"
<Button Content="test" Click="Button_Click" Grid.Column="4"
Command="{Binding Test}" Margin="5" MinWidth="80"
Style="{DynamicResource AccentedSquareButtonStyle}"/>
/>
</Grid>
<Border Grid.Row="2" Margin="2,5,2,2">
<c1c:C1Chart ChartType="Line" Margin="5,0,0,0">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment