|
|
@@ -12,7 +12,9 @@
|
|
|
<UserControl.Resources>
|
|
|
<converters:BooleanToColorConverter x:Key="BooleanToColorConverter" True="{StaticResource PrsButtonBackground}" False="{StaticResource PrsAlertBackground}" />
|
|
|
<converters:BooleanToStringConverter x:Key="BooleanToStringConverter" True="CLOCK OFF" False="CLOCK ON" />
|
|
|
- <converters:BooleanMatcher x:Key="BooleanMatcher" Comparison="EqualTo" Type="All" />
|
|
|
+ <converters:ByteArrayToImageSourceConverter x:Key="ImageSourceConverter" />
|
|
|
+ <converters:ByteArrayToBooleanConverter x:Key="ByteArrayHasBytes" />
|
|
|
+ <converters:ByteArrayToBooleanConverter x:Key="ByteArrayIsEmpty" Inverted="True" />
|
|
|
</UserControl.Resources>
|
|
|
<Grid
|
|
|
RowDefinitions="200 Auto Auto *"
|
|
|
@@ -37,59 +39,82 @@
|
|
|
|
|
|
<Grid
|
|
|
ColumnDefinitions="* Auto"
|
|
|
- RowDefinitions="* Auto"
|
|
|
+ RowDefinitions="*"
|
|
|
HorizontalAlignment="Stretch"
|
|
|
VerticalAlignment="Stretch">
|
|
|
|
|
|
- <StackPanel
|
|
|
- Orientation="Vertical"
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
+ <StackPanel
|
|
|
Grid.Row="0"
|
|
|
Grid.Column="0"
|
|
|
- Grid.RowSpan="2"
|
|
|
- Grid.ColumnSpan="2">
|
|
|
+ Orientation="Horizontal"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center">
|
|
|
|
|
|
- <Label
|
|
|
- FontSize="{StaticResource PrsFontSizeExtraLarge}"
|
|
|
- FontWeight="Bold"
|
|
|
- Content="{Binding IsClockedOn, Converter={StaticResource BooleanToStringConverter}}"
|
|
|
- HorizontalAlignment="Center"/>
|
|
|
+ <Border
|
|
|
+ Classes="Standard"
|
|
|
+ IsVisible="{Binding CompanyLogo, Converter={StaticResource ByteArrayHasBytes}}"
|
|
|
+ Height="120"
|
|
|
+ Width="120"
|
|
|
+ CornerRadius="60"
|
|
|
+ Margin="0 0 10 0">
|
|
|
+ <Border.Background>
|
|
|
+ <SolidColorBrush Color="WhiteSmoke" Opacity="0.6" />
|
|
|
+ </Border.Background>
|
|
|
+ <Image
|
|
|
+ Source="{Binding CompanyLogo, Converter={StaticResource ImageSourceConverter}}"
|
|
|
+ Stretch="Uniform"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ />
|
|
|
+ </Border>
|
|
|
|
|
|
- <Label
|
|
|
- FontSize="{StaticResource PrsFontSizeNormal}"
|
|
|
- FontWeight="DemiBold"
|
|
|
- Content="{Binding ClockOnLocation}"
|
|
|
- HorizontalAlignment="Center">
|
|
|
- <Label.IsVisible>
|
|
|
- <MultiBinding Converter = "{x:Static BoolConverters.And}">
|
|
|
- <Binding Path="IsClockedOn" Converter="{x:Static BoolConverters.Not}" />
|
|
|
- <Binding Path="ClockOnLocation" Converter="{x:Static StringConverters.IsNotNullOrEmpty}" />
|
|
|
- </MultiBinding>
|
|
|
- </Label.IsVisible>
|
|
|
- </Label>
|
|
|
+ <StackPanel
|
|
|
+ Orientation="Vertical"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ MinWidth="200">
|
|
|
|
|
|
- <Label
|
|
|
- FontSize="{StaticResource PrsFontSizeNormal}"
|
|
|
- FontWeight="DemiBold"
|
|
|
- Content="No Job Site Found"
|
|
|
- HorizontalAlignment="Center">
|
|
|
- <Label.IsVisible>
|
|
|
- <MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
|
- <Binding Path="IsClockedOn" Converter="{x:Static BoolConverters.Not}" />
|
|
|
- <Binding Path="ClockOnLocation" Converter="{x:Static ObjectConverters.IsNull}" />
|
|
|
- <Binding Path="CurrentLocation" Converter="{x:Static ObjectConverters.IsNotNull}" />
|
|
|
- </MultiBinding>
|
|
|
- </Label.IsVisible>
|
|
|
- </Label>
|
|
|
+ <Label
|
|
|
+ FontSize="{StaticResource PrsFontSizeSuperLarge}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Content="{Binding IsClockedOn, Converter={StaticResource BooleanToStringConverter}}"
|
|
|
+ HorizontalAlignment="Center"/>
|
|
|
|
|
|
- <Label
|
|
|
- FontSize="{StaticResource PrsFontSizeNormal}"
|
|
|
- FontWeight="DemiBold"
|
|
|
- Content="Missing/Invalid GPS Signal"
|
|
|
- IsVisible="{Binding CurrentLocation, Converter={x:Static ObjectConverters.IsNull}}"
|
|
|
- HorizontalAlignment="Center"/>
|
|
|
+ <Label
|
|
|
+ FontSize="{StaticResource PrsFontSizeNormal}"
|
|
|
+ FontWeight="DemiBold"
|
|
|
+ Content="{Binding ClockOnLocation}"
|
|
|
+ HorizontalAlignment="Center">
|
|
|
+ <Label.IsVisible>
|
|
|
+ <MultiBinding Converter = "{x:Static BoolConverters.And}">
|
|
|
+ <Binding Path="IsClockedOn" Converter="{x:Static BoolConverters.Not}" />
|
|
|
+ <Binding Path="ClockOnLocation" Converter="{x:Static StringConverters.IsNotNullOrEmpty}" />
|
|
|
+ </MultiBinding>
|
|
|
+ </Label.IsVisible>
|
|
|
+ </Label>
|
|
|
+
|
|
|
+ <Label
|
|
|
+ FontSize="{StaticResource PrsFontSizeNormal}"
|
|
|
+ FontWeight="DemiBold"
|
|
|
+ Content="No Job Site Found"
|
|
|
+ HorizontalAlignment="Center">
|
|
|
+ <Label.IsVisible>
|
|
|
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
|
+ <Binding Path="IsClockedOn" Converter="{x:Static BoolConverters.Not}" />
|
|
|
+ <Binding Path="ClockOnLocation" Converter="{x:Static ObjectConverters.IsNull}" />
|
|
|
+ <Binding Path="CurrentLocation" Converter="{x:Static ObjectConverters.IsNotNull}" />
|
|
|
+ </MultiBinding>
|
|
|
+ </Label.IsVisible>
|
|
|
+ </Label>
|
|
|
|
|
|
+ <Label
|
|
|
+ FontSize="{StaticResource PrsFontSizeNormal}"
|
|
|
+ FontWeight="DemiBold"
|
|
|
+ Content="Missing/Invalid GPS Signal"
|
|
|
+ IsVisible="{Binding CurrentLocation, Converter={x:Static ObjectConverters.IsNull}}"
|
|
|
+ HorizontalAlignment="Center"/>
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
|
|
|
<ProgressBar
|
|
|
@@ -109,15 +134,45 @@
|
|
|
Grid.Row="0"
|
|
|
Grid.Column="0"
|
|
|
Grid.ColumnSpan="2"
|
|
|
- Padding="10"
|
|
|
+ Padding="20"
|
|
|
IsVisible="{Binding SplashVisible}">
|
|
|
- <Image Source="{SvgImage ../Images/badge.svg}" />
|
|
|
+ <StackPanel
|
|
|
+ Orientation="Vertical"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+
|
|
|
+ <Image
|
|
|
+ Classes.HasLogo="{Binding CompanyLogo, Converter={StaticResource ByteArrayHasBytes}}"
|
|
|
+ Classes.NoLogo="{Binding CompanyLogo, Converter={StaticResource ByteArrayIsEmpty}}"
|
|
|
+ Stretch="Uniform"
|
|
|
+ Height="120"
|
|
|
+ Width="120">
|
|
|
+ <Image.Styles>
|
|
|
+ <Style Selector="Image.HasLogo">
|
|
|
+ <Setter Property="Source" Value="{Binding CompanyLogo, Converter={StaticResource ByteArrayToImageSourceConverter}}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="Image.NoLogo">
|
|
|
+ <Setter Property="Source" Value="{SvgImage ../Images/badge.svg}" />
|
|
|
+ </Style>
|
|
|
+ </Image.Styles>
|
|
|
+ </Image>
|
|
|
+
|
|
|
+ <Label
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraLarge}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Margin="0 20 0 0"
|
|
|
+ Content="{Binding CompanyName}"
|
|
|
+ IsVisible="{Binding CompanyName, Converter={StaticResource StringToBooleanConverter}}"
|
|
|
+ HorizontalAlignment="Center"/>
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
</Border>
|
|
|
|
|
|
<Button Classes="Standard"
|
|
|
Grid.Row="1"
|
|
|
Grid.Column="0"
|
|
|
- Content="{Binding Repositories.CurrentAssignment?.JobDisplay, TargetNullValue='Select Job'}"
|
|
|
+ Content="{Binding Repositories.CurrentAssignment.JobDisplay, FallbackValue='Select Job'}"
|
|
|
IsVisible="{Binding ClockOnVisible}"
|
|
|
Background="{Binding IsClockedOn, Converter={StaticResource BooleanToColorConverter}}"
|
|
|
Command="{Binding SelectJobCommand}">
|
|
|
@@ -133,7 +188,7 @@
|
|
|
<Button Classes="Standard"
|
|
|
Grid.Row="2"
|
|
|
Grid.Column="0"
|
|
|
- Content="{Binding Repositories.CurrentAssignment?.TaskDisplay, TargetNullValue='Select Task'}"
|
|
|
+ Content="{Binding Repositories.CurrentAssignment.TaskDisplay, FallbackValue='Select Task'}"
|
|
|
IsVisible="{Binding ClockOnVisible}"
|
|
|
Background="{Binding IsClockedOn, Converter={StaticResource BooleanToColorConverter}}"
|
|
|
Command="{Binding SelectTaskCommand}">
|