You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
223 lines
11 KiB
223 lines
11 KiB
<UserControl x:Class="AIK.Views.MenuPages.CloudData.CloudDataPage"
|
|
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:AIK.Views.MenuPages.CloudData"
|
|
mc:Ignorable="d"
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:behaviors="clr-namespace:AIK.Behaviors;assembly=AIK.Behaviors"
|
|
xmlns:convert="clr-namespace:AIK.Views.Converters"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<UserControl.Resources>
|
|
<convert:BoolToVisibilityInverseConverter x:Key="BoolToVisibilityInverseConverter"/>
|
|
<!-- 步骤框样式 -->
|
|
<Style x:Key="StepBorderStyle" TargetType="Border">
|
|
<Setter Property="Width" Value="120"/>
|
|
<Setter Property="Height" Value="100"/>
|
|
<Setter Property="Background" Value="#FFFFFF"/>
|
|
<Setter Property="BorderBrush" Value="#E3F2FD"/>
|
|
<Setter Property="BorderThickness" Value="2"/>
|
|
<Setter Property="CornerRadius" Value="12"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive}" Value="True">
|
|
<Setter Property="Background" Value="#E8F5E9"/>
|
|
<Setter Property="BorderBrush" Value="#4CAF50"/>
|
|
<Setter Property="BorderThickness" Value="3"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- 步骤图标样式 -->
|
|
<Style x:Key="StepIconStyle" TargetType="TextBlock">
|
|
<Setter Property="FontFamily" Value="{StaticResource Iconfont}"/>
|
|
<Setter Property="FontSize" Value="46"/>
|
|
<Setter Property="Foreground" Value="#2196F3"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive}" Value="True">
|
|
<Setter Property="Foreground" Value="#4CAF50"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- 步骤文字样式 -->
|
|
<Style x:Key="StepLabelStyle" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#2196F3"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,8,0,0"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive}" Value="True">
|
|
<Setter Property="Foreground" Value="#4CAF50"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- 连接线样式 -->
|
|
<Style x:Key="ConnectorLineStyle" TargetType="Rectangle">
|
|
<Setter Property="Height" Value="3"/>
|
|
<Setter Property="Width" Value="110"/>
|
|
<Setter Property="Fill" Value="#E3F2FD"/>
|
|
<Setter Property="Margin" Value="10,0"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive}" Value="True">
|
|
<Setter Property="Fill" Value="#4CAF50"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- 按钮样式 -->
|
|
<Style x:Key="ModernButtonStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="#2196F3"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="25,12"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Margin" Value="15,5"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}"
|
|
CornerRadius="6"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#1976D2"/>
|
|
<Setter Property="RenderTransform">
|
|
<Setter.Value>
|
|
<ScaleTransform ScaleX="1.05" ScaleY="1.05"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" Value="#1565C0"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<!-- 提示语小标题样式 -->
|
|
<Style x:Key="HintTitleStyle" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#546E7A"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
|
<Setter Property="Margin" Value="0,0,0,5"/>
|
|
</Style>
|
|
|
|
<!-- 提示语正文样式 -->
|
|
<Style x:Key="HintContentStyle" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#78909C"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="Normal"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
|
<Setter Property="LineHeight" Value="20"/>
|
|
<Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Grid Margin="10,10,20,10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="200"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 标题 -->
|
|
<TextBlock Grid.Row="0" Text="{DynamicResource CloudData}"
|
|
Foreground="#1976D2"
|
|
FontSize="32"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,40"
|
|
TextAlignment="Center"/>
|
|
<!-- 提示语区域 -->
|
|
<Border Grid.Row="1"
|
|
Background="#F5F7F9"
|
|
BorderBrush="#E0E0E0"
|
|
BorderThickness="1"
|
|
CornerRadius="8"
|
|
Padding="20,15"
|
|
Margin="0,0,0,30">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource HintTitleStyle}"
|
|
Text="{DynamicResource CloudDataSyncTitle}"/>
|
|
<!--<TextBlock Style="{StaticResource HintContentStyle}"
|
|
Text="操作方式"/>-->
|
|
<TextBlock Style="{StaticResource HintContentStyle}"
|
|
Text="{DynamicResource CloudDataSyncHint}"/>
|
|
<TextBlock Style="{StaticResource HintContentStyle}"
|
|
Text="{DynamicResource CloudDataSyncPowerHint}"/>
|
|
<!--<TextBlock Style="{StaticResource HintContentStyle}"
|
|
Text="{DynamicResource CloudDataSyncReminder}" Foreground="Red"/>-->
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="3">
|
|
<TextBlock Text="{Binding HidDeviceStatus.DeviceStatusIcon}"
|
|
FontFamily="{StaticResource Iconfont}"
|
|
FontSize="20"
|
|
VerticalAlignment="Center"
|
|
Foreground="{Binding HidDeviceStatus.DeviceStatusColor}"
|
|
Margin="0,0,4,0"/>
|
|
<TextBlock Text="{Binding HidDeviceStatus.DeviceStatusText, TargetNullValue='未连接'}"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
<!--<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="K3TOOL 状态:"></TextBlock>
|
|
<TextBlock Text="{Binding StatusMessage}" Visibility="{Binding IsShowStatusMessage,Converter={StaticResource BoolToVisibilityConverter},ConverterParameter=inverse}" Foreground="Green"></TextBlock>
|
|
<TextBlock Text="{Binding StatusMessage}" Foreground="Red" Visibility="{Binding IsShowStatusMessage,Converter={StaticResource BoolToVisibilityConverter}}"></TextBlock>
|
|
</StackPanel>-->
|
|
|
|
</StackPanel>
|
|
</Border>
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,20">
|
|
|
|
<!--<Button Command="{Binding OpenUDiskCommand}"
|
|
Style="{StaticResource ModernButtonStyle}"
|
|
Content="{DynamicResource OpenUDiskTest}"
|
|
Width="160"/>
|
|
<Button Command="{Binding CloseUDiskCommand}"
|
|
Style="{StaticResource ModernButtonStyle}"
|
|
Content="{DynamicResource CloseUDiskTest}"
|
|
Width="160"/>
|
|
<Button Command="{Binding SelectFileCommand}"
|
|
Style="{StaticResource ModernButtonStyle}"
|
|
Content="{DynamicResource SelectFileButton}"
|
|
Width="160"/>
|
|
|
|
<Button Command="{Binding SelectFolderCommand}"
|
|
Style="{StaticResource ModernButtonStyle}"
|
|
Content="{DynamicResource SelectFolderButton}"
|
|
Width="160"/>
|
|
<Button Command="{Binding KeepDeviceAliveCommand}"
|
|
Style="{StaticResource ModernButtonStyle}"
|
|
Content="{DynamicResource KeepDeviceAlive}"
|
|
Width="160"/>-->
|
|
<Button Command="{Binding SyncCloudDataCommand}"
|
|
Style="{StaticResource ModernButtonStyle}"
|
|
ToolTip="{DynamicResource SyncCloudData}"
|
|
Width="180">
|
|
<Button.Content>
|
|
<TextBlock Text="{DynamicResource SyncCloudData}"
|
|
TextWrapping="NoWrap"
|
|
TextTrimming="CharacterEllipsis"
|
|
HorizontalAlignment="Center"
|
|
MaxWidth="150"/>
|
|
</Button.Content>
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|
|
|