跳到主要内容

github/tai

公开

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

提交记录
修改UI/Controls/Select/DateSelect.cs+10 −5看文件
@@ -62,9 +62,17 @@ namespace UI.Controls.Select
6262 DependencyProperty.Register("Date",
6363 typeof(DateTime),
6464 typeof(DateSelect),
65删除: new PropertyMetadata(DateTime.Now)
65新增: new PropertyMetadata(DateTime.Now, new PropertyChangedCallback(onDateChanged))
6666 );
6767
68新增: private static void onDateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
69新增: {
70新增: var control = d as DateSelect;
71新增: control.Year = control.Date.Year;
72新增: control.Month = control.Date.Month;
73新增: control.SelectedDay = control.Date.Date;
74新增: }
75新增:
6876 public int Year
6977 {
7078 get { return (int)GetValue(YearProperty); }
@@ -157,10 +165,8 @@ namespace UI.Controls.Select
157165 SetMonthCommand = new Command(new Action<object>(OnSetMonth));
158166 DoneCommand = new Command(new Action<object>(OnDone));
159167
160删除: MouseLeftButtonUp += Select_MouseLeftButtonUp;
161168
162169 Year = Date.Year;
163删除:
164170 Month = Date.Month;
165171
166172 //Day = new DayModel()
@@ -169,11 +175,10 @@ namespace UI.Controls.Select
169175 //};
170176
171177 SelectedDay = Date.Date;
172删除:
173178 mouseProc = HookCallback;
174179
175180 Unloaded += DateSelect_Unloaded;
176删除:
181新增: MouseLeftButtonUp += Select_MouseLeftButtonUp;
177182 }
178183
179184