aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-08 13:35:27 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-08 13:35:27 +0300
commit57ae9d131e898a35061507bc8497bcf648cf00d1 (patch)
tree91e5c55fdcced791f509b24d13c4a73294a295f2 /Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
parent8dac70e25c92eea8278c564615509386a1a0182d (diff)
downloadTango-57ae9d131e898a35061507bc8497bcf648cf00d1.tar.gz
Tango-57ae9d131e898a35061507bc8497bcf648cf00d1.zip
Working on machine setup !
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml68
1 files changed, 51 insertions, 17 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
index c20ed0966..b7bd4d803 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
@@ -5,39 +5,73 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels"
xmlns:global="clr-namespace:Tango.PPC.UI"
+ xmlns:setup="clr-namespace:Tango.PPC.Common.MachineSetup;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}">
+ d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MachineSetupViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineSetupViewVM}">
<Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Grid x:Name="Container">
<DockPanel>
- <Grid DockPanel.Dock="Bottom" Height="200" Background="{StaticResource TangoMidBackgroundBrush}">
+ <Grid DockPanel.Dock="Bottom" Height="200" Background="{StaticResource TangoMidBackgroundBrush}" Visibility="{Binding State,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='Working,Failed,Completed'}">
<Border BorderThickness="0 1 0 0" BorderBrush="{StaticResource TangoGrayBrush}">
- <TextBox Text="{Binding Log}" IsReadOnly="True" Padding="5" Background="Transparent" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
-
+ <TextBox x:Name="txtLog" SelectionBrush="Transparent" IsReadOnly="True" Padding="5" Background="Transparent" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
+
</TextBox>
</Border>
</Grid>
-
- <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
- <Image Source="/Images/setup.png" Width="180" Height="180" />
- <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" Margin="30">MACHINE SETUP</TextBlock>
- <TextBlock TextAlignment="Center">
+
+ <StackPanel HorizontalAlignment="Center" Margin="0 200 0 0">
+ <Image Source="/Images/package.png" Width="180" Height="180" />
+ <TextBlock HorizontalAlignment="Center" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoHeaderFontSize}" Margin="30">MACHINE SETUP</TextBlock>
+
+ <StackPanel Visibility="{Binding State,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='None'}">
+ <TextBlock TextAlignment="Center" LineHeight="25">
<Run>This machine has not been configured yet and require several steps in order to be ready.</Run>
<LineBreak/>
- <Run>Enter this machine serial number, synchronization server address and tap 'START'.</Run>
- </TextBlock>
+ <Run>Enter this machine serial number, synchronization server address and tap 'INSTALL'.</Run>
+ </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}" />
+
+ <TextBlock Margin="0 40 0 0">HOST ADDRESS</TextBlock>
+ <touch:TouchTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="0 10 0 0" Text="{Binding HostAddress}" KeyboardContainer="{Binding ElementName=Container}" />
- <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}" />
+ <touch:TouchButton Margin="0 200 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding StartCommand}">INSTALL</touch:TouchButton>
+ </StackPanel>
+ </StackPanel>
+
+ <StackPanel Visibility="{Binding State,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='Working'}">
+ <TextBlock TextAlignment="Center">
+ <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 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>
- <TextBlock Margin="0 40 0 0">HOST ADDRESS</TextBlock>
- <touch:TouchTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="0 10 0 0" Text="{Binding HostAddress}" KeyboardContainer="{Binding ElementName=Container}" />
+ <StackPanel Visibility="{Binding State,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='Completed'}">
+ <StackPanel HorizontalAlignment="Center" Margin="0 50 0 0">
+ <touch:TouchIcon Icon="Check" Foreground="{StaticResource TangoSuccessBrush}" Width="70" Height="70" />
+ <TextBlock VerticalAlignment="Center" Margin="0 10 0 0" Foreground="{StaticResource TangoSuccessBrush}" FontSize="{StaticResource TangoTitleFontSize}">Setup completed successfully. Machine is ready!</TextBlock>
+ </StackPanel>
- <touch:TouchButton Margin="0 100 0 0" Padding="30" CornerRadius="40" Command="{Binding StartCommand}">START</touch:TouchButton>
+ <touch:TouchButton Margin="0 200 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding CompleteCommand}">START</touch:TouchButton>
</StackPanel>
</StackPanel>
</DockPanel>