|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
5 | 5 | xmlns:vm="using:WEventViewer.ViewModel"
|
6 | 6 | xmlns:local="using:WEventViewer"
|
7 |
| - mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="500" |
| 7 | + mc:Ignorable="d" d:DesignWidth="700" d:DesignHeight="600" |
8 | 8 | x:Class="WEventViewer.OpenLogWindow"
|
9 | 9 | x:DataType="vm:OpenLogWindowViewModel"
|
10 | 10 | Title="OpenLogWindow">
|
11 |
| - <Design.DataContext> |
12 |
| - <vm:OpenLogWindowViewModel/> |
13 |
| - </Design.DataContext> |
14 |
| - <Window.Resources> |
15 |
| - <vm:PathTypeValueConverter x:Key="PathTypeConverter"/> |
16 |
| - </Window.Resources> |
17 |
| - <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20"> |
18 |
| - <Grid.RowDefinitions> |
19 |
| - <RowDefinition Height="*"></RowDefinition> |
20 |
| - <RowDefinition Height="Auto"></RowDefinition> |
21 |
| - </Grid.RowDefinitions> |
22 |
| - <StackPanel Margin="10" Orientation="Vertical" Grid.Row="0" Name="OptionPanel"> |
23 |
| - <Grid HorizontalAlignment="Stretch" Grid.Row="0" VerticalAlignment="Center"> |
| 11 | + <Design.DataContext> |
| 12 | + <vm:OpenLogWindowViewModel/> |
| 13 | + </Design.DataContext> |
| 14 | + <Window.Resources> |
| 15 | + <vm:PathTypeValueConverter x:Key="PathTypeConverter"/> |
| 16 | + </Window.Resources> |
| 17 | + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20"> |
| 18 | + <Grid.RowDefinitions> |
| 19 | + <RowDefinition Height="*"></RowDefinition> |
| 20 | + <RowDefinition Height="Auto"></RowDefinition> |
| 21 | + </Grid.RowDefinitions> |
| 22 | + <Grid Margin="10" Grid.Row="0" Name="OptionPanel"> |
| 23 | + <Grid.RowDefinitions> |
| 24 | + <RowDefinition Height="Auto"/> |
| 25 | + <RowDefinition Height="Auto"/> |
| 26 | + <RowDefinition Height="*"/> |
| 27 | + </Grid.RowDefinitions> |
| 28 | + <Grid HorizontalAlignment="Stretch" Grid.Row="0" VerticalAlignment="Center"> |
24 | 29 | <Grid.ColumnDefinitions>
|
25 | 30 | <ColumnDefinition Width="Auto"/>
|
26 | 31 | <ColumnDefinition Width="*"/>
|
27 | 32 | <ColumnDefinition Width="Auto"/>
|
28 | 33 | </Grid.ColumnDefinitions>
|
29 |
| - <Label Content="LogName" |
| 34 | + <Label Content="LogName" |
30 | 35 | Margin="10,10,10,10"
|
31 | 36 | VerticalAlignment="Center"
|
32 |
| - HorizontalAlignment="Left" |
33 |
| - Grid.Column="0" |
| 37 | + HorizontalAlignment="Left" |
| 38 | + Grid.Column="0" |
34 | 39 | />
|
35 |
| - <TextBox HorizontalContentAlignment="Left" |
| 40 | + <TextBox HorizontalContentAlignment="Left" |
36 | 41 | VerticalContentAlignment="Center"
|
37 | 42 | HorizontalAlignment="Stretch"
|
38 | 43 | TextAlignment="Left"
|
|
41 | 46 | MinWidth="200" MaxWidth="1000"
|
42 | 47 | Grid.Column="1"
|
43 | 48 | />
|
44 |
| - <Button Name="OpenLogButton" |
45 |
| - Grid.Column="2" |
46 |
| - Content="Open" |
| 49 | + <Button Name="OpenLogButton" |
| 50 | + Grid.Column="2" |
| 51 | + Content="Open" |
47 | 52 | IsVisible="{Binding IsEnableFilePathOpenButton}"
|
48 |
| - Click="OnLogOpenButtonClicked"/> |
49 |
| - </Grid> |
50 |
| - <Grid HorizontalAlignment="Stretch" VerticalAlignment="Center"> |
| 53 | + IsEnabled="{Binding IsEnableFilePathOpenButton}" |
| 54 | + Click="OnLogOpenButtonClicked"/> |
| 55 | + <Button Name="OpenLogNameButton" |
| 56 | + Grid.Column="2" |
| 57 | + Content="Show LogName" |
| 58 | + IsVisible="{Binding IsOpenLogNameButtonEnabled}" |
| 59 | + IsEnabled="{Binding IsOpenLogNameButtonEnabled}" |
| 60 | + Click="OnShowLogNameClicked" |
| 61 | + /> |
| 62 | + </Grid> |
| 63 | + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Row="1"> |
51 | 64 | <Grid.ColumnDefinitions>
|
52 | 65 | <ColumnDefinition Width="Auto"/>
|
53 | 66 | <ColumnDefinition Width="Auto"/>
|
54 | 67 | </Grid.ColumnDefinitions>
|
55 |
| - <Label Content="PathType" |
| 68 | + <Label Content="PathType" |
56 | 69 | Margin="10,10,10,10"
|
57 | 70 | HorizontalAlignment="Left"
|
58 | 71 | VerticalAlignment="Center"
|
59 | 72 | Grid.Column="0"/>
|
60 |
| - <!--<TextBox Margin="10,10,10,10" |
| 73 | + <!--<TextBox Margin="10,10,10,10" |
61 | 74 | HorizontalAlignment="Stretch"
|
62 | 75 | TextAlignment="Left"
|
63 | 76 | VerticalContentAlignment="Center"
|
64 | 77 | Text="{Binding Path=PathType, Mode=TwoWay,Converter={StaticResource PathTypeConverter}}"/>-->
|
65 | 78 | <ComboBox
|
66 |
| - HorizontalAlignment="Stretch" |
67 |
| - Margin="10" |
68 |
| - ItemsSource="{Binding PathTypes}" |
69 |
| - SelectedValue="{Binding CurrentSelected}" |
70 |
| - Grid.Column="1" |
| 79 | + HorizontalAlignment="Stretch" |
| 80 | + Margin="10" |
| 81 | + ItemsSource="{Binding PathTypes}" |
| 82 | + SelectedValue="{Binding CurrentSelected}" |
| 83 | + Grid.Column="1" |
71 | 84 | >
|
72 |
| - <ComboBox.ItemTemplate> |
73 |
| - <DataTemplate> |
74 |
| - <Label Content="{Binding DisplayName}"/> |
75 |
| - </DataTemplate> |
76 |
| - </ComboBox.ItemTemplate> |
77 |
| - </ComboBox> |
78 |
| - </Grid> |
79 |
| - <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" VerticalAlignment="Stretch" MaxHeight="300" MaxWidth="{Binding #OptionPanel.Bounds.Width}"> |
80 |
| - <StackPanel Orientation="Vertical" Margin="10"> |
81 |
| - <CheckBox Name="UseRawQuery" Content="raw query" Margin="10" IsChecked="{Binding UseRawQuery}"/> |
82 |
| - <TextBox Name="RawQueryInput" Margin="10" Text="{Binding RawQuery}" IsEnabled="{Binding UseRawQuery}"/> |
83 |
| - <Border BorderThickness="1" BorderBrush="Gray"/> |
84 |
| - <StackPanel Orientation="Horizontal"> |
85 |
| - <CheckBox Content="Since:" IsChecked="{Binding UseBeginDate}" Margin="10"/> |
86 |
| - <DatePicker Name="BeginDate" SelectedDate="{Binding BeginDate}" IsEnabled="{Binding UseBeginDate}"/> |
87 |
| - <TimePicker Name="BeginTime" SelectedTime="{Binding BeginTime}" IsEnabled="{Binding UseBeginDate}"/> |
88 |
| - </StackPanel> |
89 |
| - <StackPanel Orientation="Horizontal"> |
90 |
| - <CheckBox Content="Until:" IsChecked="{Binding UseEndDate}" Margin="10"/> |
91 |
| - <DatePicker Name="EndDate" SelectedDate="{Binding EndDate}" IsEnabled="{Binding UseEndDate}"/> |
92 |
| - <TimePicker Name="EndTime" SelectedTime="{Binding EndTime}" IsEnabled="{Binding UseEndDate}"/> |
93 |
| - </StackPanel> |
94 |
| - <CheckBox Content="filter providers(separeted by ',')" Margin="10" IsChecked="{Binding UseProviderNames}"/> |
95 |
| - <TextBox Text="{Binding ProviderNames}" IsEnabled="{Binding UseProviderNames}"/> |
96 |
| - </StackPanel> |
97 |
| - </ScrollViewer> |
98 |
| - <!--<Expander Header="Advanced" Grid.Row="2" HorizontalAlignment="Stretch" MaxHeight="300"> |
| 85 | + <ComboBox.ItemTemplate> |
| 86 | + <DataTemplate> |
| 87 | + <Label Content="{Binding DisplayName}"/> |
| 88 | + </DataTemplate> |
| 89 | + </ComboBox.ItemTemplate> |
| 90 | + </ComboBox> |
| 91 | + </Grid> |
| 92 | + <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" VerticalAlignment="Stretch" Grid.Row="2"> |
| 93 | + <StackPanel Orientation="Vertical" Margin="10"> |
| 94 | + <CheckBox Name="UseRawQuery" Content="raw query" Margin="10" IsChecked="{Binding UseRawQuery}"/> |
| 95 | + <TextBox Name="RawQueryInput" Margin="10" Text="{Binding RawQuery}" IsEnabled="{Binding UseRawQuery}"/> |
| 96 | + <Border BorderThickness="1" BorderBrush="Gray"/> |
| 97 | + <StackPanel Orientation="Horizontal"> |
| 98 | + <CheckBox Content="Since:" IsChecked="{Binding UseBeginDate}" Margin="10"/> |
| 99 | + <DatePicker Name="BeginDate" SelectedDate="{Binding BeginDate}" IsEnabled="{Binding UseBeginDate}"/> |
| 100 | + <TimePicker Name="BeginTime" SelectedTime="{Binding BeginTime}" IsEnabled="{Binding UseBeginDate}"/> |
| 101 | + </StackPanel> |
| 102 | + <StackPanel Orientation="Horizontal"> |
| 103 | + <CheckBox Content="Until:" IsChecked="{Binding UseEndDate}" Margin="10"/> |
| 104 | + <DatePicker Name="EndDate" SelectedDate="{Binding EndDate}" IsEnabled="{Binding UseEndDate}"/> |
| 105 | + <TimePicker Name="EndTime" SelectedTime="{Binding EndTime}" IsEnabled="{Binding UseEndDate}"/> |
| 106 | + </StackPanel> |
| 107 | + <CheckBox Content="filter providers(separeted by ',')" Margin="10" IsChecked="{Binding UseProviderNames}"/> |
| 108 | + <Grid> |
| 109 | + <Grid.ColumnDefinitions> |
| 110 | + <ColumnDefinition Width="*"/> |
| 111 | + <ColumnDefinition Width="Auto"/> |
| 112 | + </Grid.ColumnDefinitions> |
| 113 | + <TextBox Text="{Binding ProviderNames}" IsEnabled="{Binding UseProviderNames}" Grid.Column="0" Margin="10"/> |
| 114 | + <Button Content="Show Providers" Grid.Column="1" Margin="10" Click="OnShowProviderNamesClicked"/> |
| 115 | + </Grid> |
| 116 | + <CheckBox Content="filter by level" Margin="10" IsChecked="{Binding UseFilterByLevel}"/> |
| 117 | + <StackPanel Orientation="Horizontal"> |
| 118 | + <CheckBox Content="Critical" Margin="10" IsChecked="{Binding IsCriticalChecked}" IsEnabled="{Binding UseFilterByLevel}"/> |
| 119 | + <CheckBox Content="Error" Margin="10" IsChecked="{Binding IsErrorChecked}" IsEnabled="{Binding UseFilterByLevel}"/> |
| 120 | + <CheckBox Content="Warning" Margin="10" IsChecked="{Binding IsWarningChecked}" IsEnabled="{Binding UseFilterByLevel}"/> |
| 121 | + <CheckBox Content="Information" Margin="10" IsChecked="{Binding IsInformationChecked}" IsEnabled="{Binding UseFilterByLevel}"/> |
| 122 | + <CheckBox Content="Verbose" Margin="10" IsChecked="{Binding IsVerboseChecked}" IsEnabled="{Binding UseFilterByLevel}"/> |
| 123 | + </StackPanel> |
| 124 | + </StackPanel> |
| 125 | + </ScrollViewer> |
| 126 | + <!--<Expander Header="Advanced" Grid.Row="2" HorizontalAlignment="Stretch" MaxHeight="300"> |
99 | 127 | </Expander>-->
|
100 |
| - </StackPanel> |
101 |
| - <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" VerticalAlignment="Bottom"> |
102 |
| - <Button Content="OK" Command="{ Binding OkCommand }" Margin="10" Padding="10"/> |
103 |
| - <Button Content="Cancel" Command="{ Binding CancelCommand }" Margin="10" Padding="10"/> |
104 |
| - </StackPanel> |
105 |
| - </Grid> |
| 128 | + </Grid> |
| 129 | + <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" VerticalAlignment="Bottom"> |
| 130 | + <Button Content="OK" Command="{ Binding OkCommand }" Margin="10" Padding="10"/> |
| 131 | + <Button Content="Cancel" Command="{ Binding CancelCommand }" Margin="10" Padding="10"/> |
| 132 | + </StackPanel> |
| 133 | + </Grid> |
106 | 134 | </Window>
|
0 commit comments