FrameScannerDetails.xaml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <local:FrameScannerView xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. xmlns:local="clr-namespace:PRS.Mobile;assembly=PRS.Mobile"
  5. xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
  6. xmlns:views="http://xamarin.com/schemas/2020/toolkit"
  7. xmlns:forms="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"
  8. x:Class="PRS.Mobile.FrameScannerDetails"
  9. x:DataType="{x:Type local:FrameScannerViewModel}">
  10. <local:FrameScannerView.Resources>
  11. <mobile:DoubleCalculator x:Key="ScannerHeightCalculator" Type="Product" Constants="0.65"/>
  12. </local:FrameScannerView.Resources>
  13. <local:FrameScannerView.Content>
  14. <StackLayout>
  15. <mobile:MobileCard
  16. Padding="0"
  17. IsClippedToBounds="True"
  18. views:DockLayout.Dock="Top"
  19. Background="DimGray">
  20. <mobile:MobileCard.HeightRequest>
  21. <MultiBinding Converter="{StaticResource ScannerHeightCalculator}">
  22. <Binding Source="{RelativeSource AncestorType={x:Type local:FrameScanner}}" Path="Width" />
  23. </MultiBinding>
  24. </mobile:MobileCard.HeightRequest>
  25. <Grid
  26. VerticalOptions="Fill"
  27. HorizontalOptions="Center"
  28. x:Name="scannerGrid"
  29. WidthRequest="{Binding Source={RelativeSource Self}, Path=Height}" >
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="*"/>
  32. <RowDefinition Height="21"/>
  33. <RowDefinition Height="4*"/>
  34. <RowDefinition Height="21"/>
  35. <RowDefinition Height="*"/>
  36. </Grid.RowDefinitions>
  37. <Grid.ColumnDefinitions>
  38. <ColumnDefinition Width="*"/>
  39. <ColumnDefinition Width="21"/>
  40. <ColumnDefinition Width="4*"/>
  41. <ColumnDefinition Width="21"/>
  42. <ColumnDefinition Width="*"/>
  43. </Grid.ColumnDefinitions>
  44. <forms:ZXingScannerView
  45. Grid.Row="0"
  46. Grid.Column="0"
  47. Grid.RowSpan="5"
  48. Grid.ColumnSpan="5"
  49. x:Name="_scanView"
  50. Background="Gray"
  51. OnScanResult="ScanView_OnScanResult"/>
  52. <Polyline Points="20,00 00,00 00,20" Grid.Row="1" Grid.Column="1" x:Name="topleft" Stroke="Red" StrokeThickness="2"/>
  53. <Polyline Points="00,00 20,00 20,20" Grid.Row="1" Grid.Column="3" x:Name="topright" Stroke="Red" StrokeThickness="2"/>
  54. <Polyline Points="20,00 20,20 00,20" Grid.Row="3" Grid.Column="3" x:Name="bottomright" Stroke="Red" StrokeThickness="2"/>
  55. <Polyline Points="20,20 00,20 00,00" Grid.Row="3" Grid.Column="1" x:Name="bottomleft" Stroke="Red" StrokeThickness="2"/>
  56. <Label
  57. Text="Scan Barcode"
  58. TextColor="White"
  59. BackgroundColor="Transparent"
  60. Grid.Row="4"
  61. Grid.Column="0"
  62. Grid.ColumnSpan="5"
  63. HorizontalTextAlignment="Center"
  64. VerticalTextAlignment="Center"/>
  65. </Grid>
  66. </mobile:MobileCard>
  67. <Label
  68. TextColor="{StaticResource Theme.OnBackground}"
  69. FontSize="{StaticResource Theme.Text.Header.Size}"
  70. FontAttributes="Bold"
  71. Text="Barcode"
  72. HorizontalTextAlignment="Center"/>
  73. <Label
  74. TextColor="{StaticResource Theme.OnBackground}"
  75. FontSize="{StaticResource Theme.Text.Body.Size}"
  76. Text="{Binding Item.Barcode}"
  77. HorizontalTextAlignment="Center"/>
  78. <Label
  79. TextColor="{StaticResource Theme.OnBackground}"
  80. FontSize="{StaticResource Theme.Text.Header.Size}"
  81. FontAttributes="Bold"
  82. Text="Description"
  83. HorizontalTextAlignment="Center"/>
  84. <Label
  85. TextColor="{StaticResource Theme.OnBackground}"
  86. FontSize="{StaticResource Theme.Text.Body.Size}"
  87. Text="{Binding Item.Description}"
  88. HorizontalTextAlignment="Center"/>
  89. <Label
  90. TextColor="{StaticResource Theme.OnBackground}"
  91. FontSize="{StaticResource Theme.Text.Header.Size}"
  92. FontAttributes="Bold"
  93. Text="Location"
  94. HorizontalTextAlignment="Center"/>
  95. <Label
  96. TextColor="{StaticResource Theme.OnBackground}"
  97. FontSize="{StaticResource Theme.Text.Body.Size}"
  98. Text="{Binding Item.Location}"
  99. HorizontalTextAlignment="Center"/>
  100. <Label
  101. TextColor="{StaticResource Theme.OnBackground}"
  102. FontSize="{StaticResource Theme.Text.Header.Size}"
  103. FontAttributes="Bold"
  104. Text="Job Details"
  105. HorizontalTextAlignment="Center"/>
  106. <Label
  107. TextColor="{StaticResource Theme.OnBackground}"
  108. FontSize="{StaticResource Theme.Text.Body.Size}"
  109. Text="{Binding Item.Job}"
  110. HorizontalTextAlignment="Center"/>
  111. <Label
  112. TextColor="{StaticResource Theme.OnBackground}"
  113. FontSize="{StaticResource Theme.Text.Header.Size}"
  114. FontAttributes="Bold"
  115. Text="Setout Details"
  116. HorizontalTextAlignment="Center"/>
  117. <Label
  118. TextColor="{StaticResource Theme.OnBackground}"
  119. FontSize="{StaticResource Theme.Text.Body.Size}"
  120. Text="{Binding Item.Setout}"
  121. HorizontalTextAlignment="Center"/>
  122. <Label
  123. TextColor="{StaticResource Theme.OnBackground}"
  124. FontSize="{StaticResource Theme.Text.Header.Size}"
  125. FontAttributes="Bold"
  126. Text="Serial Number"
  127. HorizontalTextAlignment="Center"/>
  128. <Label
  129. TextColor="{StaticResource Theme.OnBackground}"
  130. FontSize="{StaticResource Theme.Text.Body.Size}"
  131. Text="{Binding Item.SerialNumber}"
  132. HorizontalTextAlignment="Center"/>
  133. </StackLayout>
  134. </local:FrameScannerView.Content>
  135. </local:FrameScannerView>