Example #1
0
        void Add(Event @event)
        {
            var tick = new FixtureTick();

            tick.Event            = @event;
            tick.OnRemove         = Remove;
            tick.OnChangePosition = ChangePosition;
            tick.Initialize();

            Canvas.SetBottom(tick, 0);

            if (tick.Event.Channel == Channel.Super)
            {
                Canvas.SetBottom(tick, Height / 2);
            }
            else
            {
                Canvas.SetBottom(tick, 0);
            }

            double offset = @event.StartTime.Subtract(Events.StartTime).TotalSeconds *WidthMultiplier;

            Canvas.SetLeft(tick, offset);
            Canvas.Children.Add(tick);

            eventsInRuler.Add(@event);
        }
Example #2
0
        void ChangePosition(FixtureTick tick)
        {
            double offset = tick.Event.StartTime.Subtract(Events.StartTime).TotalSeconds *WidthMultiplier;

            Canvas.SetLeft(tick, offset);
        }
Example #3
0
 void Remove(FixtureTick tick)
 {
     eventsInRuler.Remove(tick.Event);
     Canvas.Children.Remove(tick);
 }