Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the jump list manager
        /// with the specified application id.
        /// </summary>
        /// <param name="appId">The application id.</param>
        public JumpListManager(string appId)
        {
            _appId = appId;
            _destinations = new JumpListDestinations();
            _tasks = new JumpListTasks();

            _customDestinationList = (ICustomDestinationList)new CDestinationList();
            if (String.IsNullOrEmpty(_appId))
            {
                _appId = Windows7Taskbar.GetCurrentProcessAppId();
            }
            if (!String.IsNullOrEmpty(_appId))
            {
                _customDestinationList.SetAppID(_appId);
            }

            _displaySettingsChangeHandler = delegate
            {
                RefreshMaxSlots();
            };
            SystemEvents.DisplaySettingsChanged +=
                _displaySettingsChangeHandler;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the jump list manager
        /// with the specified application id.
        /// </summary>
        /// <param name="appId">The application id.</param>
        public JumpListManager(string appId)
        {
            _appId        = appId;
            _destinations = new JumpListDestinations();
            _tasks        = new JumpListTasks();

            _customDestinationList = (ICustomDestinationList) new CDestinationList();
            if (String.IsNullOrEmpty(_appId))
            {
                _appId = Windows7Taskbar.GetCurrentProcessAppId();
            }
            if (!String.IsNullOrEmpty(_appId))
            {
                _customDestinationList.SetAppID(_appId);
            }

            _displaySettingsChangeHandler = delegate
            {
                RefreshMaxSlots();
            };
            SystemEvents.DisplaySettingsChanged +=
                _displaySettingsChangeHandler;
        }