-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
77 lines (74 loc) · 4.94 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<Window x:Class="Sitegeist.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:Sitegeist"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid Margin="0,0,2,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button x:Name="btnRun" Click="btnRun_Click" Content="Button" Grid.Row="0" Grid.Column="0" Width="75" Margin="12,0"/>
<TextBlock Grid.Column="2" x:Name="txtURL" ></TextBlock>
<DataGrid Grid.Column="1" Grid.Row="1" x:Name="dgResults" AutoGenerateColumns="False" >
<DataGrid.Columns>
<DataGridTextColumn Header="Summary" Binding="{Binding Summary, Mode=OneWay}"/>
<DataGridCheckBoxColumn Header="Was ok" Binding="{Binding WasOk, Mode=OneWay}"/>
<DataGridTextColumn Header="Actions" Binding="{Binding Actions, Mode=OneWay}"/>
<DataGridTextColumn Header="Action Errors" Binding="{Binding ActionErrors, Mode=OneWay}"/>
<DataGridTextColumn Header="Expects" Binding="{Binding Expects, Mode=OneWay}"/>
<DataGridTextColumn Header="Met Expect" Binding="{Binding MetExpects, Mode=OneWay}"/>
<DataGridTextColumn Header="Expect Errors" Binding="{Binding ExpectErrors, Mode=OneWay}"/>
<DataGridTextColumn Header="Starting URL" Binding="{Binding StartingURL, Mode=OneWay}"/>
<DataGridTextColumn Header="Ending URL" Binding="{Binding EndingURL, Mode=OneWay}"/>
</DataGrid.Columns>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<StackPanel>
<DataGrid ItemsSource="{Binding ActionResults,Mode=OneTime}" AutoGenerateColumns="False" Visibility="{Binding HasAction}">
<DataGrid.Columns>
<DataGridTextColumn Header="Action Type" Binding="{Binding ActionType, Mode=OneWay}"/>
<DataGridTextColumn Header="Target" Binding="{Binding Target.Path, Mode=OneWay}"/>
<DataGridTemplateColumn Header="Parameters">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<ListView ItemsSource="{Binding ActionArguments}"></ListView>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Exception" Binding="{Binding ActionException.Message, Mode=OneWay}"/>
</DataGrid.Columns>
</DataGrid>
<DataGrid ItemsSource="{Binding ExpectResults,Mode=OneTime}" AutoGenerateColumns="False" Visibility="{Binding HasExcept}">
<DataGrid.Columns>
<DataGridTextColumn Header="Expect Type" Binding="{Binding ExpectType, Mode=OneWay}"/>
<DataGridTextColumn Header="Target" Binding="{Binding Target.Path, Mode=OneWay}"/>
<DataGridCheckBoxColumn Header="Met Expection" Binding="{Binding MetExpectation, Mode=OneWay}"/>
<DataGridTextColumn Header="Message" Binding="{Binding Message, Mode=OneWay}"/>
<DataGridTemplateColumn Header="Parameters">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<ListView ItemsSource="{Binding EpectArguments}"></ListView>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Error" Binding="{Binding EpectException.Message, Mode=OneWay}"/>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
</Grid>
</Window>