跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

浏览文件

SettingPage.xaml

106 行 · 6.7 KB历史下载
1<Page
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6 xmlns:local="clr-namespace:UI.Views"
7 xmlns:SettingPanel="clr-namespace:UI.Controls.SettingPanel" x:Class="UI.Views.SettingPage"
8 mc:Ignorable="d"
9 d:DesignHeight="450" d:DesignWidth="800"
10 Title="SettingPage"
11 xmlns:Tabbar="clr-namespace:UI.Controls.Tabbar"
12 xmlns:Btn="clr-namespace:UI.Controls.Button" xmlns:select="clr-namespace:UI.Controls.Select" Foreground="{DynamicResource StandardTextBrush}">
13 <StackPanel Margin="20">
14
15 <TextBlock Text="设置" FontSize="18" Margin="0,5,0,20"/>
16 <Tabbar:Tabbar Width="230" HorizontalAlignment="Left" Data="{Binding TabbarData}" SelectedIndex="{Binding TabbarSelectedIndex,Mode=TwoWay}"/>
17
18 <TabControl
19 SelectedIndex="{Binding TabbarSelectedIndex}"
20 BorderThickness="0"
21 Margin="0,15,0,0"
22 Padding="0"
23 Background="Transparent"
24
25 >
26 <TabControl.Resources>
27 <Style TargetType="TabItem">
28 <Setter Property="Template">
29 <Setter.Value>
30 <ControlTemplate TargetType="TabItem">
31 </ControlTemplate>
32 </Setter.Value>
33 </Setter>
34 </Style>
35
36 </TabControl.Resources>
37 <TabItem Foreground="{DynamicResource StandardTextBrush}">
38 <SettingPanel:SettingPanel Data="{Binding Data,Mode=TwoWay}" />
39 </TabItem>
40 <TabItem Foreground="{DynamicResource StandardTextBrush}">
41 <SettingPanel:SettingPanel Data="{Binding Data,Mode=TwoWay}" Margin="0,0,0,10"/>
42 </TabItem>
43 <TabItem Foreground="{DynamicResource StandardTextBrush}">
44 <SettingPanel:SettingPanel Data="{Binding Data,Mode=TwoWay}" Margin="0,0,0,0"/>
45 </TabItem>
46 <TabItem Foreground="{DynamicResource StandardTextBrush}">
47 <!--数据-->
48
49 <StackPanel Margin="0,10,0,0">
50 <TextBlock Text="删除数据" Foreground="#f54f4e" FontSize="14"/>
51 <Border Background="{DynamicResource SettingPanelBgBrush}" Padding="20" CornerRadius="6" Margin="0,10,0,0" BorderBrush="{DynamicResource SettingPanelBorderBrush}" BorderThickness="1">
52 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
53 <TextBlock Text="从" VerticalAlignment="Center"/>
54 <select:DateSelect Date="{Binding DelDataStartMonthDate,Mode=TwoWay}" Margin="10,0" SelectType="Month"/>
55 <TextBlock Text="到" VerticalAlignment="Center"/>
56 <select:DateSelect Date="{Binding DelDataEndMonthDate,Mode=TwoWay}" Margin="10,0" SelectType="Month"/>
57 <Btn:Button Margin="20,0,0,0" Icon="Delete" Content="执行" Width="80" Background="#f51837" Foreground="White" Command="{Binding DelDataCommand}" ToolTip="删除并且不可恢复"/>
58 </StackPanel>
59 </Border>
60 <TextBlock Text="导出数据" FontSize="14" Margin="0,15,0,0"/>
61 <Border Background="{DynamicResource SettingPanelBgBrush}" Padding="20" CornerRadius="6" Margin="0,10,0,0" BorderBrush="{DynamicResource SettingPanelBorderBrush}" BorderThickness="1">
62 <StackPanel>
63 <TextBlock Text="导出为xlsx和csv格式。" Foreground="#989CA1" FontSize="12"/>
64 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
65 <TextBlock Text="从" VerticalAlignment="Center"/>
66 <select:DateSelect Date="{Binding ExportDataStartMonthDate,Mode=TwoWay}" Margin="10,0" SelectType="Month"/>
67 <TextBlock Text="到" VerticalAlignment="Center"/>
68 <select:DateSelect Date="{Binding ExportDataEndMonthDate,Mode=TwoWay}" Margin="10,0" SelectType="Month"/>
69 <Btn:Button Margin="20,0,0,0" Icon="Share" Content="导出" Width="80" Command="{Binding ExportDataCommand}"/>
70 </StackPanel>
71 </StackPanel>
72 </Border>
73 </StackPanel>
74 </TabItem>
75 <TabItem Foreground="{DynamicResource StandardTextBrush}">
76 <!--关于-->
77 <Border Background="{DynamicResource SettingPanelBgBrush}" Padding="20" CornerRadius="6">
78 <StackPanel HorizontalAlignment="Left">
79 <Image Width="25" Source="/Resources/Icons/tai.ico" HorizontalAlignment="Left"/>
80 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
81 <TextBlock VerticalAlignment="Center">
82 <Run Text="Tai 版本号 "/><Run Text="{Binding Version}"/>
83 </TextBlock>
84 <Btn:Button Visibility="{Binding CheckUpdateBtnVisibility}" Command="{Binding CheckUpdate}" Margin="20,0,0,0" VerticalAlignment="Center" Width="120" Icon="SetlockScreen" Content="检查更新"/>
85 </StackPanel>
86 <TextBlock Margin="0,30,0,0">
87 <Hyperlink Command="{Binding OpenURL}" CommandParameter="https://github.com/Planshit/Tai/discussions/279">浏览器统计插件</Hyperlink>
88 </TextBlock>
89 <TextBlock Margin="0,15,0,0">
90 <Run Text="开源 "/><Hyperlink Command="{Binding OpenURL}" CommandParameter="https://github.com/Planshit/Tai">https://github.com/Planshit/Tai</Hyperlink>
91 </TextBlock>
92 <TextBlock Margin="0,5,0,0">
93 <Run Text="讨论 "/><Hyperlink Command="{Binding OpenURL}" CommandParameter="https://github.com/Planshit/Tai/discussions">https://github.com/Planshit/Tai/discussions</Hyperlink>
94 </TextBlock>
95
96 <TextBlock Margin="0,10,0,0">
97 <Run Text="外部资源声明 "/>
98 </TextBlock>
99 <TextBlock Foreground="Gray" Margin="0,5,0,0" Text="Icon 来自微软 Emoji"/>
100 </StackPanel>
101 </Border>
102 </TabItem>
103
104 </TabControl>
105 </StackPanel>
106</Page>