Пример #1
0
        public static void InitRefreshTimer(this DynamicLayer lyr, TimeSpan interval)
        {
            DynamicLayerTimer tmr = new DynamicLayerTimer {
                BoundLayer = lyr, Interval = interval
            };

            lyr.SetValue(RefreshTimerProperty, tmr);
            tmr.Tick += new EventHandler(tmr_Tick);
        }
Пример #2
0
        static void tmr_Tick(object sender, EventArgs e)
        {
            DynamicLayerTimer tmr = sender as DynamicLayerTimer;

            tmr.BoundLayer.Refresh();
        }
Пример #3
0
        public static void StopRefreshTimer(this DynamicLayer lyr)
        {
            DynamicLayerTimer tmr = (DynamicLayerTimer)lyr.GetValue(RefreshTimerProperty);

            tmr.Stop();
        }