|
3 | 3 | xmlns:vm="using:GeneralUpdate.Tools.ViewModels" |
4 | 4 | xmlns:svc="using:GeneralUpdate.Tools.Services" |
5 | 5 | x:Class="GeneralUpdate.Tools.Views.SimulateView" |
| 6 | + x:Name="SimRoot" |
6 | 7 | x:DataType="vm:SimulateViewModel"> |
7 | 8 | <ScrollViewer> |
8 | 9 | <StackPanel Margin="28,24" Spacing="14"> |
9 | | - <TextBlock Text="🧪 Simulate Update" FontSize="20" FontWeight="Bold"/> |
| 10 | + <TextBlock Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.Title]}" |
| 11 | + FontSize="20" FontWeight="Bold"/> |
10 | 12 |
|
11 | 13 | <!-- Test target --> |
12 | 14 | <Border Padding="16" CornerRadius="8" Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}"> |
13 | 15 | <StackPanel Spacing="10"> |
14 | | - <TextBlock Text="Test Target" FontSize="14" FontWeight="SemiBold"/> |
| 16 | + <TextBlock Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.TestTarget]}" |
| 17 | + FontSize="14" FontWeight="SemiBold"/> |
15 | 18 | <Grid ColumnDefinitions="Auto,*,Auto"> |
16 | | - <TextBlock Grid.Column="0" Text="Old App Dir" VerticalAlignment="Center" Width="110"/> |
| 19 | + <TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.OldAppDir]}" |
| 20 | + VerticalAlignment="Center" Width="100"/> |
17 | 21 | <TextBox Grid.Column="1" Text="{Binding Config.AppDirectory}" IsReadOnly="True" Margin="8,0"/> |
18 | | - <Button Grid.Column="2" Content="📁 Select" Command="{Binding SelectAppDirCommand}" MinWidth="80"/> |
| 22 | + <Button Grid.Column="2" Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.Select]}" |
| 23 | + Command="{Binding SelectAppDirCommand}" MinWidth="80"/> |
19 | 24 | </Grid> |
20 | 25 | <Grid ColumnDefinitions="Auto,*,Auto"> |
21 | | - <TextBlock Grid.Column="0" Text="Patch Package" VerticalAlignment="Center" Width="110"/> |
| 26 | + <TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.PatchFile]}" |
| 27 | + VerticalAlignment="Center" Width="100"/> |
22 | 28 | <TextBox Grid.Column="1" Text="{Binding Config.PatchFilePath}" IsReadOnly="True" Margin="8,0"/> |
23 | | - <Button Grid.Column="2" Content="📁 Select" Command="{Binding SelectPatchCommand}" MinWidth="80"/> |
| 29 | + <Button Grid.Column="2" Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.Select]}" |
| 30 | + Command="{Binding SelectPatchCommand}" MinWidth="80"/> |
24 | 31 | </Grid> |
25 | 32 | </StackPanel> |
26 | 33 | </Border> |
27 | 34 |
|
28 | 35 | <!-- Config --> |
29 | 36 | <Border Padding="16" CornerRadius="8" Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}"> |
30 | 37 | <StackPanel Spacing="10"> |
31 | | - <TextBlock Text="Update Config" FontSize="14" FontWeight="SemiBold"/> |
| 38 | + <TextBlock Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.UpdateConfig]}" |
| 39 | + FontSize="14" FontWeight="SemiBold"/> |
32 | 40 | <Grid ColumnDefinitions="Auto,*,Auto,*"> |
33 | | - <TextBlock Grid.Column="0" Text="Current Ver" VerticalAlignment="Center"/> |
| 41 | + <TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.CurrentVer]}" |
| 42 | + VerticalAlignment="Center"/> |
34 | 43 | <TextBox Grid.Column="1" Text="{Binding Config.CurrentVersion}" Margin="8,0,16,0"/> |
35 | | - <TextBlock Grid.Column="2" Text="Target Ver" VerticalAlignment="Center"/> |
| 44 | + <TextBlock Grid.Column="2" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.TargetVer]}" |
| 45 | + VerticalAlignment="Center"/> |
36 | 46 | <TextBox Grid.Column="3" Text="{Binding Config.TargetVersion}" Margin="8,0"/> |
37 | 47 | </Grid> |
38 | 48 | <Grid ColumnDefinitions="Auto,*,Auto,*"> |
39 | | - <TextBlock Grid.Column="0" Text="Platform" VerticalAlignment="Center"/> |
40 | | - <ComboBox Grid.Column="1" ItemsSource="{Binding Platforms}" |
41 | | - SelectedIndex="{Binding PlatformIndex}" Margin="8,0,16,0"/> |
42 | | - <TextBlock Grid.Column="2" Text="AppType" VerticalAlignment="Center"/> |
43 | | - <ComboBox Grid.Column="3" ItemsSource="{Binding AppTypes}" |
44 | | - SelectedIndex="{Binding AppTypeIndex}" Margin="8,0"/> |
| 49 | + <TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.Platform]}" |
| 50 | + VerticalAlignment="Center"/> |
| 51 | + <ComboBox x:Name="PlatformCombo" Grid.Column="1" ItemsSource="{Binding Platforms}" |
| 52 | + SelectedIndex="0" Margin="8,0,16,0"/> |
| 53 | + <TextBlock Grid.Column="2" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.AppType]}" |
| 54 | + VerticalAlignment="Center"/> |
| 55 | + <ComboBox x:Name="AppTypeCombo" Grid.Column="3" ItemsSource="{Binding AppTypes}" |
| 56 | + SelectedIndex="0" Margin="8,0"/> |
45 | 57 | </Grid> |
46 | 58 | <Grid ColumnDefinitions="Auto,*,Auto,*"> |
47 | | - <TextBlock Grid.Column="0" Text="AppSecret" VerticalAlignment="Center"/> |
| 59 | + <TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.AppSecret]}" |
| 60 | + VerticalAlignment="Center"/> |
48 | 61 | <TextBox Grid.Column="1" Text="{Binding Config.AppSecretKey}" Margin="8,0,16,0"/> |
49 | | - <TextBlock Grid.Column="2" Text="Product ID" VerticalAlignment="Center"/> |
| 62 | + <TextBlock Grid.Column="2" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.ProductId]}" |
| 63 | + VerticalAlignment="Center"/> |
50 | 64 | <TextBox Grid.Column="3" Text="{Binding Config.ProductId}" Margin="8,0"/> |
51 | 65 | </Grid> |
52 | 66 | </StackPanel> |
|
55 | 69 | <!-- Output --> |
56 | 70 | <Border Padding="16" CornerRadius="8" Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}"> |
57 | 71 | <StackPanel Spacing="10"> |
58 | | - <TextBlock Text="Output" FontSize="14" FontWeight="SemiBold"/> |
| 72 | + <TextBlock Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.Output]}" |
| 73 | + FontSize="14" FontWeight="SemiBold"/> |
59 | 74 | <Grid ColumnDefinitions="Auto,*,Auto"> |
60 | | - <TextBlock Grid.Column="0" Text="Simulate Dir" VerticalAlignment="Center" Width="110"/> |
| 75 | + <TextBlock Grid.Column="0" Text="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.OutputDir]}" |
| 76 | + VerticalAlignment="Center" Width="100"/> |
61 | 77 | <TextBox Grid.Column="1" Text="{Binding Config.OutputDirectory}" IsReadOnly="True" Margin="8,0"/> |
62 | | - <Button Grid.Column="2" Content="📁 Select" Command="{Binding SelectOutputDirCommand}" MinWidth="80"/> |
| 78 | + <Button Grid.Column="2" Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.Select]}" |
| 79 | + Command="{Binding SelectOutputDirCommand}" MinWidth="80"/> |
63 | 80 | </Grid> |
64 | 81 | </StackPanel> |
65 | 82 | </Border> |
66 | 83 |
|
67 | 84 | <!-- Run --> |
68 | | - <Button Content="🚀 Start Simulation" Command="{Binding StartSimulationCommand}" |
| 85 | + <Button Content="{Binding Source={x:Static svc:LocalizationService.Instance}, Path=[Sim.Start]}" |
| 86 | + Command="{Binding StartSimulationCommand}" |
69 | 87 | IsEnabled="{Binding !IsRunning}" Height="40" FontSize="14" HorizontalAlignment="Stretch"/> |
70 | 88 | <TextBlock Text="{Binding Status}" FontSize="13"/> |
71 | 89 |
|
|
0 commit comments