adams-toolkit

codigo-fonte GPL-3.0 · espelho oficial · commit b208bae5
ChooserWindow.xaml · 85 linhas · raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<Window x:Class="AdamsToolkit.ChooserWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Adams Toolkit" Width="640" Height="400" ResizeMode="NoResize"
        WindowStartupLocation="CenterScreen" Icon="/Assets/app.ico"
        Background="Transparent" WindowStyle="None" AllowsTransparency="True"
        Topmost="True" ShowActivated="True" KeyDown="Window_KeyDown" MouseLeftButtonDown="Drag">
    <Window.Resources>
        <!-- cartão grande clicável -->
        <Style x:Key="Choice" TargetType="Button">
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Focusable" Value="True"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="bd" Background="{DynamicResource BrCard}" BorderBrush="{DynamicResource BrBorder}"
                                BorderThickness="1" CornerRadius="16" Padding="22,26">
                            <ContentPresenter/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="bd" Property="Background" Value="{DynamicResource BrCardHover}"/>
                                <Setter TargetName="bd" Property="BorderBrush" Value="{DynamicResource BrAccent}"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="True">
                                <Setter TargetName="bd" Property="BorderBrush" Value="{DynamicResource BrAccent}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Border CornerRadius="16" Background="{DynamicResource BrBg}" BorderBrush="{DynamicResource BrAccentGradient}" BorderThickness="1">
        <Grid Margin="28,22,28,20">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <Grid Grid.Row="0">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <Image Source="/Assets/logo.png" Height="34" RenderOptions.BitmapScalingMode="HighQuality"/>
                    <StackPanel Margin="12,0,0,0" VerticalAlignment="Center">
                        <TextBlock Text="O que queres abrir?" FontSize="18" FontWeight="Bold" Foreground="{DynamicResource BrText}"/>
                        <TextBlock Text="Escolhe uma das duas — pergunta de cada vez que abres o programa." FontSize="11.5" Foreground="{DynamicResource BrMuted}"/>
                    </StackPanel>
                </StackPanel>
                <Button Content="✕" Click="Close_Click" Style="{StaticResource ChromeButton}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-6,-10,0"/>
            </Grid>

            <Grid Grid.Row="1" Margin="0,22,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="16"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Button x:Name="BtnToolkit" Grid.Column="0" Style="{StaticResource Choice}" Click="Toolkit_Click">
                    <StackPanel>
                        <Border Width="52" Height="52" CornerRadius="14" Background="{DynamicResource BrAccentGradient}">
                            <TextBlock Text="🛠" FontSize="26" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <TextBlock Text="Adams Toolkit" FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource BrText}" Margin="0,14,0,4"/>
                        <TextBlock Text="Otimizações, FiveM Center, drivers, desinstalador e mais." FontSize="12" Foreground="{DynamicResource BrMuted}" TextWrapping="Wrap"/>
                    </StackPanel>
                </Button>
                <Button x:Name="BtnEditor" Grid.Column="2" Style="{StaticResource Choice}" Click="Editor_Click">
                    <StackPanel>
                        <Border Width="52" Height="52" CornerRadius="14" Background="{DynamicResource BrSurface}" BorderBrush="{DynamicResource BrAccent}" BorderThickness="1.5">
                            <TextBlock Text="✂" FontSize="26" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource BrAccent}"/>
                        </Border>
                        <TextBlock Text="Editor de Clips" FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource BrText}" Margin="0,14,0,4"/>
                        <TextBlock Text="Cortar, juntar e exportar os teus clips (OBS, Medal, o que for)." FontSize="12" Foreground="{DynamicResource BrMuted}" TextWrapping="Wrap"/>
                    </StackPanel>
                </Button>
            </Grid>

            <Grid Grid.Row="2" Margin="0,18,0,0">
                <TextBlock Text="Se o programa arrancar com o Windows, abre sempre o Toolkit." FontSize="10.5" Foreground="{DynamicResource BrMuted}" VerticalAlignment="Center"/>
                <TextBlock Text="Enter = abrir o cartão selecionado · Esc = sair" FontSize="10.5" Foreground="{DynamicResource BrMuted}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            </Grid>
        </Grid>
    </Border>
</Window>