123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <Window x:Class="AIDiagnosisDemo.Presentation.MainWindow"
- 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"
- mc:Ignorable="d"
- Title="AI诊断" Height="450" Width="800" WindowStartupLocation="CenterScreen" WindowState="Maximized"
- WindowStyle="None" AllowsTransparency="True" StateChanged="Window_StateChanged">
- <Window.Resources>
- <Style x:Key="CaptionButtonStyleKey" TargetType="{x:Type Button}">
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Setter Property="Foreground" Value="Black" />
- <Setter Property="FontFamily" Value="Marlett" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="IsTabStop" Value="False" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Margin" Value="2" />
- <Setter Property="Padding" Value="1" />
- <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="border" Background="Transparent" SnapsToDevicePixels="True">
- <Border.Effect>
- <DropShadowEffect Opacity="0" />
- </Border.Effect>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border">
- <EasingDoubleKeyFrame KeyTime="0" Value="0.6" />
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="MouseOver">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border">
- <EasingDoubleKeyFrame KeyTime="0" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Pressed">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border">
- <EasingDoubleKeyFrame KeyTime="0" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)" Storyboard.TargetName="border">
- <EasingDoubleKeyFrame KeyTime="0" Value="0" />
- </DoubleAnimationUsingKeyFrames>
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Color)" Storyboard.TargetName="border">
- <EasingColorKeyFrame KeyTime="0" Value="White" />
- </ColorAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Opacity)" Storyboard.TargetName="border">
- <EasingDoubleKeyFrame KeyTime="0" Value="0.6" />
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Disabled" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <ContentPresenter x:Name="contentPresenter" Focusable="False" Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- </Style>
- </Window.Resources>
- <WindowChrome.WindowChrome>
- <WindowChrome CaptionHeight="{x:Static SystemParameters.CaptionHeight}"
- ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" CornerRadius="4" />
- </WindowChrome.WindowChrome>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="4*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Row="0" Grid.ColumnSpan="2">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
- <Image Source="/AIDiagnosisDemo;component/App.ico" Width="30" VerticalAlignment="Bottom" Margin="10,0,0,0" />
- <TextBlock Text="AI诊断" VerticalAlignment="Bottom" FontSize="16" Margin="0,0,10,2" />
- <Border BorderThickness="1" Width="1" BorderBrush="Black" Height="20" VerticalAlignment="Bottom" />
- <Button Click="OnOpenSettingWindow" Background="Transparent" BorderThickness="0" VerticalAlignment="Bottom" Width="30" Margin="10,10,0,0"
- WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="系统设置" Cursor="Hand">
- <Button.Template>
- <ControlTemplate>
- <Image Source="../Resources/Images/Setting.png" />
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,15,0">
- <Button Content="0" Style="{DynamicResource CaptionButtonStyleKey}" Click="OnMinClick" />
- <Button x:Name="MaxButton" Content="1" Style="{DynamicResource CaptionButtonStyleKey}" Click="OnMaxClick" />
- <Button x:Name="RestoreButton" Content="2" Style="{DynamicResource CaptionButtonStyleKey}" Click="OnRestoreClick" />
- <Button Content="r" Style="{DynamicResource CaptionButtonStyleKey}" Click="OnCloseClick" />
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="0" Margin="5,5,0,5" Background="Black" SizeChanged="CanvasSizeChanged" MouseMove="Grid_MouseMove" MouseLeave="Grid_MouseLeave">
- <Image x:Name="UsImage" Margin="5" ></Image>
- <Canvas x:Name="UsCanvas" Margin="5"></Canvas>
- <Button x:Name="PlayButton" Margin="10" Width="70" Height="70" Click="OnPlayClick" VerticalAlignment="Bottom" HorizontalAlignment="Right"
- Visibility="Collapsed">
- <Button.Template>
- <ControlTemplate>
- <Image Source="../Resources/Images/Play.png" />
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="PauseButton" Margin="10" Width="70" Height="70" Click="OnPauseClick" VerticalAlignment="Bottom" HorizontalAlignment="Right"
- Visibility="Collapsed">
- <Button.Template>
- <ControlTemplate>
- <Image Source="../Resources/Images/Pause.png" />
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="1" Margin="5,0,5,10">
- <Border Margin="5" CornerRadius="7" BorderThickness="1" BorderBrush="Black">
- <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <ToggleButton Grid.Row="0" Content="心肌提取内轮廓" Click="OnExtractContours" x:Name="ExtractContoursBtn" Height="25"
- Width="100" Margin="5" HorizontalAlignment="Left"/>
- <StackPanel Grid.Row="1">
- <TextBlock x:Name="UsedStatusText" Margin="5" FontSize="15" TextWrapping="Wrap"/>
- <TextBlock x:Name="FPSText" Margin="5" FontSize="15" TextWrapping="Wrap"/>
- <TextBlock x:Name="ElapsedTimeText" Margin="5" FontSize="15" TextWrapping="Wrap"/>
- </StackPanel>
- <TextBlock x:Name="ResultInfoText" Margin="5" FontSize="15" TextWrapping="Wrap" Grid.Row="2" />
- <TextBlock x:Name="ErrorInfoText" Margin="5" FontSize="15" TextWrapping="Wrap" Grid.Row="3" />
- </Grid>
- </ScrollViewer>
- </Border>
- </Grid>
- </Grid>
- </Window>
|