AssignmentView2.xaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <UserControl x:Class="PRSDesktop.AssignmentView2"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800" Background="White">
  9. <UserControl.Resources>
  10. <Style TargetType="syncfusion:TimeRulerCell">
  11. <Setter Property='VerticalContentAlignment' Value="Center" />
  12. </Style>
  13. </UserControl.Resources>
  14. <Grid x:Name="grid">
  15. <Grid.ColumnDefinitions>
  16. <ColumnDefinition Width="*" />
  17. <ColumnDefinition Width="0" x:Name="SideBar" />
  18. </Grid.ColumnDefinitions>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="35" x:Name="DateRow" />
  21. <RowDefinition Height="*" />
  22. <RowDefinition Height="Auto" />
  23. </Grid.RowDefinitions>
  24. <Border
  25. x:Name="DateBorder"
  26. Grid.Row="0"
  27. Grid.Column="0"
  28. BorderBrush="Gray"
  29. BorderThickness="0.75,0.75,0.75,0.75"
  30. Background="WhiteSmoke"
  31. CornerRadius="0,0,0,0"
  32. Margin="0,0,0,2"
  33. Padding="2">
  34. <DockPanel>
  35. <Button
  36. x:Name="ShowSideBar"
  37. DockPanel.Dock="Right"
  38. Content="&lt;"
  39. Width="20"
  40. Margin="0,2,2,2"
  41. Visibility="Visible"
  42. Click="OpenSideBar_Click"/>
  43. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  44. <Button
  45. x:Name="PrevMonth"
  46. BorderThickness="0"
  47. Background="Transparent"
  48. Click="PrevMonth_Click"
  49. Margin="2"/>
  50. <Button
  51. x:Name="PrevDay"
  52. BorderThickness="0"
  53. Background="Transparent"
  54. Click="PrevDay_Click"
  55. Margin="2"/>
  56. <TextBox
  57. x:Name="CurrentDate"
  58. Width="250"
  59. Text="ddd, dd MMMM yyyy"
  60. HorizontalContentAlignment="Center"
  61. Background="Transparent"
  62. VerticalContentAlignment="Center"
  63. MouseDoubleClick="CurrentDate_MouseDoubleClick"
  64. Margin="2" />
  65. <Button
  66. x:Name="NextDay"
  67. BorderThickness="0"
  68. Background="Transparent"
  69. Click="NextDay_Click"
  70. Margin="2"/>
  71. <Button
  72. x:Name="NextMonth"
  73. BorderThickness="0"
  74. Background="Transparent"
  75. Click="NextMonth_Click"
  76. Margin="2"/>
  77. </StackPanel>
  78. </DockPanel>
  79. </Border>
  80. <Border
  81. Grid.Row="0"
  82. Grid.Column="1"
  83. BorderBrush="Gray"
  84. BorderThickness="0,0.75,0.75,0.75"
  85. Background="WhiteSmoke"
  86. CornerRadius="0,0,0,0"
  87. Margin="0,0,0,2"
  88. Padding="2">
  89. <DockPanel>
  90. <Label
  91. DockPanel.Dock="Left"
  92. Content="Team:"
  93. VerticalContentAlignment="Center"
  94. />
  95. <Button
  96. x:Name="HideSideBar"
  97. DockPanel.Dock="Right"
  98. Content="&gt;"
  99. Width="20"
  100. Margin="2,2,2,2"
  101. Click="CloseSideBar_Click"
  102. VerticalAlignment="Stretch"
  103. VerticalContentAlignment="Center"/>
  104. <ComboBox
  105. DockPanel.Dock="Left"
  106. x:Name="Teams"
  107. DisplayMemberPath="Value"
  108. SelectedValuePath="Key"
  109. SelectionChanged="Teams_SelectionChanged"
  110. VerticalAlignment="Stretch"
  111. VerticalContentAlignment="Center"
  112. Margin="0,2,0, 2" />
  113. </DockPanel>
  114. </Border>
  115. <Border Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" BorderBrush="Gray"
  116. BorderThickness="1" Background="WhiteSmoke" Margin="0,0,0,0" Padding="0">
  117. <!-- PreviewMouseRightButtonUp="Bookings_MouseRightButtonUp" -->
  118. <syncfusion:SfScheduler
  119. Grid.Row="0"
  120. Name="Bookings"
  121. SizeChanged="Bookings_SizeChanged"
  122. AppointmentEditorOpening="Schedule_AppointmentEditorOpening"
  123. AppointmentTapped="Bookings_OnAppointmentTapped"
  124. SchedulerContextMenuOpening="Bookings_OnSchedulerContextMenuOpening"
  125. PreviewKeyDown="Bookings_PreviewKeyDown"
  126. AllowDrop="True"
  127. HeaderDateFormat="dd MMM yyyy"
  128. HeaderHeight="0"
  129. Background="LightYellow"
  130. ViewType="Day"
  131. ResourceGroupType="Resource"
  132. >
  133. <syncfusion:SfScheduler.CellContextMenu>
  134. <ContextMenu />
  135. </syncfusion:SfScheduler.CellContextMenu>
  136. <syncfusion:SfScheduler.AppointmentContextMenu>
  137. <ContextMenu />
  138. </syncfusion:SfScheduler.AppointmentContextMenu>
  139. <syncfusion:SfScheduler.DaysViewSettings>
  140. <syncfusion:DaysViewSettings ViewHeaderHeight="0" TimeRulerFormat="HH:mm">
  141. <syncfusion:DaysViewSettings.AppointmentTemplate>
  142. <DataTemplate>
  143. <Border
  144. BorderBrush="Gray"
  145. BorderThickness="0.75"
  146. CornerRadius="3"
  147. Background="{Binding AppointmentBackground}"
  148. Margin="0,0, 0,0">
  149. <Border.ToolTip>
  150. <Grid Margin="4,2,0,2">
  151. <Grid.ColumnDefinitions>
  152. <ColumnDefinition Width="*" />
  153. </Grid.ColumnDefinitions>
  154. <Grid.RowDefinitions>
  155. <RowDefinition Height="Auto" />
  156. <RowDefinition Height="*" />
  157. </Grid.RowDefinitions>
  158. <DockPanel Grid.Row="0" Grid.Column="0" Height="20">
  159. <TextBlock Text="{Binding Number}" DockPanel.Dock="Left"
  160. VerticalAlignment="Center" FontWeight="DemiBold"/>
  161. <TextBlock Text="{Binding JobNumber}" DockPanel.Dock="Left"
  162. VerticalAlignment="Center" FontWeight="DemiBold" />
  163. <Image Source="{Binding Locked}" DockPanel.Dock="Right"
  164. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  165. <Image Source="{Binding Completed}" DockPanel.Dock="Right"
  166. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  167. <Image Source="{Binding TimeSheet}" DockPanel.Dock="Right"
  168. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  169. <Image Source="{Binding HasDelivery}" DockPanel.Dock="Right"
  170. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  171. <TextBlock Text="{Binding Subject}" DockPanel.Dock="Left"
  172. VerticalAlignment="Center" FontWeight="DemiBold" />
  173. </DockPanel>
  174. <TextBlock Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left"
  175. Text="{Binding Notes}" TextWrapping="Wrap" />
  176. </Grid>
  177. </Border.ToolTip>
  178. <Grid Margin="4,2,0,2">
  179. <Grid.ColumnDefinitions>
  180. <ColumnDefinition Width="*" />
  181. </Grid.ColumnDefinitions>
  182. <Grid.RowDefinitions>
  183. <RowDefinition Height="Auto" />
  184. <RowDefinition Height="*" />
  185. </Grid.RowDefinitions>
  186. <DockPanel Grid.Row="0" Grid.Column="0" Height="20">
  187. <TextBlock Text="{Binding Number}" Foreground="{Binding AppointmentForeground}"
  188. DockPanel.Dock="Left" VerticalAlignment="Center"
  189. FontWeight="DemiBold" />
  190. <TextBlock Text="{Binding JobNumber}" DockPanel.Dock="Left"
  191. Foreground="{Binding AppointmentForeground}"
  192. VerticalAlignment="Center" FontWeight="DemiBold" />
  193. <Image Source="{Binding Locked}" DockPanel.Dock="Right"
  194. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  195. <Image Source="{Binding Completed}" DockPanel.Dock="Right"
  196. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  197. <Image Source="{Binding TimeSheet}" DockPanel.Dock="Right"
  198. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  199. <Image Source="{Binding HasDelivery}" DockPanel.Dock="Right"
  200. VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
  201. <TextBlock Text="{Binding Subject}"
  202. Foreground="{Binding AppointmentForeground}" DockPanel.Dock="Left"
  203. VerticalAlignment="Center" FontWeight="DemiBold" />
  204. </DockPanel>
  205. <TextBlock
  206. Grid.Row="1"
  207. Grid.Column="0"
  208. HorizontalAlignment="Left"
  209. Text="{Binding Notes}"
  210. TextWrapping="Wrap"
  211. Foreground="{Binding AppointmentForeground}" />
  212. </Grid>
  213. </Border>
  214. </DataTemplate>
  215. </syncfusion:DaysViewSettings.AppointmentTemplate>
  216. </syncfusion:DaysViewSettings>
  217. </syncfusion:SfScheduler.DaysViewSettings>
  218. </syncfusion:SfScheduler>
  219. </Border>
  220. <syncfusion:CheckListBox
  221. Grid.Row="1"
  222. Grid.Column="2"
  223. Margin="2,0,0,0"
  224. x:Name="Employees"
  225. DisplayMemberPath="Value"
  226. SelectedValuePath="Key"
  227. IsCheckOnFirstClick="True"
  228. SelectionChanged="Employees_SelectionChanged"
  229. BorderBrush="Gray"
  230. BorderThickness="0.75"
  231. Background="LightYellow"
  232. />
  233. <Border
  234. Grid.Row="2"
  235. Grid.Column="2"
  236. BorderBrush="Gray"
  237. BorderThickness="0.75"
  238. Background="WhiteSmoke"
  239. Margin="2,2,0,0"
  240. Padding="3">
  241. <Grid Margin="2">
  242. <Grid.RowDefinitions>
  243. <RowDefinition Height="Auto" />
  244. <RowDefinition Height="Auto" />
  245. </Grid.RowDefinitions>
  246. <Grid.ColumnDefinitions>
  247. <ColumnDefinition Width="Auto" />
  248. <ColumnDefinition Width="*" />
  249. <ColumnDefinition Width="Auto" />
  250. </Grid.ColumnDefinitions>
  251. <Label Content="Start Time" Grid.Row="0" Grid.Column="0" />
  252. <syncfusion:TimeSpanEdit
  253. Grid.Row="0"
  254. Grid.Column="1"
  255. x:Name="StartTime"
  256. ValueChanged="StartTime_OnValueChanged"
  257. TextAlignment="Center"
  258. MinValue="00:00"
  259. MaxValue="1:00:00:00"
  260. Format="hh:mm"
  261. Margin="2" />
  262. <Label x:Name="StartAMPM" Grid.Row="0" Grid.Column="2" Content="AM" />
  263. <Label Content="Finish Time" Grid.Row="3" />
  264. <syncfusion:TimeSpanEdit
  265. x:Name="EndTime"
  266. ValueChanged="EndTime_OnValueChanged"
  267. Grid.Row="3"
  268. Grid.Column="1"
  269. TextAlignment="Center"
  270. MinValue="00:00"
  271. MaxValue="1:00:00:00"
  272. Format="hh:mm"
  273. Margin="2" />
  274. <Label x:Name="EndAMPM" Content="PM" Grid.Row="3" Grid.Column="2" />
  275. </Grid>
  276. </Border>
  277. </Grid>
  278. </UserControl>