Ejemplo n.º 1
0
        protected void HelpRequestedEventHandler(object sender, HelpRequestedEventArgs e)
        {
            if (_helpView == null)
            {
                if (string.IsNullOrEmpty(e.HelpBaseUri))
                {
                    e.Cancel = true;
                }
                else
                {
                    _helpView = WorkItem.SmartParts.AddNew <ExplorerView>();

                    SmartPartInfo info = new SmartPartInfo();
                    info.Title = string.Format(StringResources.Application_Help_Title, Id);
                    Uri helpUri = new Uri(new Uri(e.HelpBaseUri), Id + "/default.htm");

                    _helpView.SetUrl(info.Title, helpUri.AbsoluteUri);

                    ShellInteractionService.Show(_helpView, info);
                }
            }
            else
            {
                ShellInteractionService.Show(_helpView);
            }
        }
        public void OnHelpRequested(EventArgs e)
        {
            if (_shellModuleService.ActiveModule == _module)
            {
                EventHandler <HelpRequestedEventArgs> temp = HelpRequested;

                ShellConfigurationSection config = ConfigurationManager.GetSection(ShellConfigurationSection.SectionKey) as ShellConfigurationSection;

                HelpRequestedEventArgs args = new HelpRequestedEventArgs();
                args.HelpBaseUri = config.HelpBaseUri;

                if (temp != null)
                {
                    temp(this, args);
                }
                else
                {
                    args.Cancel = true;
                }

                if (args.Cancel)
                {
                    IMessageBoxView messageBoxView = _workItem.SmartParts.AddNew <MessageBoxView>();
                    messageBoxView.Show(_shellView.Model.Module.Title, StringResources.No_Help_Message, null, Infrastructure.MessageBoxButton.Ok, Infrastructure.MessageBoxImage.Information);
                }
            }
        }
Ejemplo n.º 3
0
 private void HelpRequestedEventHandler(object sender, HelpRequestedEventArgs e)
 {
     if (string.IsNullOrEmpty(omsSessionContext.HelpUrl))
     {
         e.Cancel = true;
     }
     else
     {
         Imi.SupplyChain.UX.Views.IExplorerView _helpView1 = WorkItem.SmartParts.AddNew <Imi.SupplyChain.UX.Views.ExplorerView>();
         SmartPartInfo _helpInfo1 = new SmartPartInfo();
         _helpInfo1.Title = Resources.HelpTabTitle;
         Uri helpUri = new Uri(omsSessionContext.HelpUrl);
         _helpView1.SetUrl(_helpInfo1.Title, helpUri.AbsoluteUri);
         ShellInteractionService.Show(_helpView1, _helpInfo1);
     }
 }
Ejemplo n.º 4
0
        static void _scriptEditor_BeforeHelpRequested(object sender, HelpRequestedEventArgs args)
        {
            if (!HtmlHelp2Environment.Config.UseForKeywordHelp)
            {
                return;
            }

            if (args == null || String.IsNullOrEmpty(args.RequestedFor))
            {
                return;
            }

            switch (HtmlHelp2Environment.Config.PadType)
            {
            case F1PadType.Index:
                ShowIndexMenuCommand indexCmd = new ShowIndexMenuCommand();
                indexCmd.Run();
                if (HtmlHelp2IndexPad.Current == null)
                {
                    throw new Exception("Can supply help with Help2 Index!");
                }
                HtmlHelp2IndexPad.Current.Search(args.RequestedFor);
                break;

            case F1PadType.Search:
                ShowSearchMenuCommand searchCmd = new ShowSearchMenuCommand();
                searchCmd.InitializeSearchPad();
                if (HtmlHelp2SearchPad.Current == null)
                {
                    throw new Exception("Can not supply help with Help2 Search!");
                }
                HtmlHelp2SearchPad.Current.PerformSearch(args.RequestedFor);
                break;

            default:
                throw new Exception("Unsupported F1 pad type!");
            }

            args.Cancel = HtmlHelp2Environment.Config.CancelDefaultBehaviour;
        }
Ejemplo n.º 5
0
 void _scriptEditor_AfterHelpRequested(object sender, HelpRequestedEventArgs args)
 {
     AddEvent("ScriptEditor.AfterHelpRequested. Args = " + args.ToString());
 }