123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <Window x:Class="Flyinsono.Client.Test.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:Flyinsono.Client.Test"
- xmlns:extensions="clr-namespace:Flyinsono.Client.Test.Extensions"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="800">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="0.9*"/>
- <RowDefinition Height="0.1*"/>
- </Grid.RowDefinitions>
- <GroupBox Header="Log Info" Margin="7">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Button HorizontalAlignment="Right" Margin="0,7" Content="清理日志" Command="{Binding ClearLogCommand}" Style="{StaticResource CommonButtonStyle}"/>
- <ListBox Grid.Row="1" Margin="7" x:Name="logList" ItemsSource="{Binding LogItems}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Content}" TextWrapping="Wrap" Foreground="{Binding LogLevel, Converter={extensions:LogLevelToColorConvertExtension}}" />
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </GroupBox>
- <Grid Grid.Row="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"></RowDefinition>
- <RowDefinition Height="Auto"></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <Label VerticalAlignment="Center">Host:</Label>
- <TextBox Text="{Binding HostUrl}"></TextBox>
- <Label VerticalAlignment="Center">User Count:</Label>
- <TextBox Text="{Binding UserCount}"></TextBox>
-
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Horizontal">
- <Label VerticalAlignment="Center">Message:</Label>
- <TextBox Text="{Binding Message}" MinWidth="340"></TextBox>
- <Button Command="{Binding ConnectCommand}">Run</Button>
- <Button Command="{Binding ExitCommand}">Close</Button>
- </StackPanel>
- </Grid>
-
- </Grid>
- </Window>
|