WindowTasks.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <Window x:Class="PPC.WindowTasks"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:PPC"
  7. mc:Ignorable="d"
  8. Title="Задачи" Height="1080" Width="1450">
  9. <Window.Resources>
  10. <Style x:Key="Text1">
  11. <Setter Property="TextBlock.FontFamily" Value="Abel [RUS by Daymarius]"/>
  12. <Setter Property="TextBlock.FontSize" Value="50"/>
  13. <Setter Property="TextBlock.Foreground" Value="Black"/>
  14. <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
  15. </Style>
  16. <Style x:Key="Text2">
  17. <Setter Property="TextBlock.FontFamily" Value="Kadwa"/>
  18. <Setter Property="TextBlock.FontSize" Value="30"/>
  19. <Setter Property="TextBlock.Foreground" Value="Black"/>
  20. <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
  21. </Style>
  22. <Style x:Key="Text3">
  23. <Setter Property="TextBlock.FontFamily" Value="Kadwa"/>
  24. <Setter Property="TextBlock.FontSize" Value="22"/>
  25. <Setter Property="TextBlock.Foreground" Value="Black"/>
  26. <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
  27. <Setter Property="TextBlock.Height" Value="70"/>
  28. </Style>
  29. <Style x:Key="Text4">
  30. <Setter Property="TextBlock.FontFamily" Value="Abel [RUS by Daymarius]"/>
  31. <Setter Property="TextBlock.FontSize" Value="36"/>
  32. <Setter Property="TextBlock.Foreground" Value="Black"/>
  33. <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
  34. <Setter Property="TextBlock.Height" Value="70"/>
  35. <Setter Property="TextBlock.Margin" Value="10"/>
  36. </Style>
  37. <Style x:Key="Text5">
  38. <Setter Property="TextBlock.FontFamily" Value="Abel [RUS by Daymarius]"/>
  39. <Setter Property="TextBlock.FontSize" Value="22"/>
  40. <Setter Property="TextBlock.Foreground" Value="Black"/>
  41. <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
  42. </Style>
  43. <Style TargetType="{x:Type TabItem}">
  44. <Setter Property="Template">
  45. <Setter.Value>
  46. <ControlTemplate TargetType="{x:Type TabItem}">
  47. <Border>
  48. <Grid>
  49. <Grid>
  50. <Border x:Name="border"
  51. Background="Silver"/>
  52. </Grid>
  53. <ContentPresenter ContentSource="Header"
  54. HorizontalAlignment="Center"
  55. VerticalAlignment="Center"
  56. Style="{StaticResource Text5}"/>
  57. </Grid>
  58. </Border>
  59. <ControlTemplate.Triggers>
  60. <Trigger Property="IsMouseOver"
  61. Value="True">
  62. <Setter TargetName="border"
  63. Property="Background"
  64. Value="Silver" />
  65. </Trigger>
  66. <Trigger Property="IsSelected"
  67. Value="True">
  68. <Setter TargetName="border"
  69. Property="Background"
  70. Value="#E84545" />
  71. </Trigger>
  72. </ControlTemplate.Triggers>
  73. </ControlTemplate>
  74. </Setter.Value>
  75. </Setter>
  76. </Style>
  77. <Style x:Key="but1" TargetType="Button">
  78. <Setter Property="Margin" Value="10"/>
  79. <Setter Property="Background" Value="#E84545"/>
  80. <Setter Property="BorderThickness" Value="0"/>
  81. <Setter Property="Height" Value="50"/>
  82. <Setter Property="TextBlock.FontFamily" Value="Abel [RUS by Daymarius]"/>
  83. <Setter Property="TextBlock.FontSize" Value="22"/>
  84. <Setter Property="TextBlock.Foreground" Value="Black"/>
  85. <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
  86. <Setter Property="Template">
  87. <Setter.Value>
  88. <ControlTemplate TargetType="{x:Type Button}">
  89. <Border Background="{TemplateBinding Background}">
  90. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  91. </Border>
  92. </ControlTemplate>
  93. </Setter.Value>
  94. </Setter>
  95. <Style.Triggers>
  96. <Trigger Property="IsMouseOver" Value="True">
  97. <Setter Property="Background" Value="#F88D8D"/>
  98. </Trigger>
  99. <Trigger Property="IsPressed" Value="True">
  100. <Setter Property="Background" Value="#E84545"/>
  101. </Trigger>
  102. </Style.Triggers>
  103. </Style>
  104. </Window.Resources>
  105. <Grid Background="#2B2E4A">
  106. <Grid.RowDefinitions>
  107. <RowDefinition></RowDefinition>
  108. </Grid.RowDefinitions>
  109. <Grid.ColumnDefinitions>
  110. <ColumnDefinition Width="1.5*"></ColumnDefinition>
  111. <ColumnDefinition Width="2.5*"></ColumnDefinition>
  112. </Grid.ColumnDefinitions>
  113. <StackPanel Grid.Row="0" Grid.Column="0" Background="White" Margin="15,10,15,10">
  114. <StackPanel Orientation="Horizontal" MouseLeftButtonDown="StackPanel_GotFocus">
  115. <Image Source="/WindowTasks/Avatarka.png" Height="100" Width="100" Margin="10"/>
  116. <TextBlock Style="{StaticResource Text1}" >
  117. <TextBlock.Text>
  118. <MultiBinding StringFormat="{}{0} {1}">
  119. <Binding Path="Name" />
  120. <Binding Path="Surname" />
  121. </MultiBinding>
  122. </TextBlock.Text>
  123. </TextBlock>
  124. </StackPanel>
  125. <Line X1="800" Y1="0" X2="0" Y2="0" Stroke="#2B2E4A" StrokeThickness="7"></Line>
  126. <StackPanel Orientation="Horizontal" Margin="10">
  127. <TextBlock Style="{StaticResource Text1}">Задачи</TextBlock>
  128. </StackPanel>
  129. <TabControl Margin="0" x:Name="ListTab" TabStripPlacement="Bottom" SelectionChanged="ClicToTab">
  130. <TabItem Header="Активные" x:Name="tabActive" Width="250" Height="40" Margin="0">
  131. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" CanContentScroll="True" Height="700" Margin="0 5 5 10">
  132. <ListBox BorderThickness="0" ItemsSource="{Binding Active_task}" SelectedItem="{Binding SelectedTask}" Width="auto" Height="auto">
  133. <ListBox.ItemTemplate>
  134. <DataTemplate>
  135. <StackPanel Orientation="Vertical" Width="645">
  136. <StackPanel Orientation="Horizontal" Height="50" Margin="10">
  137. <Ellipse Fill="#E84545" Width="16" Height="16"></Ellipse>
  138. <TextBlock Style="{StaticResource Text2}" TextTrimming="WordEllipsis" Width="640" Text="{Binding Path=Name_task}" Margin="12 0 0 0"/>
  139. </StackPanel>
  140. <TextBlock Style="{StaticResource Text3}" TextTrimming="WordEllipsis" TextWrapping="Wrap" MaxHeight="56" Width="635" Margin="10 0 0 0" Text="{Binding Path=Description_task}"/>
  141. </StackPanel>
  142. </DataTemplate>
  143. </ListBox.ItemTemplate>
  144. </ListBox>
  145. </ScrollViewer>
  146. </TabItem>
  147. <TabItem x:Name="tabComplete" Header="Завершенные" Width="250" Height="40" >
  148. <ScrollViewer HorizontalScrollBarVisibility ="Disabled" VerticalScrollBarVisibility="Auto" CanContentScroll="True" Height="700" Margin="0 5 5 10">
  149. <ListBox BorderThickness="0" ItemsSource="{Binding Complete_task}" SelectedItem="{Binding SelectedTask}" Margin="0" Width="auto" Height="auto">
  150. <ListBox.ItemTemplate>
  151. <DataTemplate>
  152. <StackPanel Orientation="Vertical" Width="645">
  153. <StackPanel Orientation="Horizontal" Height="50" Margin="10">
  154. <Ellipse Fill="#E84545" Width="16" Height="16"></Ellipse>
  155. <TextBlock Style="{StaticResource Text2}" TextTrimming="WordEllipsis" Width="640" Text="{Binding Path=Name_task}" Margin="12 0 0 0"/>
  156. </StackPanel>
  157. <TextBlock Style="{StaticResource Text3}" TextTrimming="WordEllipsis" TextWrapping="Wrap" MaxHeight="56" Width="635" Margin="10 0 0 0" Text="{Binding Path=Description_task}"/>
  158. </StackPanel>
  159. </DataTemplate>
  160. </ListBox.ItemTemplate>
  161. </ListBox>
  162. </ScrollViewer>
  163. </TabItem>
  164. </TabControl>
  165. </StackPanel>
  166. <StackPanel DataContext="{Binding SelectedTask}" Grid.Row="0" Grid.Column="1" Background="White" Margin="10">
  167. <TextBlock Style="{StaticResource Text1}" Text="{Binding Name_task, UpdateSourceTrigger=PropertyChanged}" Margin="10 15 0 20" Foreground="Black"/>
  168. <StackPanel Orientation="Horizontal">
  169. <TextBlock Style="{StaticResource Text4}" Width="365">Дата начала</TextBlock>
  170. <TextBlock Style="{StaticResource Text4}" Text="{Binding Date_start_job, UpdateSourceTrigger=PropertyChanged}"/>
  171. </StackPanel>
  172. <StackPanel Orientation="Horizontal">
  173. <TextBlock Style="{StaticResource Text4}" Width="365">Дата окончания</TextBlock>
  174. <TextBlock Style="{StaticResource Text4}" Text="{Binding Date_finish_job, UpdateSourceTrigger=PropertyChanged}"/>
  175. </StackPanel>
  176. <Border Margin="10 0 10 0" BorderBrush="Silver" BorderThickness="1" CornerRadius="8,8,3,3">
  177. <ScrollViewer HorizontalScrollBarVisibility ="Disabled" CanContentScroll="True" VerticalScrollBarVisibility ="Hidden" Height="630">
  178. <StackPanel Margin="10">
  179. <TextBlock Style="{StaticResource Text4}" TextWrapping="WrapWithOverflow" Text="{Binding Description_task, UpdateSourceTrigger=PropertyChanged}" Height="auto"/>
  180. </StackPanel>
  181. </ScrollViewer>
  182. </Border>
  183. <Button x:Name="but_complete" Style="{StaticResource but1}" Click="complete_task">Выполнено</Button>
  184. </StackPanel>
  185. </Grid>
  186. </Window>