-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDraftViewerWindow.xaml
More file actions
76 lines (71 loc) · 4.68 KB
/
DraftViewerWindow.xaml
File metadata and controls
76 lines (71 loc) · 4.68 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
<Window x:Class="TimeTask.DraftViewerWindow"
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/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TimeTask"
mc:Ignorable="d"
Title="{local:Loc Key=DraftViewer_WindowTitle}" Height="500" Width="700"
WindowStartupLocation="CenterOwner">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Background="#FF3B5998" Grid.Row="0">
<StackPanel Margin="15,10" Orientation="Horizontal">
<TextBlock Text="📋 " FontSize="20"/>
<TextBlock Text="{local:Loc Key=DraftViewer_Header}" FontSize="18" FontWeight="Bold" Foreground="White"/>
<TextBlock x:Name="DraftCountText" Margin="15,0,0,0" FontSize="14" Foreground="White" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<!-- 说明文字 -->
<TextBlock Grid.Row="1" Margin="15,10" TextWrapping="Wrap" Foreground="Gray">
<Run Text="{local:Loc Key=DraftViewer_Description}"/>
</TextBlock>
<!-- 草稿列表 -->
<DataGrid x:Name="DraftsDataGrid" Grid.Row="1" Margin="15,0,15,10"
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
SelectionMode="Extended"
SelectionUnit="FullRow"
RowHeight="60">
<DataGrid.Columns>
<DataGridTextColumn Header="{local:Loc Key=DraftViewer_ColDetectedAt}" Width="120" Binding="{Binding LastDetected, StringFormat='HH:mm:ss'}"/>
<DataGridTextColumn Header="{local:Loc Key=DraftViewer_ColTask}" Width="*" Binding="{Binding CleanedText}"/>
<DataGridTextColumn Header="{local:Loc Key=DraftViewer_ColQuadrant}" Width="100" Binding="{Binding EstimatedQuadrant}"/>
<DataGridTextColumn Header="{local:Loc Key=DraftViewer_ColPriority}" Width="80" Binding="{Binding Importance}"/>
<DataGridTextColumn Header="{local:Loc Key=DraftViewer_ColReminder}" Width="140" Binding="{Binding ReminderTime, StringFormat='yyyy-MM-dd HH:mm'}"/>
<DataGridTextColumn Header="{local:Loc Key=DraftViewer_ColCount}" Width="80" Binding="{Binding DetectionCount}"/>
</DataGrid.Columns>
</DataGrid>
<!-- 按钮栏 -->
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="15">
<Button x:Name="ImportButton" Content="{local:Loc Key=DraftViewer_ButtonImport}" Width="100" Height="35" Margin="0,0,10,0" Click="ImportButton_Click"/>
<Button x:Name="AddToTaskButton" Content="{local:Loc Key=DraftViewer_ButtonAddSelected}" Width="100" Height="35" Margin="0,0,10,0" Click="AddToTaskButton_Click"/>
<Button x:Name="AddAllButton" Content="{local:Loc Key=DraftViewer_ButtonAddAll}" Width="120" Height="35" Margin="0,0,10,0" Click="AddAllButton_Click"/>
<Button x:Name="IgnoreButton" Content="{local:Loc Key=DraftViewer_ButtonIgnore}" Width="80" Height="35" Margin="0,0,10,0" Click="IgnoreButton_Click"/>
<Button x:Name="ClearAllButton" Content="{local:Loc Key=DraftViewer_ButtonClear}" Width="80" Height="35" Margin="0,0,10,0" Click="ClearAllButton_Click"/>
<Button x:Name="CloseButton" Content="{local:Loc Key=DraftViewer_ButtonClose}" Width="80" Height="35" Click="CloseButton_Click"/>
</StackPanel>
<!-- 导入进度遮罩 -->
<Border x:Name="ImportProgressOverlay"
Grid.RowSpan="3"
Background="#CCFFFFFF"
Visibility="Collapsed"
Panel.ZIndex="10">
<Border BorderThickness="1" BorderBrush="#DDDDDD" Background="#F8F8F8" CornerRadius="6"
Padding="20" HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel Width="360">
<TextBlock x:Name="ImportProgressText" Text="{local:Loc Key=DraftViewer_ImportProgressPreparing}"
FontSize="14" FontWeight="SemiBold" Foreground="#333333" TextAlignment="Center"/>
<ProgressBar x:Name="ImportProgressBar" Height="12" Margin="0,12,0,0"
IsIndeterminate="True" Minimum="0" Maximum="100"/>
</StackPanel>
</Border>
</Border>
</Grid>
</Window>