public void RemovePeriodNode_PeriodNodeSelected_SelectionUpdated()
        {
            PeriodsTimelineView view       = timeline.Objects.OfType <PeriodsTimelineView> ().First();
            TimerTimeNodeView   periodNode = (TimerTimeNodeView)view.First();

            Selection sel = new Selection(periodNode, SelectionPosition.All, 0);

            timeline.UpdateSelection(sel);
            project.Periods.Remove(periodNode.Timer.Model as Period);

            Assert.AreEqual(0, timeline.Selections.Count);
        }
Exemplo n.º 2
0
        void AddTimeNode(TimeNodeVM timeNodeVM, TimerVM timerVM)
        {
            TimerTimeNodeView to = new TimerTimeNodeView();

            to.ViewModel       = timeNodeVM;
            to.Timer           = timerVM;
            to.OffsetY         = OffsetY;
            to.Height          = Height;
            to.SecondsPerPixel = SecondsPerPixel;
            to.MaxTime         = Duration;
            to.DraggingMode    = DraggingMode;
            to.ShowName        = true;
            to.LineColor       = LineColor;
            AddNode(to);
        }
Exemplo n.º 3
0
 protected override void ShowMenu(Point coords)
 {
     if (ShowTimerMenuEvent != null &&
         coords.Y >= PeriodsTimeline.OffsetY &&
         coords.Y <= PeriodsTimeline.OffsetY + PeriodsTimeline.Height)
     {
         Timer t = null;
         if (Selections.Count > 0)
         {
             TimerTimeNodeView to = Selections.Last().Drawable as TimerTimeNodeView;
             t = to.Timer.Model;
         }
         ShowTimerMenuEvent(t, VAS.Drawing.Utils.PosToTime(coords, SecondsPerPixel));
     }
 }