Commit be41225f authored by 冯伟球's avatar 冯伟球

更改界面基础版,主要更改了布局,满足基本使用,但还没美化按钮本文的样式显示。

parent f900d651
...@@ -25,7 +25,26 @@ ...@@ -25,7 +25,26 @@
</ResourceDictionary> </ResourceDictionary>
</Page.Resources> </Page.Resources>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="Button_Click"> <Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="Button_Click">
<Grid> <Border Style="{StaticResource BorderStyle_module}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Path=Dat.State,Converter={StaticResource StateToMessage}}" HorizontalAlignment="Center" FontFamily="YouYuan" FontSize="25" Margin="0,10,0,3"/>
<StackPanel Grid.Row="1" Background="#FF119EDA" Margin="5">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="风环偏转" FontFamily="YouYuan" FontSize="25" Margin="0,3,0,3"/>
<TextBlock Text="{Binding Path=Dat.AirRingShift}" Background="AliceBlue" FontFamily="YouYuan" Margin="15,3,0,3" FontSize="25"/>
</StackPanel>
</StackPanel>
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="风环偏转" FontFamily="YouYuan" FontSize="25" Margin="0,3,0,3"/>
<TextBlock Text="{Binding Path=Dat.AirRingShift}" Background="AliceBlue" FontFamily="YouYuan" Margin="15,3,0,3" FontSize="25"/>
</StackPanel>-->
</Grid>
</Border>
<!--<Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition>
...@@ -37,6 +56,6 @@ ...@@ -37,6 +56,6 @@
<TextBlock Text="风环偏转"/> <TextBlock Text="风环偏转"/>
<TextBlock Text="{Binding Path=Dat.AirRingShift}" Background="AliceBlue"/> <TextBlock Text="{Binding Path=Dat.AirRingShift}" Background="AliceBlue"/>
</StackPanel> </StackPanel>
</Grid> </Grid>-->
</Button> </Button>
</Page> </Page>
...@@ -5,20 +5,24 @@ ...@@ -5,20 +5,24 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.HeatingHelper.UI.UIModule" xmlns:local="clr-namespace:FLY.HeatingHelper.UI.UIModule"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
mc:Ignorable="d" mc:Ignorable="d" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" d:DesignHeight="450" d:DesignWidth="800">
d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded">
<UserControl.Resources> <UserControl.Resources>
<local:LockFramesConverter x:Key="lfc"/> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:LockFramesConverter x:Key="lfc"/>
</ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>
<Grid.Resources> <!--<Grid.Resources>
<Style TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/> <Setter Property="FontSize" Value="14"/>
</Style> </Style>
<Style TargetType="{x:Type Button}"> <Style TargetType="{x:Type Button}">
<Setter Property="FontSize" Value="12"/> <Setter Property="FontSize" Value="12"/>
</Style> </Style>
</Grid.Resources> </Grid.Resources>-->
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
...@@ -54,51 +58,182 @@ ...@@ -54,51 +58,182 @@
</lvc:CartesianChart> </lvc:CartesianChart>
</Border> </Border>
<DockPanel Grid.Column="2" LastChildFill="False"> <!--<DockPanel Grid.Column="2">
<DockPanel.Resources> <TextBlock Text="锁定设置:" Style="{StaticResource TextBlockStyle_FieldHeader}" HorizontalAlignment="Center" DockPanel.Dock="Top"/>
<Style x:Key="tb_style" TargetType="TextBlock"> <DockPanel DockPanel.Dock="Left" LastChildFill="False" >
<DockPanel.Resources>
--><!--<Style x:Key="tb_style" TargetType="TextBlock">
<Setter Property="Background" Value="AntiqueWhite"/> <Setter Property="Background" Value="AntiqueWhite"/>
<Setter Property="FontSize" Value="16"/> <Setter Property="FontSize" Value="16"/>
</Style> </Style>--><!--
</DockPanel.Resources> </DockPanel.Resources>
<Grid DockPanel.Dock="Top" Margin="0,0,0,5"> <Grid DockPanel.Dock="Top" Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/> </Grid.ColumnDefinitions>
</Grid.ColumnDefinitions> <RadioButton Content="锁定1幅" Grid.Column="0" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=1}"/>
<TextBlock Text="锁定设置:"/> <RadioButton Content="锁定2幅" Grid.Column="1" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=2}"/>
<RadioButton Content="锁定1幅" Grid.Column="1" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=1}"/> <RadioButton Content="无锁定" Grid.Column="2" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=0}"/>
<RadioButton Content="锁定2幅" Grid.Column="2" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=2}"/> </Grid>
<RadioButton Content="无锁定" Grid.Column="3" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=0}"/> <Grid DockPanel.Dock="Top">
</Grid> <Grid>
<Grid DockPanel.Dock="Top"> <Grid.ColumnDefinitions>
<ProgressBar Value="{Binding SearchProgressValue}" Width="{Binding ElementName=searchBtn, Path=ActualWidth}"/> <ColumnDefinition Width="*"/>
<Button Content="搜索最大相关度" Click="AutoSearch_Shift" x:Name="searchBtn" <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ProgressBar Value="{Binding SearchProgressValue}" Width="{Binding ElementName=searchBtn, Path=ActualWidth}"/>
<Button Content="搜索最大相关度" Click="AutoSearch_Shift" x:Name="searchBtn"
HorizontalAlignment="Center" HorizontalAlignment="Center"
IsEnabled="{Binding SearchEnabled}" IsEnabled="{Binding SearchEnabled}"
Opacity="0.8" Style="{DynamicResource AccentedSquareButtonStyle}"/> Opacity="0.8" Style="{DynamicResource AccentedSquareButtonStyle}"/>
</Grid> <Button Content="自动计算" Click="AutoCal_Shift" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1"/>
<WrapPanel Orientation="Horizontal" DockPanel.Dock="Top"> </Grid>
<Button Content="自动计算" Click="AutoCal_Shift" Style="{DynamicResource AccentedSquareButtonStyle}"/>
<TextBlock Text="偏转数:" Margin="5,0,0,0" Style="{StaticResource tb_style}"/> </Grid>
<TextBlock Text="{Binding AirRingShift}" Style="{StaticResource tb_style}"/> <Grid DockPanel.Dock="Top">
<TextBlock Text="相关度:" Margin="5,0,0,0" Style="{StaticResource tb_style}"/> <Grid.RowDefinitions>
<TextBlock Text="{Binding TandH_Corel, StringFormat={}{0:f3}}" Style="{StaticResource tb_style}"/> <RowDefinition Height="*"/>
<Button Content="手动前" Margin="3,0,0,0" Click="AirRingShift_Add" Style="{DynamicResource AccentedSquareButtonStyle}"/> <RowDefinition Height="*"/>
<Button Content="手动后" Margin="3,0,0,0" Click="AirRingShift_Sub" Style="{DynamicResource AccentedSquareButtonStyle}"/> </Grid.RowDefinitions>
<Button Content="复位偏转数" Margin="3,0,0,0" Click="AirRingShift_Reset" Style="{DynamicResource AccentedSquareButtonStyle}"/> <Grid Grid.Row="0">
</WrapPanel> <Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0" DockPanel.Dock="Top"> <ColumnDefinition Width="*"/>
<TextBlock Text="旋转角度:" Style="{StaticResource tb_style}"/> <ColumnDefinition Width="*"/>
<TextBlock Text="{Binding RotAngle,StringFormat={}{0:f1}}" Style="{StaticResource tb_style}"/> </Grid.ColumnDefinitions>
<Button Content="增加" Margin="3,0,0,0" Click="Angle_Add" Style="{DynamicResource AccentedSquareButtonStyle}"/> <StackPanel Orientation="Horizontal">
<Button Content="减少" Margin="3,0,0,0" Click="Angle_Sub" Style="{DynamicResource AccentedSquareButtonStyle}"/> <TextBlock Text="偏转数:" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<Button Content="搜索旋转角度" Margin="3,0,0,0" Click="Search_Angle" Style="{DynamicResource AccentedSquareButtonStyle}"/> <TextBlock Text="{Binding AirRingShift}" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
</StackPanel> </StackPanel>
<Button Content="应用" DockPanel.Dock="Bottom" Style="{DynamicResource AccentedSquareButtonStyle}"/> <StackPanel Grid.Column="1" Orientation="Horizontal">
</DockPanel> <TextBlock Text="相关度:" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
<TextBlock Text="{Binding TandH_Corel, StringFormat={}{0:f3}}" Style="{StaticResource TextBlockStyle_FieldHeader}" />
</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 Orientation="Horizontal">
<TextBlock Text="旋转角度:" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
<TextBlock Text="{Binding RotAngle,StringFormat={}{0:f1}}" Style="{StaticResource TextBlockStyle_FieldHeader}"/>
</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="*"/>
</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"/>
</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>
<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"/>
</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"/>
</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>
<RowDefinition Height="*"/>
<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"/>
</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"/>
</DockPanel>
</Border>
</Grid> </Grid>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -20,7 +20,26 @@ ...@@ -20,7 +20,26 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<lvc:CartesianChart Grid.Row="0" x:Name="myChart" Series="{Binding MySeries}" <Border>
<lvc:CartesianChart x:Name="myChart" Series="{Binding MySeries}"
DisableAnimations="True"
Hoverable="False"
DataTooltip="{x:Null}"
LegendLocation="Top"
FontSize="16"
Margin="2,2,2,2">
<lvc:CartesianChart.AxisY>
<lvc:Axis Foreground="DodgerBlue" Title="厚度变化量">
</lvc:Axis>
<lvc:Axis x:Name="yax2" Foreground="IndianRed" Position="RightTop" Title="加热变化量">
<lvc:Axis.Separator>
<lvc:Separator IsEnabled="False"></lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Border>
<!--<lvc:CartesianChart Grid.Row="0" x:Name="myChart" Series="{Binding MySeries}"
DisableAnimations="True" DisableAnimations="True"
Hoverable="False" Hoverable="False"
DataTooltip="{x:Null}" DataTooltip="{x:Null}"
...@@ -36,10 +55,10 @@ ...@@ -36,10 +55,10 @@
</lvc:Axis.Separator> </lvc:Axis.Separator>
</lvc:Axis> </lvc:Axis>
</lvc:CartesianChart.AxisY> </lvc:CartesianChart.AxisY>
</lvc:CartesianChart> </lvc:CartesianChart>-->
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel Orientation="Horizontal" Grid.Row="1">
<TextBlock Text="{Binding FrameIdx1, StringFormat=第一幅号:{0}}" Style="{StaticResource TextBlockStyle_FieldHeader}"/> <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}"/> <TextBlock Text="{Binding FrameIdx2, StringFormat=第二幅号:{0}}" Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
......
...@@ -65,15 +65,15 @@ ...@@ -65,15 +65,15 @@
</Border> </Border>
<DockPanel Grid.Row="1"> <DockPanel Grid.Row="1">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right"> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right">
<Button Content="前一幅" Command="{Binding PreCmd}" FontFamily="YouYuan" Style="{DynamicResource SquareButtonStyle}" FontSize="18" Margin="3,0,3,0" /> <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="18" Margin="3,0,3,0" /> <Button Content="后一幅" Command="{Binding NxtCmd}" FontFamily="YouYuan" Style="{DynamicResource SquareButtonStyle}" FontSize="20" Margin="3,0,5,0" />
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Left" > <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 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="10,5,10,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="10,5,10,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="10,5,10,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="10,5,10,5"> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" FontSize="18" Margin="15,5,15,5">
<TextBlock.Text > <TextBlock.Text >
<MultiBinding StringFormat="{}{0}/({1})-({2})"> <MultiBinding StringFormat="{}{0}/({1})-({2})">
<Binding Path="SelectedFrame" /> <Binding Path="SelectedFrame" />
......
...@@ -21,36 +21,50 @@ ...@@ -21,36 +21,50 @@
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="5*"/> <ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" Name="SP_0"> <Grid>
<StackPanel Orientation="Horizontal"> <Grid.RowDefinitions>
<TextBlock Text="最大幅间隔" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" /> <RowDefinition Height="auto"/>
<TextBox Text="{Binding MaxFrameInterval}" Style="{StaticResource TextBoxStyle1}"/> <RowDefinition Height="*"/>
</StackPanel> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical" Name="SP_0">
<TextBlock Text="总加热变化量" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}"/> <DockPanel>
<TextBox Text="{Binding HeatRateVar}" Style="{StaticResource TextBoxStyle1}"/> <TextBlock Text="最大幅间隔" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" DockPanel.Dock="Left" />
</StackPanel> <TextBox Text="{Binding MaxFrameInterval}" Style="{StaticResource TextBoxStyle1}" DockPanel.Dock="Right" />
<StackPanel Orientation="Horizontal"> </DockPanel>
<TextBlock Text="忽略加热变化量" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}"/> <DockPanel>
<TextBox Text="{Binding NeglectHeatRate}" Style="{StaticResource TextBoxStyle1}"/> <TextBlock Text="总加热变化量" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
</StackPanel> <TextBox Text="{Binding HeatRateVar}" Style="{StaticResource TextBoxStyle1}" />
<StackPanel Orientation="Horizontal"> </DockPanel>
<TextBlock Text="分离螺丝数" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}"/> <DockPanel>
<TextBox Text="{Binding Separation}" Style="{StaticResource TextBoxStyle1}" /> <TextBlock Text="忽略加热变化量" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
</StackPanel> <TextBox Text="{Binding NeglectHeatRate}" Style="{StaticResource TextBoxStyle1}" />
<StackPanel Orientation="Horizontal"> </DockPanel>
<TextBlock Text="{Binding Path=HeatBoltItems.Count, StringFormat=搜索结果:{0}}" Background="LightCyan" Style="{StaticResource TextBlockStyle_FieldContent}" FontSize="25"/> <DockPanel>
<CheckBox Content="过滤" IsChecked="{Binding IsFilter}"/> <TextBlock Text="分离螺丝数" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<Button Content="搜索" Click="Button_Click" <TextBox Text="{Binding Separation}" Style="{StaticResource TextBoxStyle1}" />
</DockPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Path=HeatBoltItems.Count, StringFormat=搜索结果:{0}}" Background="LightBlue" Style="{StaticResource TextBlockStyle_FieldHeader}" />
<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"
Style="{DynamicResource AccentedSquareButtonStyle}" /> Style="{DynamicResource AccentedSquareButtonStyle}" />
</DockPanel>
</Grid>
</Grid>
</StackPanel> </StackPanel>
<ListView x:Name="lv_result" ItemsSource="{Binding HeatBoltItems}" <ListView x:Name="lv_result" ItemsSource="{Binding HeatBoltItems}" Grid.Row="1" Margin="5,5,5,20"
MaxHeight="250" SelectionChanged="Lv_result_SelectionChanged" SelectionChanged="Lv_result_SelectionChanged"
SelectedIndex="{Binding SelectItem}"> SelectedIndex="{Binding SelectItem}" FontFamily="YouYuan" >
<ListView.View> <ListView.View>
<GridView> <GridView>
<GridView.Columns> <GridView.Columns>
<GridViewColumn Header="幅1" <GridViewColumn Header="幅1"
DisplayMemberBinding="{Binding FrameIdx1}"/> DisplayMemberBinding="{Binding FrameIdx1}"/>
<GridViewColumn Header="幅2" <GridViewColumn Header="幅2"
DisplayMemberBinding="{Binding FrameIdx2}"/> DisplayMemberBinding="{Binding FrameIdx2}"/>
...@@ -66,7 +80,7 @@ ...@@ -66,7 +80,7 @@
</GridView> </GridView>
</ListView.View> </ListView.View>
</ListView> </ListView>
</StackPanel> </Grid>
<Grid Grid.Column="1"> <Grid Grid.Column="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
......
...@@ -44,28 +44,28 @@ ...@@ -44,28 +44,28 @@
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="0,0,5,0"> <StackPanel Orientation="Vertical" Grid.Column="0" Margin="15,0,15,0">
<Label x:Uid="123" Content="数据范围:" Margin="0,0,0,3"/> <Label x:Uid="123" Content="数据范围:" Margin="0,0,0,3" FontFamily="YouYuan"/>
<Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" <Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" MinWidth="180"
SelectedDateTime="{Binding Dat.TotalDataFrom, Mode=OneWay}" SelectedDateTime="{Binding Dat.TotalDataFrom, Mode=OneWay}"
Margin="0,0,0,1" Margin="0,0,0,5"
IsEnabled="False"> IsEnabled="False">
</Controls:DateTimePicker> </Controls:DateTimePicker>
<Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" <Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" MinWidth="180"
SelectedDateTime="{Binding Path=Dat.TotalDataTo, Mode=OneWay}" SelectedDateTime="{Binding Path=Dat.TotalDataTo, Mode=OneWay}"
Margin="0,1,0,0" IsEnabled="False"> Margin="0,1,0,0" IsEnabled="False">
</Controls:DateTimePicker> </Controls:DateTimePicker>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="0,0,5,0"> <StackPanel Orientation="Vertical" Grid.Column="1" Margin="15,0,15,0">
<Label Content="加载数据范围:" Margin="0,0,0,3"/> <Label Content="加载数据范围:" Margin="0,0,0,3" FontFamily="YouYuan"/>
<Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" <Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" MinWidth="180"
SelectedDateTime="{Binding Path=Dat.LoadDataFrom}" SelectedDateTime="{Binding Path=Dat.LoadDataFrom}"
Margin="0,0,0,1"> Margin="0,0,0,5">
</Controls:DateTimePicker> </Controls:DateTimePicker>
<Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" <Controls:DateTimePicker Controls:TextBoxHelper.UseFloatingWatermark="False" MinWidth="180"
SelectedDateTime="{Binding Path=Dat.LoadDataTo}" SelectedDateTime="{Binding Path=Dat.LoadDataTo}"
Name="dtp4" Name="dtp4"
Margin="0,1,0,0"> Margin="0,1,0,0">
...@@ -73,18 +73,18 @@ ...@@ -73,18 +73,18 @@
</Controls:DateTimePicker> </Controls:DateTimePicker>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="2" Margin="0,0,5,0"> <StackPanel Orientation="Vertical" Grid.Column="2" Margin="15,0,15,0">
<CheckBox Content="过滤加热重复项" Margin="0,5,0,5" IsChecked="{Binding Path=Dat.IsDataFilter}"/> <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="缺省数据范围" <Button Content="缺省数据范围" FontFamily="YouYuan" Margin="0,0,0,10"
Style="{DynamicResource AccentedSquareButtonStyle}" Style="{DynamicResource AccentedSquareButtonStyle}"
Command="{Binding DefaultLoadDataRange}"/> Command="{Binding DefaultLoadDataRange}"/>
<Button Content="加载数据" <Button Content="加载数据" FontFamily="YouYuan"
Style="{DynamicResource AccentedSquareButtonStyle}" Style="{DynamicResource AccentedSquareButtonStyle}"
Command="{Binding ReloadData}"/> Command="{Binding ReloadData}"/>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="3" Margin="0,0,5,0"> <StackPanel Orientation="Vertical" Grid.Column="3" Margin="15,0,0,0">
<Label Content="加载数据数量:"/> <Label Content="加载数据数量:" FontFamily="YouYuan"/>
<TextBox Controls:TextBoxHelper.Watermark="Watermark" <TextBox Controls:TextBoxHelper.Watermark="Watermark" Margin="0,5" FontSize="25"
Text="{Binding RecordCount, Mode=OneWay}" Text="{Binding RecordCount, Mode=OneWay}"
IsEnabled="False" /> IsEnabled="False" />
</StackPanel> </StackPanel>
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="0,0,5,0"> <StackPanel Orientation="Vertical" Grid.Column="0" Margin="15,0,15,0">
<Label Content="分析数据范围:"/> <Label Content="分析数据范围:" FontFamily="YouYuan"/>
<Controls:RangeSlider Minimum="0" <Controls:RangeSlider Minimum="0"
Maximum="{Binding RecordCount, Mode=OneWay}" Maximum="{Binding RecordCount, Mode=OneWay}"
LowerValue="{Binding Dat.AnalystIndexFrom}" LowerValue="{Binding Dat.AnalystIndexFrom}"
...@@ -107,17 +107,17 @@ ...@@ -107,17 +107,17 @@
</Controls:RangeSlider> </Controls:RangeSlider>
</StackPanel> </StackPanel>
<Button Content="前一项" Style="{DynamicResource AccentedSquareButtonStyle}" <Button Content="前一项" Style="{DynamicResource AccentedSquareButtonStyle}" FontFamily="YouYuan"
Grid.Column="1" MinWidth="80" Margin="0,0,5,0" Grid.Column="1" MinWidth="80" Margin="5"
Command="{Binding PreData}"/> Command="{Binding PreData}"/>
<Button Content="后一项" Style="{DynamicResource AccentedSquareButtonStyle}" <Button Content="后一项" Style="{DynamicResource AccentedSquareButtonStyle}" FontFamily="YouYuan"
Grid.Column="2" MinWidth="80" Margin="0,0,5,0" Grid.Column="2" MinWidth="80" Margin="5"
Command="{Binding NextData}"/> Command="{Binding NextData}"/>
<Button Content="缺省项" Style="{DynamicResource AccentedSquareButtonStyle}" <Button Content="缺省项" Style="{DynamicResource AccentedSquareButtonStyle}" FontFamily="YouYuan"
Grid.Column="3" MinWidth="80" Grid.Column="3" MinWidth="80" Margin="5"
Command="{Binding DefaultAnalystData}"/> Command="{Binding DefaultAnalystData}"/>
<Button Content="test" Click="Button_Click" Grid.Column="4" <Button Content="test" Click="Button_Click" Grid.Column="4" FontFamily="YouYuan"
Command="{Binding Test}" Command="{Binding Test}" Margin="5" MinWidth="80"
Style="{DynamicResource AccentedSquareButtonStyle}"/> Style="{DynamicResource AccentedSquareButtonStyle}"/>
</Grid> </Grid>
<Border Grid.Row="2" Margin="2,5,2,2"> <Border Grid.Row="2" Margin="2,5,2,2">
......
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