134 lines
8.9 KiB
XML
134 lines
8.9 KiB
XML
<Window x:Class="AutoUpdateEx.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:AutoUpdateEx"
|
|
mc:Ignorable="d"
|
|
Title="系统更新" Height="600" Width="800" Topmost="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize"
|
|
WindowStyle="None" AllowsTransparency="True" Margin="2" Background="White" Loaded="Window_Loaded">
|
|
<Window.Resources>
|
|
<Style TargetType="{x:Type ProgressBar}">
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
<Setter Property="Height" Value="15"/>
|
|
<Setter Property="Background" Value="#FF1E7AD6"/>
|
|
<Setter Property="FontSize" Value="10"/>
|
|
<Setter Property="Padding" Value="5,0"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ProgressBar}">
|
|
<Grid Background="#00000000">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Determinate"/>
|
|
<VisualState x:Name="Indeterminate">
|
|
<Storyboard RepeatBehavior="Forever">
|
|
<PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
|
|
<EasingPointKeyFrame KeyTime="0:0:0" Value="0.5,0.5"/>
|
|
<EasingPointKeyFrame KeyTime="0:0:1.5" Value="1.95,0.5"/>
|
|
<EasingPointKeyFrame KeyTime="0:0:3" Value="0.5,0.5"/>
|
|
</PointAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Grid Height="{TemplateBinding Height}">
|
|
<Border Background="#000000" CornerRadius="5" Opacity="0.05"/>
|
|
<Border BorderBrush="#000000" BorderThickness="1" CornerRadius="5" Opacity="0.1"/>
|
|
<Grid Margin="{TemplateBinding BorderThickness}">
|
|
<Border x:Name="PART_Track"/>
|
|
<Grid x:Name="PART_Indicator" ClipToBounds="True" HorizontalAlignment="Left" >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="width1"/>
|
|
<ColumnDefinition x:Name="width2" Width="0"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid x:Name="Animation" RenderTransformOrigin="0.5,0.5">
|
|
<Grid.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform ScaleY="-1" ScaleX="1"/>
|
|
<SkewTransform AngleY="0" AngleX="0"/>
|
|
<RotateTransform Angle="180"/>
|
|
<TranslateTransform/>
|
|
</TransformGroup>
|
|
</Grid.RenderTransform>
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="5">
|
|
<Viewbox HorizontalAlignment="Left" StretchDirection="DownOnly" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
|
<TextBlock Foreground="#ffffff" SnapsToDevicePixels="True" FontSize="{TemplateBinding FontSize}" VerticalAlignment="Center"
|
|
Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=Value,StringFormat={}{0:##0.##}%}" RenderTransformOrigin="0.5,0.5">
|
|
<TextBlock.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform ScaleY="1" ScaleX="-1"/>
|
|
<SkewTransform AngleY="0" AngleX="0"/>
|
|
<RotateTransform Angle="0"/>
|
|
<TranslateTransform/>
|
|
</TransformGroup>
|
|
</TextBlock.RenderTransform>
|
|
</TextBlock>
|
|
</Viewbox>
|
|
</Border>
|
|
<Border BorderBrush="#000000" BorderThickness="1" CornerRadius="5" Opacity="0.1"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" Value="#c5c5c5"/>
|
|
</Trigger>
|
|
<Trigger Property="IsIndeterminate" Value="true">
|
|
<Setter TargetName="width1" Property="Width" Value="0.25*"/>
|
|
<Setter TargetName="width2" Property="Width" Value="0.725*"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Resources>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="124*"/>
|
|
<ColumnDefinition Width="43*"/>
|
|
<ColumnDefinition Width="98*"/>
|
|
<ColumnDefinition Width="136*"/>
|
|
<ColumnDefinition Width="128*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="211*"/>
|
|
<RowDefinition Height="401*"/>
|
|
<RowDefinition Height="34*"/>
|
|
<RowDefinition Height="96*"/>
|
|
<RowDefinition Height="26*"/>
|
|
</Grid.RowDefinitions>
|
|
<Image x:Name="imgAd" Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="5" Source="Component/CarouselFigure/Group1/1.png" VerticalAlignment="Top" Height="536"/>
|
|
<Grid Grid.Row="3" Grid.ColumnSpan="5" Margin="0,0,0,0" Height="30" VerticalAlignment="Top" >
|
|
<ProgressBar x:Name ="downProgress" Height="24" Margin="64,0,64,0" VerticalAlignment="Center" Value="{Binding ProgressValue}" Foreground="#CC1E7AD6"
|
|
Opacity="0.8" IsTabStop="False" BorderThickness="0" BorderBrush="#FF6BABE8" FontSize="16"/>
|
|
|
|
</Grid>
|
|
<TextBlock Name="txtMsg" Text="{Binding Message}" Margin="64,0" VerticalAlignment="Center" Padding="1,0,0,0"
|
|
TextAlignment="Left" Grid.Row="2" Grid.ColumnSpan="5" FontSize="16"/>
|
|
<TextBlock Name="SoftName" Text="驿商统一收银系统" TextAlignment="Center" Margin="0,48,3,0" VerticalAlignment="Top"
|
|
FontSize="28" Grid.ColumnSpan="3" Grid.Column="1" Padding="0,5" Height="46" Background="Transparent" Visibility="Collapsed">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect Color="#0074BA" BlurRadius="5" ShadowDepth="3" Opacity="2" />
|
|
</TextBlock.Effect>
|
|
<TextBlock.Foreground>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<LinearGradientBrush.GradientStops>
|
|
<GradientStop Offset="0.0" Color="#FFFFFFFF" />
|
|
<GradientStop Offset="2.0" Color="#0074BA" />
|
|
</LinearGradientBrush.GradientStops>
|
|
</LinearGradientBrush>
|
|
</TextBlock.Foreground>
|
|
</TextBlock>
|
|
<TextBlock x:Name="Ver" Grid.Column="4" Grid.Row="4" Text="Ver 2.0.0.4" VerticalAlignment="Center" TextAlignment="Right" Margin="5"/>
|
|
</Grid>
|
|
</Window>
|