Commit 61b4af7d authored by 潘栩锋's avatar 潘栩锋 🚴

添加 数据浏览器 设置界面 设置混合数,Y轴比例,直方图步长

parent 8d915907
......@@ -43,12 +43,12 @@ namespace FLY.Thick.FilmCasting.UI.DbViewer.Core
/// <summary>
/// 直方图统计步距 1um
/// </summary>
public int Step = 1;
public int Step { get; set; } = 1;
/// <summary>
/// 扫描图显示的范围比例 3倍
/// </summary>
public double YRangePercent = 3;
public double YRangePercent { get; set; } = 3;
/// <summary>
/// 混合数
......
......@@ -16,41 +16,70 @@
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="配置" FontSize="{StaticResource FontSize.H1}" Margin="{StaticResource ControlMargin}"/>
<StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="数据库" FontSize="{StaticResource FontSize.H2}" Margin="{StaticResource ControlMargin}"/>
<StackPanel Orientation="Horizontal">
<Button Width="140" Margin="{StaticResource ControlMargin}" Content="选择数据库文件夹"
<TextBlock Text="配置" FontSize="{StaticResource FontSize.H1}" Margin="{StaticResource ControlMargin}"/>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="数据库" FontSize="{StaticResource FontSize.H2}" Margin="{StaticResource ControlMargin}"/>
<StackPanel Orientation="Horizontal">
<Button Width="140" Margin="{StaticResource ControlMargin}" Content="选择数据库文件夹"
Command="{Binding DbSelectCmd}"
Style="{StaticResource MahApps.Styles.Button.Square.Accent}" />
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="{Binding DbDirPath}" FontSize="{StaticResource FontSize.H4}"/>
<TextBlock
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="{Binding DbDirPath}" FontSize="{StaticResource FontSize.H4}"/>
<TextBlock
DataContext="{Binding DbHelper}"
Text="{Binding ErrorMsg,Mode=OneWay}" >
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Green"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsDbErr}" Value="True">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Control.Validation}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Green"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsDbErr}" Value="True">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Control.Validation}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</StackPanel>
<StackPanel DataContext="{Binding DbHelper}">
<TextBlock Margin="{StaticResource ControlMargin}" FontSize="{StaticResource FontSize.H4}">
测厚仪数据库[<Run Text="{Binding IsThkExist,Mode=OneWay}"/>]
</TextBlock>
</StackPanel>
</StackPanel>
<StackPanel DataContext="{Binding DbHelper}">
<TextBlock Margin="{StaticResource ControlMargin}" FontSize="{StaticResource FontSize.H4}">
测厚仪数据库[<Run Text="{Binding IsThkExist,Mode=OneWay}"/>]
</TextBlock>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="统计方式" FontSize="{StaticResource FontSize.H2}" Margin="{StaticResource ControlMargin}"/>
<StackPanel Orientation="Horizontal" DataContext="{Binding DbViewerModel}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="混合数"/>
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding Mix}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="次"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="直方图统计步距"/>
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding Step}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="um"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="扫描图Y轴范围比例"/>
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding YRangePercent}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="倍"/>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<Button VerticalAlignment="Top" HorizontalAlignment="Right" Style="{StaticResource Styles.Button.Circle.Accent}" Margin="{StaticResource ControlMargin}" Grid.Column="1" Click="ButtonBack_Click">
<iconPacks:PackIconMaterial Kind="ArrowLeft" />
</Button>
......
......@@ -44,7 +44,7 @@ namespace FLY.Thick.FilmCasting.UI.DbViewer
public RelayCommand DbSelectCmd { get; private set; }
public DbHelper DbHelper { get; } = new DbHelper();
public DbViewerModel DbViewerModel => dbViewerModel;
DbViewerModel dbViewerModel;
public PageSetupVm()
{
......
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