Exemplo n.º 1
0
        /// <summary>
        /// Closes UI down.
        /// <paramref name="apply">Whether to apply or process the selection or not.</paramref>
        /// </summary>
        public override void OnClose(bool apply)
        {
            _optionsService.SetStringOption(this.Feature, "Search", _search);
            _optionsService.SetBoolOption(this.Feature, "AllFiles", _allFiles);

            if (!apply)
            {
                return;
            }

            if ((this.Selection == null) || (this.Selection.Count() == 0))
            {
                return;
            }

            if (this.SelectionCode)
            {
                _shellHelperService.OpenFiles(this.Selection);

                if (this.CodeBrowserCommandId > 0)
                {
                    var feature = _featureFactory.GetFeature(KnownFeature.CodeBrowser);
                    feature.Execute(this.CodeBrowserCommandId);
                }
            }
            else
            {
                _shellHelperService.OpenDesignerFiles(this.Selection);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Shows first time use message.
        /// </summary>
        private void ShowFirstTimeUse()
        {
            if (_firstTimeUseChecked)
            {
                return;
            }

            try
            {
                if (_optionsService.GetBoolOption(KnownFeature.SupportOptions, WELCOME))
                {
                    return;
                }

                var message = string.Format(WELCOME_TEXT, _packageService.ProductName, _packageService.VSKnownVersion);
                _shellInfoBarService.ShowInfoBar(message, "Assign Keyboard Shortcuts", AssignShortcuts, true);
            }
            finally
            {
                _firstTimeUseChecked = true;
                _optionsService.SetBoolOption(KnownFeature.SupportOptions, WELCOME, true);
            }
        }