2024-03-21 22:43:09 +00:00
|
|
|
<Window x:Class="UrlTester.MainWindow"
|
2024-03-21 22:24:29 +00:00
|
|
|
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"
|
2024-03-21 22:42:08 +00:00
|
|
|
xmlns:local="clr-namespace:DT3"
|
2024-03-21 22:24:29 +00:00
|
|
|
mc:Ignorable="d"
|
2024-03-22 01:00:04 +00:00
|
|
|
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
2024-03-21 22:42:32 +00:00
|
|
|
Title="MainWindow"
|
|
|
|
Height="450"
|
|
|
|
Width="800">
|
2024-03-21 23:08:20 +00:00
|
|
|
<Window.Resources>
|
|
|
|
<Style x:Key="CommonStyle" TargetType="FrameworkElement">
|
|
|
|
<Setter Property="Margin" Value="10" />
|
|
|
|
</Style>
|
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource CommonStyle}">
|
|
|
|
<Setter Property="Padding"
|
2024-03-21 23:43:26 +00:00
|
|
|
Value="15,0,15,0" />
|
2024-03-21 23:08:20 +00:00
|
|
|
</Style>
|
|
|
|
<Style TargetType="TextBox" BasedOn="{StaticResource CommonStyle}" />
|
2024-03-21 23:43:26 +00:00
|
|
|
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonStyle}" />
|
|
|
|
<Style TargetType="ProgressBar" BasedOn="{StaticResource CommonStyle}">
|
|
|
|
<Setter Property="Height"
|
|
|
|
Value="20" />
|
|
|
|
</Style>
|
2024-03-21 23:08:20 +00:00
|
|
|
</Window.Resources>
|
|
|
|
<Border>
|
2024-03-21 22:42:32 +00:00
|
|
|
<Grid>
|
|
|
|
<StackPanel Orientation="Vertical">
|
2024-03-21 23:08:20 +00:00
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
2024-03-21 23:25:00 +00:00
|
|
|
<Button Content="GetUrl"
|
|
|
|
IsDefault="true"
|
|
|
|
Click="GetUrl" />
|
|
|
|
<TextBox Grid.Column="2"
|
|
|
|
x:Name="urlBox" />
|
2024-03-21 23:08:20 +00:00
|
|
|
</Grid>
|
2024-03-21 22:42:32 +00:00
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-03-21 23:08:20 +00:00
|
|
|
<StackPanel.Resources>
|
|
|
|
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonStyle}">
|
|
|
|
<Setter Property="Background"
|
|
|
|
Value="LightGray" />
|
|
|
|
<Setter Property="Width"
|
|
|
|
Value="150" />
|
|
|
|
<Setter Property="Padding"
|
|
|
|
Value="5"/>
|
|
|
|
</Style>
|
|
|
|
</StackPanel.Resources>
|
2024-03-22 01:00:04 +00:00
|
|
|
<TextBlock Text="{Binding Size, StringFormat={}{0} bytes}" />
|
|
|
|
<TextBlock Text="{Binding Time, StringFormat={}{0} ms}" />
|
2024-03-21 22:42:32 +00:00
|
|
|
</StackPanel>
|
2024-03-21 23:43:26 +00:00
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition />
|
|
|
|
<RowDefinition />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ProgressBar x:Name="timeBar"
|
|
|
|
Minimum="0"
|
|
|
|
Maximum="1000"
|
2024-03-22 01:00:04 +00:00
|
|
|
Value="{Binding Time}"
|
2024-03-21 23:43:26 +00:00
|
|
|
Grid.ColumnSpan="3" />
|
|
|
|
<TextBlock Grid.Row="1"
|
|
|
|
Grid.Column="1"
|
|
|
|
TextAlignment="Center"
|
|
|
|
Text="500 ms" />
|
|
|
|
<TextBlock Grid.Row="1"
|
|
|
|
Grid.Column="2"
|
|
|
|
TextAlignment="Right"
|
|
|
|
Text="1000 ms" />
|
|
|
|
</Grid>
|
2024-03-21 22:42:32 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
2024-03-21 22:24:29 +00:00
|
|
|
</Window>
|