Browse Source

included (with his permission) Sebastian Ullrich's code for the Contents pad

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5846 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Mathias Simmack 15 years ago
parent
commit
0990d2cac0
  1. 17
      src/AddIns/Misc/HelpViewer/HelpViewer.addin
  2. 5
      src/AddIns/Misc/HelpViewer/HelpViewer.csproj
  3. 5
      src/AddIns/Misc/HelpViewer/HelpViewer.sln
  4. 10
      src/AddIns/Misc/HelpViewer/Source/Commands.cs
  5. 3
      src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs

17
src/AddIns/Misc/HelpViewer/HelpViewer.addin

@ -23,4 +23,21 @@
<Path name = "/SharpDevelop/Dialogs/OptionsDialog/ToolsOptions"> <Path name = "/SharpDevelop/Dialogs/OptionsDialog/ToolsOptions">
<OptionPanel id = "Help3Options" label = "Microsoft Help Viewer" class = "MSHelpSystem.Help3OptionsPanel" /> <OptionPanel id = "Help3Options" label = "Microsoft Help Viewer" class = "MSHelpSystem.Help3OptionsPanel" />
</Path> </Path>
<Path name = "/SharpDevelop/Workbench/Pads">
<Pad id = "Help3TocPad"
category = "Help3"
title = "Contents"
icon = "HtmlHelp2.16x16.Toc"
class = "MSHelpSystem.Controls.Help3TocPad"
defaultPosition = "Right, Hidden" />
</Path>
<Path name = "/SharpDevelop/Workbench/MainMenu/Help">
<MenuItem id = "Help3DisplayContentCommand"
class = "MSHelpSystem.Commands.DisplayContent"
label = "Display Content"
shortcut = "Control|Alt|F1"
insertbefore = "Separator1" />
</Path>
</AddIn> </AddIn>

5
src/AddIns/Misc/HelpViewer/HelpViewer.csproj

@ -65,6 +65,9 @@
</Compile> </Compile>
<Compile Include="Configuration\AssemblyInfo.cs" /> <Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Source\BrowserScheme.cs" /> <Compile Include="Source\BrowserScheme.cs" />
<Compile Include="Source\Controls\Pads.cs" />
<Compile Include="Source\Controls\TocEntry.cs" />
<Compile Include="Source\Controls\TocPadControl.xaml.cs" />
<Compile Include="Source\Core\DisplayHelp.cs" /> <Compile Include="Source\Core\DisplayHelp.cs" />
<Compile Include="Source\Core\Help3Catalog.cs" /> <Compile Include="Source\Core\Help3Catalog.cs" />
<Compile Include="Source\Core\Help3Environment.cs" /> <Compile Include="Source\Core\Help3Environment.cs" />
@ -86,8 +89,10 @@
<Folder Include="Source" /> <Folder Include="Source" />
<Folder Include="Source\Core" /> <Folder Include="Source\Core" />
<Folder Include="Source\Helper" /> <Folder Include="Source\Helper" />
<Folder Include="Source\Controls" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="Source\Controls\TocPadControl.xaml" />
<Page Include="Source\Help3OptionsPanel.xaml" /> <Page Include="Source\Help3OptionsPanel.xaml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

5
src/AddIns/Misc/HelpViewer/HelpViewer.sln

@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 11.00 
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # Visual Studio 2010
# SharpDevelop 4.0.0.5828 # SharpDevelop 4.0.0.5845
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}"
EndProject EndProject
Global Global

10
src/AddIns/Misc/HelpViewer/Source/Commands.cs

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using MSHelpSystem.Core; using MSHelpSystem.Core;
using MSHelpSystem.Controls;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
@ -36,4 +37,13 @@ namespace MSHelpSystem.Commands
} }
} }
} }
public class DisplayContent : AbstractMenuCommand
{
public override void Run()
{
PadDescriptor toc = WorkbenchSingleton.Workbench.GetPad(typeof(Help3TocPad));
if (toc != null) toc.BringPadToFront();
}
}
} }

3
src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs

@ -120,8 +120,7 @@ namespace MSHelpSystem.Core
static void DisplayLocalHelp(string arguments) static void DisplayLocalHelp(string arguments)
{ {
// TODO: set "embedded" to TRUE if we have a TOC control or something similar DisplayLocalHelp(arguments, true);
DisplayLocalHelp(arguments, false);
} }
static void DisplayLocalHelp(string arguments, bool embedded) static void DisplayLocalHelp(string arguments, bool embedded)

Loading…
Cancel
Save