1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <Window x:Class="PRSServer.LogSearcher"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PRSServer"
- mc:Ignorable="d"
- Title="Log Searcher" Height="800" Width="1200">
- <Window.DataContext><local:logsearcherViewModel x:Name="ViewModel"/></Window.DataContext>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="4*"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
-
- <TextBox Grid.Row="0" Grid.Column="0" Padding="2" Text="Keyword" BorderThickness="0" />
- <TextBox Grid.Row="0" Grid.Column="5" Padding="2" Text="Lines Before/After" BorderThickness="0" />
-
- <TextBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="keywordBox" Text="{Binding SearchString}" Padding="2" TextBox.Margin="2" Background="LightYellow"/>
- <Button Grid.Row="1" Grid.Column="2" Content="Search" x:Name="searchButton" Command="{Binding SearchCommand}" Padding="2" Button.Margin="2"/>
- <TextBox Grid.Row="1" Grid.Column="3" Text="{Binding LineBuffer}" x:Name="LineBuffer" Padding="2" TextBox.Margin="2" Background="LightYellow"/>
-
- <ListBox ItemsSource="{Binding Output}" x:Name="outputBox" Grid.Row="2" Padding="2" ListBox.Margin="2" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="{Binding LineData}" Grid.Column="0" />
- <TextBlock Text="{Binding Path=DisplayData}" Grid.Column="1">
- <TextBlock.InputBindings>
- <MouseBinding Command="{Binding OpenFileCommand}" MouseAction="LeftClick" />
- </TextBlock.InputBindings>
- </TextBlock>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <ListBox ItemsSource="{Binding FileInfo}" x:Name="ViewerList" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" Padding="2" ListBox.Margin="2" />
- </Grid>
- </Window>
|