Beispiel #1
0
        public void Initialize(
            List <TimelineEvent> events,
            bool sorted = false
            )
        {
            Debug.Assert(events != null);

            if (!sorted)
            {
                events.Sort(new Comparison <TimelineEvent>((l, r) => DateTime.Compare(l.StartDate, r.StartDate)));
            }
            m_list = events;

            m_hasDuration = false;
            m_initialized = false;

            if (m_list.Count > 0)
            {
                SingleDelayedInvoke.Invoke(new Action(() =>
                {
                    InitSearch();
                    m_initialized = true;
                }), INDEX_CREATION_DELAY);
            }
            else
            {
                m_byStart     = null;
                m_initialized = false;
            }
        }
Beispiel #2
0
        public static void Invoke(
            Action action,
            int delay
            )
        {
            SingleDelayedInvoke d;

            d = new SingleDelayedInvoke(delay);
            d.Invoke(action);
        }
Beispiel #3
0
        public void DisplayEvents(bool animate = false)
        {
            if (m_parent.TimelineTray.ImmediateDisplay ||
                m_displayExecTime <= SingleDelayedInvoke.MINIMAL_UI_DELAY)
            {
                m_displayExecTime = DisplayEventsImpl(false, animate);
            }
            else
            {
                m_delayInvoke.Invoke(() =>
                {
                    DisplayEventsImpl(true, false);

                    m_delayComplete.Invoke(() =>
                    {
                        m_displayExecTime = DisplayEventsImpl(false, false);
                    });
                });
            }
        }
Beispiel #4
0
        public static void Invoke(
            Action                                      action,
            int                                         delay
        )
        {
            SingleDelayedInvoke                         d;

            d = new SingleDelayedInvoke(delay);
            d.Invoke(action);
        }