blob: d397cfa35e83b36307ea633a65cc088d6bbaf28c (
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.UI.Views.MachineSetupView"
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:vm="clr-namespace:Tango.PPC.UI.ViewModels"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:global="clr-namespace:Tango.PPC.UI"
xmlns:setup="clr-namespace:Tango.PPC.Common.MachineSetup;assembly=Tango.PPC.Common"
xmlns:connectivity="clr-namespace:Tango.PPC.Common.Connectivity;assembly=Tango.PPC.Common"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:local="clr-namespace:Tango.PPC.UI.Views"
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MachineSetupViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineSetupViewVM}">
<Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Grid>
<DockPanel>
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0 100 0 0">
<Image Source="/Images/package.png" Width="180" Height="180" />
<TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" Margin="30">MACHINE SETUP WIZARD</TextBlock>
</StackPanel>
<Grid DockPanel.Dock="Bottom" Height="200" Background="{StaticResource TangoMidBackgroundBrush}">
<Border BorderThickness="0 1 0 0" BorderBrush="{StaticResource TangoGrayBrush}">
<TextBox x:Name="txtLog" Foreground="{StaticResource TangoGrayTextBrush}" FontSize="12" SelectionBrush="Transparent" IsReadOnly="True" Padding="5" Background="Transparent" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
</TextBox>
</Border>
</Grid>
<controls:NavigationControl x:Name="navigationControl" TransitionType="Slide" KeepElementsAttached="True" Margin="0 20 0 0" SelectedIndex="0">
<Grid controls:NavigationControl.NavigationName="WelcomeView">
<StackPanel HorizontalAlignment="Center" Margin="0 100 0 0">
<TextBlock TextAlignment="Center" LineHeight="20" Margin="20 0" TextWrapping="Wrap" FontSize="{StaticResource TangoTitleFontSize}">
<Run>Welcome to the machine setup wizard!</Run>
<Run>In the next steps the software will gather required information, perform tests and apply an initial configuration to this machine.</Run>
<LineBreak/>
<LineBreak/>
<Run>Press 'start' to initiate the setup process.</Run>
</TextBlock>
<touch:TouchButton Margin="0 250 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding NavigateToWiFiCommand}">START</touch:TouchButton>
</StackPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="WiFiSelectionView">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="20 0" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
<Run>We need an active internet connection in order to fetch the latest software package and machine configuration.</Run>
<LineBreak/>
<LineBreak/>
<Run>Please connect to one of the available WiFi networks.</Run>
</TextBlock>
<connectivity:AvailableWiFiConnectionsControl DataContext="{Binding ConnectivityProvider}" Margin="50 100 50 20" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 1 0 0" />
</DockPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="WiFiTestView">
<StackPanel HorizontalAlignment="Center" Margin="0 200 0 0">
<TextBlock DockPanel.Dock="Top" Margin="20 0" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
Checking internet connection, please wait...
</TextBlock>
<touch:TouchBusyIndicator Width="250" Margin="0 100 0 0" Height="250" IsIndeterminate="True" />
</StackPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="EmbeddedWelcomeView">
<StackPanel HorizontalAlignment="Center" Margin="0 100 0 0">
<TextBlock TextAlignment="Center" LineHeight="20" Margin="20 0" TextWrapping="Wrap" FontSize="{StaticResource TangoTitleFontSize}">
<Run>It is recommended to perform a quick communication test with the machine before proceeding. Please turn on and connect the machine, then tap 'perform test'.</Run>
</TextBlock>
<StackPanel Orientation="Horizontal" Margin="0 250 0 0" HorizontalAlignment="Center">
<touch:TouchButton Margin="10" Background="{StaticResource TangoGrayBrush}" Padding="20" Width="300" CornerRadius="35" Command="{Binding SkipEmbeddedTestCommand}">SKIP</touch:TouchButton>
<touch:TouchButton Margin="10" Padding="20" Width="300" CornerRadius="35" Command="{Binding PerformEmbeddedTestCommand}">PERFORM TEST</touch:TouchButton>
</StackPanel>
</StackPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="EmbeddedTestView">
<StackPanel HorizontalAlignment="Center" Margin="0 200 0 0">
<TextBlock Text="{Binding MachineConnectionStatus}" DockPanel.Dock="Top" Margin="20 0" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center"></TextBlock>
<touch:TouchProgressBar Height="20" Width="700" Margin="0 40 0 0" IsIndeterminate="True" />
</StackPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="SetupWelcomeView">
<StackPanel>
<TextBlock TextAlignment="Center" LineHeight="25" FontSize="{StaticResource TangoTitleFontSize}" Margin="40 0" TextWrapping="Wrap">
The next step is to download the latest software package and synchronize the machine data. Please enter your machine serial number and press 'install'.
</TextBlock>
<StackPanel Width="500" Margin="0 100 0 0" TextElement.FontSize="{StaticResource TangoTitleFontSize}">
<TextBlock>SERIAL NUMBER</TextBlock>
<touch:TouchTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="0 10 0 0" Text="{Binding SerialNumber}" KeyboardContainer="{Binding ElementName=Container}" />
<StackPanel HorizontalAlignment="Center">
<TextBlock Margin="0 80 0 0" FontSize="12" Foreground="{StaticResource TangoGrayTextBrush}">MACHINE SERVICE ADDRESS</TextBlock>
<TextBlock FontSize="11" HorizontalAlignment="Center" Foreground="{StaticResource TangoGrayTextBrush}" Margin="0 5 0 0" Text="{Binding HostAddress}" />
</StackPanel>
<touch:TouchButton Margin="0 200 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding InstallCommand}">INSTALL</touch:TouchButton>
</StackPanel>
</StackPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="SetupProgressView">
<StackPanel>
<TextBlock TextAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">
<Run>Please wait while we setting up this machine.</Run>
<Run>Do not turn off this PC.</Run>
</TextBlock>
<touch:TouchBusyIndicator Width="100" Height="100" Margin="0 80 0 0">
<touch:TouchBusyIndicator.Style>
<Style TargetType="touch:TouchBusyIndicator">
<Setter Property="IsIndeterminate" Value="False"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding State}" Value="Working">
<Setter Property="IsIndeterminate" Value="True"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</touch:TouchBusyIndicator.Style>
</touch:TouchBusyIndicator>
<touch:TouchStepProgressBar FontSize="10" Width="720" Height="50" Margin="0 100 0 0" ItemsSource="{Binding Source={x:Type setup:MachineSetupSteps},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding MachineSetupManager.CurrentStep}" SelectedValuePath="Value" DisplayMemberPath="DisplayName" />
<StackPanel Margin="100 100 100 0" Visibility="{Binding MachineSetupManager.CurrentStep,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='DownloadingPackage'}">
<TextBlock Text="{Binding MachineSetupManager.DownloadingPackagesStatus,Mode=OneWay}"></TextBlock>
<touch:TouchProgressBar Margin="0 10 0 0" Height="10" Maximum="100" Value="{Binding MachineSetupManager.DownloadingPackagesProgress,Mode=OneWay}" />
</StackPanel>
</StackPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="SetupCompletedView">
<StackPanel HorizontalAlignment="Center" Margin="0 50 0 0">
<touch:TouchIcon Icon="Check" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="70" Height="70" />
<TextBlock VerticalAlignment="Center" Margin="0 10 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}">Setup completed successfully. Machine is ready!</TextBlock>
<touch:TouchButton Margin="0 200 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding CompleteCommand}">RESTART</touch:TouchButton>
</StackPanel>
</Grid>
<Grid controls:NavigationControl.NavigationName="SetupFailedView">
<StackPanel HorizontalAlignment="Center" Margin="0 50 0 0">
<touch:TouchIcon Icon="AlertOctagon" Foreground="{StaticResource TangoErrorBrush}" Width="70" Height="70" />
<TextBlock VerticalAlignment="Center" Margin="0 10 0 0" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoTitleFontSize}">Setup failed, tap 'restart' to restart the process.</TextBlock>
<touch:TouchButton Margin="0 200 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding RestartCommand}">RESTART</touch:TouchButton>
</StackPanel>
</Grid>
</controls:NavigationControl>
</DockPanel>
</Grid>
</Grid>
</UserControl>
|