Inheritance: MonoBehaviour
        void LoadToc()
        {
            if (!Help3Environment.IsLocalHelp)
            {
                DataContext = null;
            }
            else
            {
                DataContext = new[] { new TocEntry("-1")
                                      {
                                          Title = StringParser.Parse("${res:AddIns.HelpViewer.HelpLibraryRootTitle}")
                                      } }
            };
        }

        void Help3TocItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            string topicId = (string)tocTreeView.SelectedValue;

            if (!string.IsNullOrEmpty(topicId))
            {
                LoggingService.Debug(string.Format("HelpViewer: TocItemChanged to ID \"{0}\"", topicId));
                DisplayHelp.Page(topicId);
            }
        }

        void Help3ServiceConfigurationUpdated(object sender, EventArgs e)
        {
            LoadToc();
        }
    }
Ejemplo n.º 2
0
        public override void Run()
        {
            var view = (System.Windows.Controls.ListView)Owner;

            foreach (var t in view.SelectedItems.OfType <SDTask>().ToArray())
            {
                if (t.BuildError == null)
                {
                    continue;
                }

                string code = t.BuildError.ErrorCode;
                if (string.IsNullOrEmpty(code))
                {
                    return;
                }

                if (Help3Environment.IsHelp3ProtocolRegistered)
                {
                    LoggingService.Debug(string.Format("HelpViewer: Getting description of \"{0}\"", code));
                    if (Help3Environment.IsLocalHelp)
                    {
                        DisplayHelp.Keywords(code);
                    }
                    else
                    {
                        DisplayHelp.ContextualHelp(code);
                    }
                }
                else
                {
                    LoggingService.Error("HelpViewer: Help system ist not initialized");
                }
            }
        }
Ejemplo n.º 3
0
        public override void Run()
        {
            ICSharpCode.SharpDevelop.Gui.TaskView view = (TaskView)Owner;

            foreach (Task t in new List <Task>(view.SelectedTasks))
            {
                if (t.BuildError == null)
                {
                    continue;
                }

                string code = t.BuildError.ErrorCode;
                if (string.IsNullOrEmpty(code))
                {
                    return;
                }

                if (Help3Environment.IsHelp3ProtocolRegistered)
                {
                    LoggingService.Debug(string.Format("Help 3.0: Getting description of \"{0}\"", code));
                    if (Help3Environment.IsLocalHelp)
                    {
                        DisplayHelp.Keywords(code);
                    }
                    else
                    {
                        DisplayHelp.ContextualHelp(code);
                    }
                }
                else
                {
                    LoggingService.Error("Help 3.0: Help system ist not initialized");
                }
            }
        }
Ejemplo n.º 4
0
 public override void GoHome(HtmlViewPane pane)
 {
     if (pane == null)
     {
         throw new ArgumentNullException("pane");
     }
     DisplayHelp.Catalog();
 }
Ejemplo n.º 5
0
 public override bool TryShowHelp(string fullTypeName)
 {
     if (string.IsNullOrEmpty(fullTypeName))
     {
         throw new ArgumentNullException("fullTypeName");
     }
     LoggingService.Info(string.Format("HelpViewer: TryShowHelp calls \"{0}\"", fullTypeName));
     return(DisplayHelp.ContextualHelp(fullTypeName));
 }
Ejemplo n.º 6
0
 public override bool TryShowHelp(string fullTypeName)
 {
     if (string.IsNullOrEmpty(fullTypeName))
     {
         throw new ArgumentNullException("fullTypeName");
     }
     LoggingService.Info(string.Format("Help 3.0: Calling \"TryShowHelp\" with {0}", fullTypeName));
     return(DisplayHelp.ContextualHelp(fullTypeName));
 }
Ejemplo n.º 7
0
 public override bool TryShowHelpByKeyword(string keyword)
 {
     if (string.IsNullOrEmpty(keyword))
     {
         throw new ArgumentNullException("keyword");
     }
     LoggingService.Info(string.Format("HelpViewer: TryShowHelpByKeyword calls \"{0}\"", keyword));
     DisplayHelp.Keywords(keyword);
     return(true);
 }
Ejemplo n.º 8
0
 public override bool TryShowHelpByKeyword(string keyword)
 {
     if (string.IsNullOrEmpty(keyword))
     {
         throw new ArgumentNullException("keyword");
     }
     LoggingService.Info(string.Format("Help 3.0: Calling \"TryShowHelpByKeyword\" with {0}", keyword));
     DisplayHelp.Keywords(keyword);
     return(true);
 }
Ejemplo n.º 9
0
 public override void Run()
 {
     if (Help3Service.Config.ExternalHelp)
     {
         DisplayHelp.Catalog();
     }
     else
     {
         PadDescriptor toc = WorkbenchSingleton.Workbench.GetPad(typeof(Help3TocPad));
         if (toc != null)
         {
             toc.BringPadToFront();
         }
     }
 }
        void DoSearchClicked(object sender, RoutedEventArgs e)
        {
            string term = searchCB.Text;

            if (!string.IsNullOrEmpty(term))
            {
                searchCB.Text = "";
                if (searchTerms.IndexOf(term) < 0)
                {
                    searchTerms.Insert(0, term);
                }
                else
                {
                    searchTerms.Move(searchTerms.IndexOf(term), 0);
                }
                DisplayHelp.Search(term);
            }
        }
Ejemplo n.º 11
0
 public override void Run()
 {
     if (!Help3Environment.IsHelp3ProtocolRegistered)
     {
         using (HelpLibraryManagerNotFoundForm form = new HelpLibraryManagerNotFoundForm()) {
             form.ShowDialog(SD.WinForms.MainWin32Window);
         }
         return;
     }
     if (Help3Service.Config.ExternalHelp)
     {
         DisplayHelp.Catalog();
     }
     else
     {
         PadDescriptor toc = SD.Workbench.GetPad(typeof(Help3TocPad));
         if (toc != null)
         {
             toc.BringPadToFront();
         }
     }
 }