This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathReportWindow.xaml
70 lines (69 loc) · 4 KB
/
ReportWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<Window
x:Class="Furtherance.ReportWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Furtherance"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Closed="Window_Closed"
mc:Ignorable="d">
<Grid Width="400" RowSpacing="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ComboBox x:Name="timeframeCombo" Header="Timeframe" SelectedIndex="1" PlaceholderText="Pick a timeframe" Width="200" HorizontalAlignment="Center" SelectionChanged="Timeframe_SelectionChanged">
<x:String>Past week</x:String>
<x:String>This month</x:String>
<x:String>Past 30 days</x:String>
<x:String>Past 180 days</x:String>
<x:String>Past year</x:String>
<x:String>Date range</x:String>
</ComboBox>
<StackPanel x:Name="pickADatePanel" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20" Visibility="Collapsed" Grid.Row="1">
<CalendarDatePicker x:Name="startCalendar" PlaceholderText="Pick a date" Header="From" DateChanged="Calendar_DateChanged"/>
<CalendarDatePicker x:Name="endCalendar" PlaceholderText="Pick a date" Header="To" DateChanged="Calendar_DateChanged"/>
</StackPanel>
<RadioButtons x:Name="sortRadio" Header="Sort by:" MaxColumns="2" HorizontalAlignment="Center" SelectedIndex="0" Grid.Row="2">
<RadioButton Content="Task"/>
<RadioButton Content="Tag"/>
</RadioButtons>
<CheckBox x:Name="filterCheck" Content="Filter by task or tags" HorizontalAlignment="Center" Click="Filter_Checked" Grid.Row="3"/>
<StackPanel x:Name="filterPanel" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="5" Visibility="Collapsed" Grid.Row="4">
<ComboBox x:Name="filterCombo" Width="100" SelectedIndex="0">
<x:String>Tasks</x:String>
<x:String>Tags</x:String>
</ComboBox>
<TextBox x:Name="filterTextBox" Width="200" HorizontalAlignment="Center" PlaceholderText="Task, Task 2"/>
</StackPanel>
<Button Content="Refresh" HorizontalAlignment="Center" Click="Refresh_Click" Grid.Row="5"/>
<TextBlock x:Name="totalTimeText" Visibility="Collapsed" TextAlignment="Center" FontWeight="Bold" Grid.Row="6"/>
<TreeView x:Name="TreeViewData" Grid.Row="7">
<TreeView.ItemTemplate>
<DataTemplate x:DataType="local:TaskReportGroup">
<TreeViewItem ItemsSource="{x:Bind TaskReportSubGroup}">
<TreeViewItem.Content>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="taskNameBlock" Text="{x:Bind Key}" TextTrimming="CharacterEllipsis"/>
<TextBlock Text="{x:Bind TotalTime}" TextAlignment="Right" Grid.Column="1" Margin="0 0 15 0" TextTrimming="CharacterEllipsis"/>
</Grid>
</TreeViewItem.Content>
</TreeViewItem>
</DataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</Grid>
</Window>