123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <UserControl x:Class="PLCTool.Views.MonitorManageView.LogView"
- 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:PLCTool.Views.MonitorManageView"
- xmlns:nlog ="clr-namespace:NlogViewer;assembly=NlogViewer"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <!--<UserControl.Resources>
- <Style TargetType="nlog:NlogViewer">
-
- </Style>
- </UserControl.Resources>-->
- <Grid>
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Loaded">
- <b:InvokeCommandAction Command="{Binding OnLoadCommand}"/>
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="40"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Horizontal">
- <Button Content="开始监控" Margin="5,0" Command="{Binding StartCommand}" Style="{StaticResource NormalButtonStyle}" IsChecked="True"/>
- <Button Content="停止监控" Margin="5,0" Command="{Binding StopCommand}" Style="{StaticResource NormalButtonStyle}" />
- <Button Content="清理Log" Margin="5,0" Command="{Binding CleanCommand}" Style="{StaticResource NormalButtonStyle}" />
- </StackPanel>
- <TextBlock Grid.Row="1" Text="实时运行日志 :" Style="{StaticResource NormalTextBlockStyle}" FontSize="15" Margin="5,0"/>
- <Grid Grid.Row="2">
- <ListBox ItemsSource="{Binding LogMessages}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock Text="{Binding}" />
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </Grid>
- </UserControl>
|