XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEToolBox

【WPF】XFE工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
<Page x:Class="XFEToolBox.Client.Views.Pages.Popups.ToolConfigurationPopupPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:controls="clr-namespace:XFEToolBox.WpfCore.Controls;assembly=XFEToolBox.WpfCore"
      Background="White">
    <Grid Margin="22,18,22,18">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel>
            <TextBlock Text="启动权限" Foreground="#3F3F55" FontSize="16" FontWeight="Bold"/>
            <TextBlock x:Name="ToolNameText" Foreground="#858598" FontSize="10" Margin="0,5,0,0"
                       TextTrimming="CharacterEllipsis"/>
        </StackPanel>

        <Border Grid.Row="1" Margin="0,15,0,14" Padding="15" Background="#F7F7FD"
                BorderBrush="#E2E2F1" BorderThickness="1" CornerRadius="14">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="42"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border Width="34" Height="34" CornerRadius="10" Background="White"
                        BorderBrush="#E2E2F1" BorderThickness="1" VerticalAlignment="Top">
                    <Image x:Name="ShieldImage" Width="20" Height="20" Stretch="Uniform"/>
                </Border>
                <StackPanel Grid.Column="1" Margin="10,0,0,0">
                    <CheckBox x:Name="RunAsAdministratorCheckBox" Content="以管理员身份打开" FontWeight="SemiBold"/>
                    <TextBlock Margin="0,7,0,0" Foreground="#77778C" FontSize="9.5" TextWrapping="Wrap"
                               Text="启用后,工具箱会在启动时向 Windows 请求 UAC 提权,并验证工具获得了管理员令牌。若工具箱已提权或系统策略自动批准,Windows 不会重复显示确认界面。"/>
                    <TextBlock x:Name="ManifestRequirementText" Margin="0,7,0,0" Foreground="#B06A42" FontSize="9.5"
                               FontWeight="SemiBold" TextWrapping="Wrap" Visibility="Collapsed"
                               Text="该工具的 manifest.json 强制要求管理员权限,此选项不能关闭。"/>
                </StackPanel>
            </Grid>
        </Border>

        <Grid Grid.Row="2">
            <TextBlock Text="此设置仅应用于当前工具。" Foreground="#9999AA" FontSize="9.5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <Button Content="取消" MinWidth="82" Margin="0,0,8,0" Click="CancelButton_Click"/>
                <Button Content="保存配置" MinWidth="96" controls:ButtonAssist.IsPrimary="True" Click="SaveButton_Click"/>
            </StackPanel>
        </Grid>
    </Grid>
</Page>