public GraphicsTimerTaskManager(RootGraphic rootgfx)
        {
            _rootgfx = rootgfx;

            //register timer task
            _uiTimerTask          = new UITimerTask(graphicTimer1_Tick);
            _uiTimerTask.Interval = _fastPlanInterval; //fast task plan
            UIPlatform.RegisterTimerTask(_uiTimerTask);
            _uiTimerTask.Enabled = true;
        }
        public GraphicsTimerTaskManager(RootGraphic rootgfx)
        {
            this.rootgfx = rootgfx;

            //register timer task
            uiTimerTask = new UITimerTask(graphicTimer1_Tick);
            uiTimerTask.IntervalInMillisec = fastPlanInterval; //fast task plan
            UIPlatform.RegisterTimerTask(uiTimerTask);
            uiTimerTask.Enabled = true;
        }
Ejemplo n.º 3
0
            public MousePressMonitorHelper(int intervalMs)
            {
                _intervalMs           = intervalMs;
                _mousePressCount      = 0;
                _currentMonitoredElem = null;
                _mousePressEventArgs  = new UIMousePressEventArgs();

                _mousePressMonitor = new UITimerTask(t =>
                {
                    if (_currentMonitoredElem != null)
                    {
                        //invoke mouse press event
                        if (_mousePressCount > 0)
                        {
                            _currentMonitoredElem.ListenMousePress(_mousePressEventArgs);
                        }
                        _mousePressCount++;
                    }
                });
                _mousePressMonitor.Enabled  = true;
                _mousePressMonitor.Interval = intervalMs; //interval for mouse press monitor
                UIPlatform.RegisterTimerTask(_mousePressMonitor);
            }