aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml
blob: 2a72f9788caba6c7e1ef8cc9114e2e73c0772adc (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
<UserControl x:Class="Tango.PPC.BackupRestore.Views.BackupView"
             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:BackupViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.BackupViewVM}">

    <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
        <DockPanel Margin="30 0 30 30">
            <Grid DockPanel.Dock="Bottom">
                <DockPanel>
                    <touch:TouchButton Command="{Binding BackupCommand}" 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}">Backup your system</Run>
                                <LineBreak/>
                                <LineBreak/>
                                <Run>Please specify the location and settings of your backup and press 'START'.</Run>
                </TextBlock>

                <touch:TouchDropShadowBorder Padding="10" Margin="0 50 0 0">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoPrimaryAccentBrush}">Backup Mode</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:TouchRadioButton IsChecked="{Binding IsBackupJobs,Mode=TwoWay}">
                                <touch:TouchRadioButton.Content>
                                    <TextBlock>
                                        <Run>Jobs</Run>
                                        <Run Style="{StaticResource run}">(create a backup of all your jobs)</Run>
                                    </TextBlock>
                                </touch:TouchRadioButton.Content>
                            </touch:TouchRadioButton>
                            <touch:TouchRadioButton IsChecked="{Binding IsBackupFull,Mode=TwoWay}" Margin="0 5 0 0">
                                <touch:TouchRadioButton.Content>
                                    <TextBlock>
                                        <Run>Full Backup</Run>
                                        <Run Style="{StaticResource run}">(backup the entire state of the system)</Run>
                                    </TextBlock>
                                </touch:TouchRadioButton.Content>
                            </touch:TouchRadioButton>
                        </StackPanel>
                    </StackPanel>
                </touch:TouchDropShadowBorder>

                <touch:TouchDropShadowBorder Padding="10 10 10 20" Margin="0 10 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 select the destination of your backup file</TextBlock>
                            <DockPanel Height="50" Margin="0 20 0 0">
                                <touch:TouchButton Command="{Binding BrowseBackupLocationCommand}" 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 BackupLocation}" IsReadOnly="True" />
                            </DockPanel>
                        </StackPanel>
                    </StackPanel>
                </touch:TouchDropShadowBorder>

                <touch:TouchDropShadowBorder Padding="10" Margin="0 10 0 0">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoPrimaryAccentBrush}">Name</TextBlock>
                        </StackPanel>

                        <StackPanel Margin="0 20 0 0">
                            <TextBlock>Please enter the name of your backup</TextBlock>
                            <touch:TouchTextBox Margin="0 20 0 0" Text="{Binding BackupName}" KeyboardContainer="{Binding RelativeSource={RelativeSource AncestorType=touch:TouchKeyboardContainer}}" />
                        </StackPanel>
                    </StackPanel>
                </touch:TouchDropShadowBorder>
            </StackPanel>
        </DockPanel>
    </Grid>
</UserControl>