Example #1
0
        public virtual bool Initialize(StartupArg startupArg)
        {
            _menuWidth = this.Width;
            _panelName = startupArg.PanelType;

            _screenCommon = new ScreenCommon(this);
            _screenCommon.AutoSetScreenLocation = false;

            if (!_screenCommon.Initialize(startupArg))
            {
                MessageBox.Show("Could not initialize form " + Name);
                return(false);
            }

            _rootWidget = _screenCommon.GetRootWidget();
            _hWnd       = startupArg.HWnd;
            if (startupArg.FocusedElement != null)
            {
                OnFocusChanged(startupArg.FocusedElement);
            }

            _screenCommon.GetAnimationManager().EvtPlayerStateChanged += MenuContextMenu_EvtPlayerStateChanged;

            _autoScanTimer           = new AutoScanTimer(startupArg.HWnd, this);
            _autoScanTimer.EvtStart += new AutoScanTimer.StartScan(_autoScanTimer_EvtStart);
            _autoScanTimer.EvtStop  += new AutoScanTimer.StopScan(_autoScanTimer_EvtStop);
            _autoScanTimer.EvtTick  += new AutoScanTimer.Tick(_autoScanTimer_EvtTick);

            return(true);
        }
Example #2
0
        public virtual bool Initialize(StartupArg startupArg)
        {
            _menuWidth = this.Width;
            _panelName = startupArg.PanelType;

            _screenCommon = new ScreenCommon(this);
            _screenCommon.AutoSetScreenLocation = false;

            if (!_screenCommon.Initialize(startupArg))
            {
                MessageBox.Show("Could not initialize form " + Name);
                return false;
            }

            _rootWidget = _screenCommon.GetRootWidget();
            _hWnd = startupArg.HWnd;
            if (startupArg.FocusedElement != null)
            {
                OnFocusChanged(startupArg.FocusedElement);
            }

            _screenCommon.GetAnimationManager().EvtPlayerStateChanged += MenuContextMenu_EvtPlayerStateChanged;

            _autoScanTimer = new AutoScanTimer(startupArg.HWnd, this);
            _autoScanTimer.EvtStart += new AutoScanTimer.StartScan(_autoScanTimer_EvtStart);
            _autoScanTimer.EvtStop += new AutoScanTimer.StopScan(_autoScanTimer_EvtStop);
            _autoScanTimer.EvtTick += new AutoScanTimer.Tick(_autoScanTimer_EvtTick);

            return true;
        }