Пример #1
0
 private void DiaryEntryView_MouseMove(object sender, MouseEventArgs e)
 {
     if (e.LeftButton == MouseButtonState.Pressed)
     {
         if (movingModel != null)
         {
             DiaryEntryHolderViewModel d = this.DataContext as DiaryEntryHolderViewModel;
             movingModel.SchedulingTime = d.StartTime.AddMinutes((e.GetPosition(DiaryCanvas).Y - yOffset) * d.MinutesPerPixel);
             if (d.AlteredTasks.Where(x => x.Item.ID == movingModel.Item.ID).Any() == false)
             {
                 d.AlteredTasks.Add(movingModel);
             }
             ((DiaryEntryView)sender).SchedulingTimeTextBlock.Visibility = System.Windows.Visibility.Visible;
         }
     }
     else
     {
         if ((this.DataContext as DiaryEntryHolderViewModel).IsEditable)
         {
             Cursor = Cursors.SizeAll;
         }
     }
 }
Пример #2
0
 public DiaryTimeTick(DiaryEntryHolderViewModel holder)
 {
     _holder = holder;
 }