-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddTaskWindow.xaml
More file actions
119 lines (109 loc) · 7.5 KB
/
AddTaskWindow.xaml
File metadata and controls
119 lines (109 loc) · 7.5 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<Window x:Class="TimeTask.AddTaskWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TimeTask"
mc:Ignorable="d"
Title="{local:Loc Key=AddTask_WindowTitle}"
Height="Auto" Width="400"
WindowStartupLocation="CenterScreen" SizeToContent="Height"
WindowStyle="None" AllowsTransparency="True" Background="Transparent"
MouseLeftButtonDown="Window_MouseLeftButtonDown">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</Window.Resources>
<Border CornerRadius="10" Background="#FFFFE0" BorderBrush="#AAAAAA" BorderThickness="1" Margin="5">
<Border.Effect>
<DropShadowEffect ShadowDepth="2" Color="Gray" Opacity="0.3" BlurRadius="5"/>
</Border.Effect>
<Grid> <!-- This grid will contain the close button and the main content grid -->
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- For the close button area -->
<RowDefinition Height="*"/> <!-- For the main content -->
</Grid.RowDefinitions>
<Button x:Name="CloseButton" Content="✕" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Top"
Width="25" Height="25" Margin="0,5,5,0" FontFamily="Arial" FontWeight="Bold"
Foreground="Gray" Background="Transparent" BorderBrush="{x:Null}" Click="CloseButton_Click">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFE0E0E0"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Grid Grid.Row="1" Margin="15,0,15,15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- Task Description Label -->
<RowDefinition Height="*"/> <!-- TaskDescriptionTextBox -->
<RowDefinition Height="Auto"/> <!-- Clarification Border -->
<RowDefinition Height="Auto"/> <!-- Add to List Label -->
<RowDefinition Height="Auto"/> <!-- LlmSuggestionText -->
<RowDefinition Height="Auto"/> <!-- EnableReminderCheckBox -->
<RowDefinition Height="Auto"/> <!-- ReminderControlsPanel -->
<RowDefinition Height="Auto"/> <!-- ListSelectorComboBox -->
<RowDefinition Height="Auto"/> <!-- Buttons StackPanel -->
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{local:Loc Key=AddTask_LabelDescription}" FontWeight="SemiBold"/>
<TextBox Grid.Row="1" Name="TaskDescriptionTextBox" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Margin="0,5,0,10" MinHeight="60" BorderBrush="#CCCCCC" BorderThickness="1" TextChanged="TaskDescriptionTextBox_TextChanged"/>
<Border Grid.Row="2" Name="SmartAssistantBorder" Background="#FFF6F2D8" BorderBrush="#E2C46E" BorderThickness="1" Padding="8" Margin="0,0,0,10" CornerRadius="6" Visibility="Collapsed">
<StackPanel>
<TextBlock Text="{local:Loc Key=AddTask_SmartAssistantTitle}" FontWeight="SemiBold" Margin="0,0,0,4"/>
<TextBlock Name="SmartTaskSignalText" TextWrapping="Wrap" Margin="0,0,0,2"/>
<TextBlock Name="SmartQuadrantSuggestionText" TextWrapping="Wrap" Margin="0,0,0,2"/>
<TextBlock Name="SmartReminderSuggestionText" TextWrapping="Wrap" Margin="0,0,0,2"/>
<TextBlock Name="SmartPreviewText" TextWrapping="Wrap" FontWeight="SemiBold"/>
</StackPanel>
</Border>
<Border Grid.Row="3" Name="ClarificationBorder" BorderBrush="OrangeRed" BorderThickness="1" Padding="5" Margin="0,0,0,10" Visibility="Collapsed">
<StackPanel>
<TextBlock Name="ClarificationPromptText" TextWrapping="Wrap" Foreground="OrangeRed" FontStyle="Italic" Margin="0,0,0,5" Visibility="Visible"/>
<Button Name="ResetClarificationButton" Content="{local:Loc Key=AddTask_ButtonResetClarification}" HorizontalAlignment="Left" Margin="0,5,0,0" Visibility="Visible" Click="ResetClarificationButton_Click"/>
</StackPanel>
</Border>
<TextBlock Grid.Row="4" Text="{local:Loc Key=AddTask_LabelList}" FontWeight="SemiBold" Margin="0,0,0,5"/>
<TextBlock Grid.Row="5" Name="LlmSuggestionText" TextWrapping="Wrap" FontStyle="Italic" Margin="0,0,0,5" Visibility="Collapsed"/>
<CheckBox Grid.Row="6" Name="EnableReminderCheckBox" Content="{local:Loc Key=AddTask_EnableReminder}" Margin="0,5,0,5" IsChecked="False" Checked="ReminderInput_Changed" Unchecked="ReminderInput_Changed"/>
<StackPanel Grid.Row="7" Name="ReminderControlsPanel" Orientation="Vertical" Margin="0,0,0,10" Visibility="{Binding IsChecked, ElementName=EnableReminderCheckBox, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="{local:Loc Key=AddTask_ReminderDate}" Margin="0,0,0,2"/>
<DatePicker Name="ReminderDatePicker" Margin="0,0,0,5" SelectedDateChanged="ReminderInput_Changed"/>
<TextBlock Text="{local:Loc Key=AddTask_ReminderTime}" Margin="0,0,0,2"/>
<StackPanel Orientation="Horizontal">
<ComboBox Name="ReminderHourComboBox" Width="50" Margin="0,0,5,0" SelectionChanged="ReminderInput_Changed"/>
<TextBlock Text=":" VerticalAlignment="Center"/>
<ComboBox Name="ReminderMinuteComboBox" Width="50" Margin="5,0,0,0" SelectionChanged="ReminderInput_Changed"/>
</StackPanel>
</StackPanel>
<ComboBox Grid.Row="8" Name="ListSelectorComboBox" Margin="0,0,0,15" SelectionChanged="ListSelectorComboBox_SelectionChanged"/>
<StackPanel Grid.Row="9" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="AddTaskButton" Content="{local:Loc Key=AddTask_ButtonAdd}" Width="150" Margin="0,0,10,0" Click="AddTaskButton_Click">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</Button.Resources>
</Button>
<Button Name="CancelButton" Content="{local:Loc Key=AddTask_ButtonCancel}" Width="100" Click="CancelButton_Click">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</Button.Resources>
</Button>
</StackPanel>
</Grid>
</Grid>
</Border>
</Window>