123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <Window x:Class="AICustomizeSDKDemo.Presentation.SettingWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:extensions="clr-namespace:AICustomizeSDKDemo.Extensions"
- mc:Ignorable="d"
- Title="系统设置"
- Height="500"
- Width="500"
- WindowStartupLocation="CenterScreen">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <ScrollViewer Grid.Row="0"
- VerticalScrollBarVisibility="Auto"
- HorizontalScrollBarVisibility="Disabled">
- <StackPanel Margin="5">
- <GroupBox Header="超声图像来源">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="输入源"
- Margin="5"
- Width="120"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"></TextBlock>
- <StackPanel Orientation="Horizontal">
- <TextBox Height="25"
- Margin="5"
- Width="185"
- VerticalAlignment="Center"
- Text="{Binding VideoFilePath}"
- ToolTip="{Binding VideoFilePath}"
- IsReadOnly="True" />
- <Button Margin="5"
- Content="浏览"
- Width="35"
- Command="{Binding BrowseCommand}" />
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </GroupBox>
- <GroupBox Header="AI功能设定">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="5"
- Text="启用AI诊断"
- Width="120"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"></TextBlock>
- <CheckBox Margin="5"
- VerticalAlignment="Center"
- IsChecked="{Binding IsEnableAI}"
- HorizontalAlignment="Center"></CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal"
- IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5"
- Text="检测模式"
- Width="120"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"></TextBlock>
- <ComboBox Margin="5"
- Width="230"
- VerticalAlignment="Center"
- SelectedValue="{Binding DetectMode}"
- SelectedValuePath="Tag"
- Cursor="Hand"
- HorizontalContentAlignment="Center">
- <ComboBoxItem Content="按每秒频次计算"
- Tag="TimesPerSecond" />
- <ComboBoxItem Content="按时间间隔计算"
- Tag="PeriodicIntervals" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal"
- IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5"
- Text="超声图像检测间隔"
- Width="120"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"></TextBlock>
- <StackPanel Orientation="Horizontal"
- Visibility="{Binding IsIntervalTimeMode,Converter={extensions:BoolToVisibilityConverter}}">
- <TextBox Height="25"
- Margin="5"
- Width="185"
- VerticalAlignment="Center"
- Text="{Binding IntervalTime}"
- HorizontalContentAlignment="Center" />
- <TextBlock Margin="5"
- Text="ms"
- VerticalAlignment="Center"
- Width="35" />
- </StackPanel>
- <ComboBox Width="230"
- VerticalAlignment="Center"
- SelectedValue="{Binding DetectTps}"
- SelectedValuePath="Content"
- Cursor="Hand"
- HorizontalContentAlignment="Center"
- Visibility="{Binding IsIntervalTimeMode,Converter={extensions:BoolToVisibilityConverter},ConverterParameter=Reverse}">
- <ComboBoxItem Content="1" />
- <ComboBoxItem Content="2" />
- <ComboBoxItem Content="3" />
- <ComboBoxItem Content="4" />
- <ComboBoxItem Content="5" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal"
- IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5"
- Text="AI识别类型"
- Width="120"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"></TextBlock>
- <ComboBox Margin="5"
- Width="230"
- VerticalAlignment="Center"
- SelectedValue="{Binding AIDiagnosisType}"
- SelectedValuePath="Tag"
- Cursor="Hand"
- HorizontalContentAlignment="Center">
- <ComboBoxItem Content="CustomizeDiagnosis"
- Tag="CustomizeDiagnosis" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal"
- IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5"
- Text="是否异步"
- Width="120"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"></TextBlock>
- <CheckBox Margin="5"
- VerticalAlignment="Center"
- IsChecked="{Binding IsAsync}"
- HorizontalAlignment="Center"></CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="5"
- Text="引擎详情"
- Width="120"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"></TextBlock>
- <DataGrid Margin="5"
- Width="300"
- Height="100"
- ItemsSource="{Binding CurrentEngineInfos}"
- AutoGenerateColumns="False"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- ScrollViewer.HorizontalScrollBarVisibility="Auto"
- ScrollViewer.VerticalScrollBarVisibility="Auto">
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="引擎名称"
- Width="*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding EngineName}"
- TextWrapping="Wrap"
- Margin="10,0,10,0" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="版本"
- Width="Auto">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Version}"
- TextWrapping="Wrap"
- Margin="10,0,10,0" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="提供方" Width="Auto">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Vendor}"
- TextWrapping="Wrap"
- Margin="10,0,10,0" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </StackPanel>
- </StackPanel>
- </GroupBox>
- </StackPanel>
- </ScrollViewer>
- <Grid Grid.Row="1"
- HorizontalAlignment="Center">
- <StackPanel Orientation="Horizontal"
- HorizontalAlignment="Center">
- <Button Margin="5"
- Height="25"
- Width="70"
- Content="保存并退出"
- Click="OnSaveAndExit" />
- </StackPanel>
- </Grid>
- </Grid>
- </Window>
|