218 lines
9.5 KiB
XML
218 lines
9.5 KiB
XML
<Window x:Class="xunit.runner.wpf.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:xunit.runner.wpf"
|
|
xmlns:converters="clr-namespace:xunit.runner.wpf.Converters"
|
|
xmlns:vm="clr-namespace:xunit.runner.wpf.ViewModel"
|
|
mc:Ignorable="d"
|
|
DataContext="{Binding Main, Source={StaticResource Locator}}"
|
|
Title="xUnit.net Test Runner"
|
|
Icon="Artwork\xunit-dot-net-small-logo.png"
|
|
ResizeMode="CanResizeWithGrip"
|
|
Height="600"
|
|
Width="525">
|
|
|
|
<Window.Resources>
|
|
<converters:TestStateConverter x:Key="TestStateConverter" />
|
|
</Window.Resources>
|
|
|
|
<Grid local:CommandBindings.Registration="{Binding CommandBindings}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Menu Grid.Row="0">
|
|
<MenuItem Header="_File">
|
|
<MenuItem Header="E_xit"
|
|
Command="{Binding ExitCommand}" />
|
|
</MenuItem>
|
|
<MenuItem Header="_Assembly">
|
|
<MenuItem Header="_Open"
|
|
Command="ApplicationCommands.Open" />
|
|
<MenuItem Header="R_ecent" />
|
|
<Separator />
|
|
<MenuItem Header="_Unload" />
|
|
<MenuItem Header="_Reload" />
|
|
</MenuItem>
|
|
<MenuItem Header="_Project">
|
|
<MenuItem Header="_Open" />
|
|
<MenuItem Header="_Recent" />
|
|
<Separator />
|
|
<MenuItem Header="_Close" />
|
|
<Separator />
|
|
<MenuItem Header="_Save" />
|
|
<MenuItem Header="Save _As..." />
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="2*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<GroupBox Header="Refinements"
|
|
Margin="3"
|
|
Grid.Column="0"
|
|
Grid.Row="0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Content="Search:"
|
|
Grid.Row="0" />
|
|
<TextBox Grid.Row="1"
|
|
Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Label Content="Assemblies:"
|
|
Grid.Row="2" />
|
|
<ListBox Height="175"
|
|
ItemsSource="{Binding Assemblies}"
|
|
SelectionMode="Extended"
|
|
Grid.Row="3">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate DataType="vm:TestAssemblyViewModel">
|
|
<TextBlock Text="{Binding DisplayName}" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<Label Content="Traits:"
|
|
Grid.Row="4" />
|
|
<ListBox Grid.Row="5" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<Grid Grid.Column="0"
|
|
Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button Content="_Run All"
|
|
Command="{Binding RunCommand}"
|
|
Margin="3"
|
|
Grid.Column="0" />
|
|
<Button Content="_Cancel"
|
|
Command="{Binding CancelCommand}"
|
|
Margin="0,3,3,3"
|
|
Grid.Column="1" />
|
|
</Grid>
|
|
|
|
<Grid Grid.Column="1"
|
|
Grid.Row="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<GroupBox Header="{Binding MethodsCaption}"
|
|
Margin="3"
|
|
Grid.Row="0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<RadioButton IsChecked="{Binding IsPassedFilterChecked}"
|
|
Margin="3">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="Artwork\Passed.ico"
|
|
Height="16" />
|
|
<TextBlock Text="{Binding TestsPassed}" />
|
|
</StackPanel>
|
|
</RadioButton>
|
|
<RadioButton IsChecked="{Binding IsFailedFilterChecked}"
|
|
Margin="3"
|
|
Grid.Column="1">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="Artwork\Failed.ico"
|
|
Height="16" />
|
|
<TextBlock Text="{Binding TestsFailed}" />
|
|
</StackPanel>
|
|
</RadioButton>
|
|
<RadioButton IsChecked="{Binding IsSkippedFilterChecked}"
|
|
Margin="3"
|
|
Grid.Column="2">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="Artwork\Skipped.ico"
|
|
Height="16" />
|
|
<TextBlock Text="{Binding TestsSkipped}" />
|
|
</StackPanel>
|
|
</RadioButton>
|
|
</Grid>
|
|
<ListBox ItemsSource="{Binding TestCases}"
|
|
SelectionMode="Extended"
|
|
Grid.Row="1">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate DataType="vm:TestCaseViewModel">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="20" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Width="16"
|
|
Margin="2"
|
|
Source="{Binding Path=State, Mode=OneWay, Converter={StaticResource TestStateConverter}}"
|
|
Grid.Column="0" />
|
|
<TextBlock Text="{Binding DisplayName}"
|
|
Grid.Column="1" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GridSplitter Grid.Row="1" />
|
|
|
|
<GroupBox Header="Output"
|
|
Margin="3"
|
|
Grid.Row="2">
|
|
<TextBox IsReadOnly="True" />
|
|
</GroupBox>
|
|
</Grid>
|
|
|
|
<ProgressBar Foreground="{Binding Path=CurrentRunState, Converter={StaticResource TestStateConverter}, Mode=OneWay}"
|
|
Minimum="0"
|
|
Maximum="{Binding MaximumProgress}"
|
|
Value="{Binding Path=TestsCompleted}"
|
|
Grid.Column="1"
|
|
Grid.Row="1"
|
|
Margin="3" />
|
|
</Grid>
|
|
|
|
<StackPanel Grid.Row="2">
|
|
<Border BorderBrush="LightGray"
|
|
BorderThickness="1"
|
|
Margin="3" />
|
|
<StatusBar>
|
|
<StatusBarItem>
|
|
<Label />
|
|
</StatusBarItem>
|
|
</StatusBar>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|