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

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

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