示例#1
0
 //根据选中日期画图
 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("必须要选中某个日期!");
     }
 }
示例#2
0
        //将扇形和图例添加到画板中
        private void Draw()
        {
            var shapes = DrawPre.GetShapes();
            var labels = DrawPre.getLabel();

            foreach (var shape in shapes)
            {
                this.canvas.Children.Add(shape);
            }

            foreach (var item in labels)
            {
                this.wrap.Children.Add(item);
            }
        }
示例#3
0
 //当前日期画图
 private void DrawDay(object sender, RoutedEventArgs e)
 {
     ClearCanvas();
     DrawPre.getListd(viewModel.NotesList, DateTime.Now);
     Draw();
 }
示例#4
0
 //清空画板,重置列表
 private void ClearCanvas()
 {
     this.canvas.Children.Clear();
     this.wrap.Children.Clear();
     DrawPre.ClearUp();
 }
示例#5
0
 //画所有的
 private void Draw_Click(object sender, RoutedEventArgs e)
 {
     ClearCanvas();
     DrawPre.getList(viewModel.NotesList);
     Draw();
 }