//根据选中日期画图 private void DrawTheDay(object sender, RoutedEventArgs e) { ClearCanvas(); try { DrawPre.getListd(viewModel.NotesList, calendar.SelectedDate.Value); Draw(); } catch (System.InvalidOperationException) { Xceed.Wpf.Toolkit.MessageBox.Show("必须要选中某个日期!"); } }
//当前日期画图 private void DrawDay(object sender, RoutedEventArgs e) { ClearCanvas(); DrawPre.getListd(viewModel.NotesList, DateTime.Now); Draw(); }