74 行
4.1 KiB
XML
74 行
4.1 KiB
XML
<Window x:Class="ProxyForge.Views.GenerationPopupView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:views="clr-namespace:ProxyForge.Views"
|
|
xmlns:local="clr-namespace:ProxyForge.Localization"
|
|
Title="{x:Static local:Translate.GenerationPopupWindowTitle}"
|
|
Width="380" MinWidth="380" MinHeight="120" MaxHeight="640"
|
|
WindowStyle="ToolWindow" ShowInTaskbar="False" Topmost="False"
|
|
ResizeMode="CanResize" SizeToContent="Height" WindowStartupLocation="Manual"
|
|
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
|
|
<Window.Resources>
|
|
<views:InvertBoolToVisibilityConverter x:Key="InvertBoolToVis"/>
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
|
|
|
<Style x:Key="ThinScrollBar" TargetType="ScrollViewer">
|
|
<Style.Resources>
|
|
<Style TargetType="ScrollBar">
|
|
<Setter Property="Width" Value="6"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="Orientation" Value="Horizontal">
|
|
<Setter Property="Height" Value="6"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Style.Resources>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid Margin="8">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Text="{x:Static local:Translate.GenerationPopupHeader}"
|
|
FontSize="13" FontWeight="SemiBold" Margin="0,0,0,6"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Style="{StaticResource ThinScrollBar}" MaxHeight="500">
|
|
<Grid>
|
|
<ItemsControl ItemsSource="{Binding Items}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Margin="0,4">
|
|
<Grid>
|
|
<TextBlock Text="{Binding FileName}" FontSize="11" TextTrimming="CharacterEllipsis"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
<TextBlock Text="{Binding StorageText}" FontSize="10" HorizontalAlignment="Right"
|
|
Opacity="0.6"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
</Grid>
|
|
<Grid Height="18" Margin="0,2,0,0">
|
|
<ProgressBar Minimum="0" Maximum="100" Value="{Binding Progress, Mode=OneWay}"/>
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}">
|
|
<Run Text="{Binding ProgressText, Mode=OneWay}"/>
|
|
<Run Text=" " Foreground="Gray"/>
|
|
<Run Text="{Binding StatusMessage, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
</Grid>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<TextBlock Text="{x:Static local:Translate.GenerationPopupNoActiveItems}" FontSize="11"
|
|
Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Visibility="{Binding HasItems, Converter={StaticResource InvertBoolToVis}}"/>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
|
</Window> |