119 lines
7.7 KiB
Plaintext
119 lines
7.7 KiB
Plaintext
|
|
<Window x:Class="ReminderOrganizer.TaskWindow"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:models="clr-namespace:ReminderOrganizer.Models"
|
||
|
|
Title="{Binding WindowTitle}"
|
||
|
|
Height="420" Width="420"
|
||
|
|
WindowStartupLocation="CenterOwner"
|
||
|
|
ResizeMode="NoResize"
|
||
|
|
ShowInTaskbar="False"
|
||
|
|
WindowStyle="None"
|
||
|
|
AllowsTransparency="True"
|
||
|
|
Background="Transparent"
|
||
|
|
MouseLeftButtonDown="Window_MouseLeftButtonDown">
|
||
|
|
<Window.Resources>
|
||
|
|
<SolidColorBrush x:Key="PrimaryBrush" Color="#6366F1"/>
|
||
|
|
<SolidColorBrush x:Key="PrimaryHoverBrush" Color="#4F46E5"/>
|
||
|
|
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#1E293B"/>
|
||
|
|
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#64748B"/>
|
||
|
|
<SolidColorBrush x:Key="BorderBrush" Color="#CBD5E1"/>
|
||
|
|
<SolidColorBrush x:Key="CardBrush" Color="#FFFFFF"/>
|
||
|
|
<SolidColorBrush x:Key="InputBackgroundBrush" Color="#F1F5F9"/>
|
||
|
|
</Window.Resources>
|
||
|
|
|
||
|
|
<Border CornerRadius="12" Background="{DynamicResource CardBrush}" Margin="8">
|
||
|
|
<Border.Effect>
|
||
|
|
<DropShadowEffect BlurRadius="20" ShadowDepth="5" Opacity="0.2" Direction="270" Color="Black"/>
|
||
|
|
</Border.Effect>
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<!-- Header -->
|
||
|
|
<Border Grid.Row="0" Background="{DynamicResource PrimaryBrush}" CornerRadius="12,12,0,0" Padding="16,12">
|
||
|
|
<Grid>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Text="📋" FontSize="16" Foreground="White" VerticalAlignment="Center"/>
|
||
|
|
<TextBlock Text="{Binding WindowTitle}" FontSize="14" FontWeight="SemiBold" Foreground="White" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||
|
|
</StackPanel>
|
||
|
|
<Button Content="✕" HorizontalAlignment="Right" Foreground="White" Background="Transparent" BorderThickness="0"
|
||
|
|
Width="28" Height="28" Cursor="Hand" Command="{Binding CancelCommand}"/>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!-- Content -->
|
||
|
|
<StackPanel Grid.Row="1" Margin="16">
|
||
|
|
<TextBlock Text="{Binding NameLabel}" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}" Margin="0,0,0,4"/>
|
||
|
|
<TextBox Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}" Background="{DynamicResource InputBackgroundBrush}"
|
||
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Padding="10,8" FontSize="13"/>
|
||
|
|
|
||
|
|
<Grid Margin="0,12,0,0">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="Auto"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding DateLabel}" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}" Margin="0,0,0,4"/>
|
||
|
|
|
||
|
|
<DatePicker Grid.Row="1" Grid.Column="0" SelectedDate="{Binding ReminderDate, Mode=TwoWay}" Height="32"/>
|
||
|
|
|
||
|
|
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" Margin="8,0,0,0">
|
||
|
|
<ComboBox Width="50" Height="32" SelectedIndex="{Binding SelectedHourIndex}">
|
||
|
|
<ComboBoxItem Content="00"/><ComboBoxItem Content="01"/><ComboBoxItem Content="02"/>
|
||
|
|
<ComboBoxItem Content="03"/><ComboBoxItem Content="04"/><ComboBoxItem Content="05"/>
|
||
|
|
<ComboBoxItem Content="06"/><ComboBoxItem Content="07"/><ComboBoxItem Content="08"/>
|
||
|
|
<ComboBoxItem Content="09"/><ComboBoxItem Content="10"/><ComboBoxItem Content="11"/>
|
||
|
|
<ComboBoxItem Content="12"/><ComboBoxItem Content="13"/><ComboBoxItem Content="14"/>
|
||
|
|
<ComboBoxItem Content="15"/><ComboBoxItem Content="16"/><ComboBoxItem Content="17"/>
|
||
|
|
<ComboBoxItem Content="18"/><ComboBoxItem Content="19"/><ComboBoxItem Content="20"/>
|
||
|
|
<ComboBoxItem Content="21"/><ComboBoxItem Content="22"/><ComboBoxItem Content="23"/>
|
||
|
|
</ComboBox>
|
||
|
|
<TextBlock Text=":" VerticalAlignment="Center" Margin="2,0" FontSize="14"/>
|
||
|
|
<ComboBox Width="50" Height="32" SelectedIndex="{Binding SelectedMinuteIndex}">
|
||
|
|
<ComboBoxItem Content="00"/><ComboBoxItem Content="05"/>
|
||
|
|
<ComboBoxItem Content="10"/><ComboBoxItem Content="15"/>
|
||
|
|
<ComboBoxItem Content="20"/><ComboBoxItem Content="25"/>
|
||
|
|
<ComboBoxItem Content="30"/><ComboBoxItem Content="35"/>
|
||
|
|
<ComboBoxItem Content="40"/><ComboBoxItem Content="45"/>
|
||
|
|
<ComboBoxItem Content="50"/><ComboBoxItem Content="55"/>
|
||
|
|
</ComboBox>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<StackPanel Orientation="Horizontal" Margin="0,12,0,0">
|
||
|
|
<CheckBox IsChecked="{Binding IsRecurring, Mode=TwoWay}" VerticalAlignment="Center"/>
|
||
|
|
<TextBlock Text="🔄" FontSize="12" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
||
|
|
<TextBlock Text="{Binding RecurringLabel}" FontSize="12" Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center" Margin="4,0,0,0"/>
|
||
|
|
<ComboBox Margin="8,0,0,0" Width="90" Height="28" SelectedIndex="{Binding SelectedRecurrenceIndex}" IsEnabled="{Binding IsRecurring}">
|
||
|
|
<ComboBoxItem Content="{Binding DailyText}"/>
|
||
|
|
<ComboBoxItem Content="{Binding WeeklyText}"/>
|
||
|
|
<ComboBoxItem Content="{Binding MonthlyText}"/>
|
||
|
|
<ComboBoxItem Content="{Binding YearlyText}"/>
|
||
|
|
</ComboBox>
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<TextBlock Text="{Binding DescriptionLabel}" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}" Margin="0,12,0,4"/>
|
||
|
|
<TextBox Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}" Background="{DynamicResource InputBackgroundBrush}"
|
||
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Padding="10,6" FontSize="12" Height="40"
|
||
|
|
TextWrapping="Wrap" AcceptsReturn="True"/>
|
||
|
|
|
||
|
|
<TextBlock Text="{Binding ErrorMessage}" Foreground="#EF4444" FontSize="11" Margin="0,8,0,0"
|
||
|
|
Visibility="{Binding HasError, Converter={StaticResource BoolToVisibility}}"/>
|
||
|
|
|
||
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,16,0,0">
|
||
|
|
<Button Content="{Binding CancelText}" Background="Transparent" Foreground="{DynamicResource TextPrimaryBrush}"
|
||
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Padding="16,8" Cursor="Hand" Command="{Binding CancelCommand}"/>
|
||
|
|
<Button Content="{Binding SaveText}" Background="#6366F1" Foreground="White"
|
||
|
|
BorderThickness="0" Padding="16,8" Margin="8,0,0,0" Cursor="Hand" Command="{Binding SaveCommand}"/>
|
||
|
|
</StackPanel>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
</Window>
|