-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathPatchView.axaml
More file actions
72 lines (69 loc) · 5.42 KB
/
Copy pathPatchView.axaml
File metadata and controls
72 lines (69 loc) · 5.42 KB
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
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:GeneralUpdate.Tools.ViewModels"
xmlns:svc="using:GeneralUpdate.Tools.Services"
x:Class="GeneralUpdate.Tools.Views.PatchView"
x:DataType="vm:PatchViewModel">
<ScrollViewer>
<StackPanel Margin="28,24" Spacing="14">
<TextBlock Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.Title]}"
FontSize="20" FontWeight="Bold"/>
<Border Padding="16" CornerRadius="8" Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}">
<StackPanel Spacing="10">
<TextBlock Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.CorePaths]}"
FontSize="14" FontWeight="SemiBold"/>
<Grid ColumnDefinitions="Auto,*,Auto">
<TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.OldDir]}"
VerticalAlignment="Center" Width="85"/>
<TextBox Grid.Column="1" Text="{Binding Config.OldDirectory}"
PlaceholderText="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.OldPlaceholder]}"
IsReadOnly="True" Margin="8,0"/>
<Button Grid.Column="2" Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.Select]}"
Command="{Binding SelectOldCommand}" MinWidth="70"/>
</Grid>
<Grid ColumnDefinitions="Auto,*,Auto">
<TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.NewDir]}"
VerticalAlignment="Center" Width="85"/>
<TextBox Grid.Column="1" Text="{Binding Config.NewDirectory}"
PlaceholderText="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.NewPlaceholder]}"
IsReadOnly="True" Margin="8,0"/>
<Button Grid.Column="2" Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.Select]}"
Command="{Binding SelectNewCommand}" MinWidth="70"/>
</Grid>
</StackPanel>
</Border>
<Border Padding="16" CornerRadius="8" Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}">
<StackPanel Spacing="10">
<TextBlock Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.PackageInfo]}"
FontSize="14" FontWeight="SemiBold"/>
<Grid ColumnDefinitions="Auto,*,Auto,*">
<TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.PackageName]}" VerticalAlignment="Center"/>
<TextBox Grid.Column="1" Text="{Binding Config.PackageName}" PlaceholderText="patch_v1.0_to_v1.1" Margin="8,0,16,0"/>
<TextBlock Grid.Column="2" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.Version]}" VerticalAlignment="Center"/>
<TextBox Grid.Column="3" Text="{Binding Config.Version}" PlaceholderText="1.0.0 (semver)" Margin="8,0"/>
</Grid>
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
<TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.OutputDir]}" VerticalAlignment="Center"/>
<TextBox Grid.Column="1" Text="{Binding Config.OutputPath}"
PlaceholderText="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.OutputPlaceholder]}"
IsReadOnly="True" Margin="8,0,16,0"/>
<Button Grid.Column="2" Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.Select]}"
Command="{Binding SelectOutCommand}" MinWidth="70"/>
</Grid>
</StackPanel>
</Border>
<Button Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Patch.Build]}"
Command="{Binding BuildCommand}" IsEnabled="{Binding !IsBuilding}"
Height="40" FontSize="14" HorizontalAlignment="Stretch"/>
<ProgressBar IsVisible="{Binding IsBuilding}" Value="{Binding Progress}" Height="6"/>
<TextBlock Text="{Binding Status}" FontSize="13"/>
<Border Padding="10" CornerRadius="6" Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" MaxHeight="180">
<ListBox ItemsSource="{Binding Log}" Background="Transparent" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate><TextBlock Text="{Binding}" FontSize="11" FontFamily="Consolas,monospace" TextWrapping="Wrap"/></DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
</StackPanel>
</ScrollViewer>
</UserControl>