コード例 #1
0
        public void OnActionItemClicked(IVsInfoBarUIElement infoBarUIElement, IVsInfoBarActionItem actionItem)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            try
            {
                var context = actionItem.ActionContext as string;

                if (context == CONTEXT_ACTION)
                {
                    _action();
                }
                else if (context == CONTEXT_OPTIONS)
                {
                    _shellHelperService.ShowOptions <OptionsGeneral>();
                }
                else
                {
                    _log.LogMessage($"InfoBar invalid context: {context}", LOG_CATEGORY);
                }
            }
            catch (Exception ex)
            {
                _messageService.ShowError(ex);
            }
        }
コード例 #2
0
 /// <summary>
 /// Shows extension options page.
 /// </summary>
 private void ShowOptionsDialog()
 {
     _shellHelperService.ShowOptions <OptionsGeneral>();
 }