blob: fca7a668e96fe12680a158b3955de7132908d4ea (
plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
<UserControl x:Class="Tango.PPC.BackupRestore.Views.RestoreView"
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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:vm="clr-namespace:Tango.PPC.BackupRestore.ViewModels"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:global="clr-namespace:Tango.PPC.BackupRestore"
xmlns:local="clr-namespace:Tango.PPC.BackupRestore.Views"
mc:Ignorable="d"
d:DesignHeight="700" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:RestoreViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.RestoreViewVM}">
<Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
<DockPanel Margin="30 0 30 30">
<Grid DockPanel.Dock="Bottom">
<DockPanel>
<touch:TouchButton Command="{Binding RestoreCommand}" HorizontalAlignment="Right" Height="80" Width="300" CornerRadius="40" Content="START"/>
</DockPanel>
</Grid>
<StackPanel IsEnabled="{Binding IsFree}">
<TextBlock TextWrapping="Wrap" FontSize="{StaticResource TangoDefaultFontSize}">
<Run FontSize="{StaticResource TangoTitleFontSize}">Restore your system</Run>
<LineBreak/>
<LineBreak/>
<Run>Please specify the location of your backup file and other options. Press 'START' when you are ready.</Run>
</TextBlock>
<touch:TouchDropShadowBorder Padding="10 10 10 20" Margin="0 50 0 0">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoPrimaryAccentBrush}">Location</TextBlock>
</StackPanel>
<StackPanel Margin="0 20 0 0">
<TextBlock>Please insert a storage device and select your backup file</TextBlock>
<DockPanel Height="50" Margin="0 20 0 0">
<touch:TouchButton Command="{Binding BrowseForBackupCommand}" Margin="20 0 0 0" Width="150" DockPanel.Dock="Right" Foreground="{StaticResource TangoDarkForegroundBrush}" BorderBrush="{StaticResource TangoDarkForegroundBrush}" Style="{StaticResource TangoHollowButton}">SELECT</touch:TouchButton>
<touch:TouchTextBox Text="{Binding BackupFileName}" IsReadOnly="True" />
</DockPanel>
</StackPanel>
</StackPanel>
</touch:TouchDropShadowBorder>
<touch:TouchDropShadowBorder Padding="10 10 10 0" Margin="0 10 0 0" Visibility="{Binding BackupFile,Converter={StaticResource IsNullToVisibilityConverter}}">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoPrimaryAccentBrush}">Information</TextBlock>
</StackPanel>
<StackPanel Margin="0 20 0 0">
<StackPanel>
<controls:TableGrid RowHeight="20">
<TextBlock Text="Name:"></TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Text="{Binding BackupFile.Name}"></TextBlock>
<TextBlock Text="Date:"></TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Text="{Binding BackupFile.Date}"></TextBlock>
<TextBlock Text="Size:"></TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Text="{Binding BackupSize,Converter={StaticResource ByteArrayToFileSizeConverter}}"></TextBlock>
<TextBlock Text="Mode:"></TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Text="{Binding BackupFile.Settings.Mode}"></TextBlock>
</controls:TableGrid>
</StackPanel>
<StackPanel Margin="0 -20 0 0">
<StackPanel.Style>
<Style TargetType="StackPanel">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding BackupFile.Settings.Mode}" Value="Jobs">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<controls:TableGrid RowHeight="20">
<TextBlock Text="Jobs:"></TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Text="{Binding BackupFile.JobFiles.Count}"></TextBlock>
</controls:TableGrid>
</StackPanel>
<StackPanel>
<StackPanel.Style>
<Style TargetType="StackPanel">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding BackupFile.Settings.Mode}" Value="Full">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<controls:TableGrid RowHeight="20">
<TextBlock Text="Application Version:"></TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Text="{Binding BackupFile.ApplicationVersion}"></TextBlock>
<TextBlock Text="Firmware Version:"></TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Text="{Binding BackupFile.FirmwareVersion}"></TextBlock>
</controls:TableGrid>
</StackPanel>
</StackPanel>
</StackPanel>
</touch:TouchDropShadowBorder>
<touch:TouchDropShadowBorder Padding="10" Margin="0 10 0 0">
<touch:TouchDropShadowBorder.Style>
<Style TargetType="touch:TouchDropShadowBorder">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding BackupFile.Settings.Mode}" Value="Jobs">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</touch:TouchDropShadowBorder.Style>
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoPrimaryAccentBrush}">Options</TextBlock>
</StackPanel>
<StackPanel Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}" TextElement.FontSize="{StaticResource TangoTitleFontSize}">
<StackPanel.Resources>
<Style TargetType="touch:TouchCheckBox" BasedOn="{StaticResource {x:Type touch:TouchCheckBox}}">
<Setter Property="Margin" Value="0 0 0 10"></Setter>
<Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
</Style>
<Style x:Key="run" TargetType="Run">
<Setter Property="Foreground" Value="{StaticResource TangoGrayTextBrush}"></Setter>
<Setter Property="FontSize" Value="{StaticResource TangoDefaultFontSize}"></Setter>
</Style>
</StackPanel.Resources>
<touch:TouchCheckBox IsChecked="{Binding RestoreSettings.OverwriteExistingJobs,Mode=TwoWay}">
<touch:TouchCheckBox.Content>
<TextBlock>
<Run>Overwrite existing jobs</Run>
<Run Style="{StaticResource run}">(existing jobs will change if there are conflicts)</Run>
</TextBlock>
</touch:TouchCheckBox.Content>
</touch:TouchCheckBox>
<touch:TouchCheckBox IsChecked="{Binding RestoreSettings.AllowDeleteJobs,Converter={StaticResource BooleanInverseConverter},Mode=TwoWay}">
<touch:TouchCheckBox.Content>
<TextBlock>
<Run>Do not remove existing jobs</Run>
<Run Style="{StaticResource run}">(existing jobs will not be deleted)</Run>
</TextBlock>
</touch:TouchCheckBox.Content>
</touch:TouchCheckBox>
</StackPanel>
</StackPanel>
</touch:TouchDropShadowBorder>
</StackPanel>
</DockPanel>
</Grid>
</UserControl>
|