git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5842 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00 |
||||
# SharpDevelop 2.0.0.658 |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}" |
||||
EndProject |
||||
Global |
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
Debug|Any CPU = Debug|Any CPU |
||||
Release|Any CPU = Release|Any CPU |
||||
EndGlobalSection |
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
{918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
EndGlobalSection |
||||
EndGlobal |
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
Imports System.Reflection |
||||
Imports System.Runtime.CompilerServices |
||||
|
||||
' Information about this assembly is defined by the following |
||||
' attributes. |
||||
' |
||||
' Change them to the information which is associated with the assembly |
||||
' you compile. |
||||
|
||||
<assembly: AssemblyTitle("Java Script Globals Helper")> |
||||
<assembly: AssemblyDescription("Persists JavaScript variables used by the .NET Framework documentation")> |
||||
<assembly: AssemblyConfiguration("")> |
||||
<assembly: AssemblyCompany("ic#code")> |
||||
<assembly: AssemblyProduct("SharpDevelop")> |
||||
<assembly: AssemblyCopyright("2006 AlphaSierraPapa")> |
||||
<assembly: AssemblyTrademark("")> |
||||
<assembly: AssemblyCulture("")> |
||||
|
||||
' The assembly version has following format : |
||||
' |
||||
' Major.Minor.Build.Revision |
||||
' |
||||
' You can specify all values by your own or you can build default build and revision |
||||
' numbers with the '*' character (the default): |
||||
|
||||
<assembly: AssemblyVersion("1.0.0.1")> |
@ -1,65 +0,0 @@
@@ -1,65 +0,0 @@
|
||||
' <file> |
||||
' <copyright see="prj:///doc/copyright.txt"/> |
||||
' <license see="prj:///doc/license.txt"/> |
||||
' <owner name="John Simons" email="John.SIMONS@dewr.gov.au"/> |
||||
' <version>$Revision$</version> |
||||
' </file> |
||||
|
||||
Imports System.Runtime.InteropServices |
||||
|
||||
<ComVisible(True)> _ |
||||
Public Class JScriptExternal |
||||
Dim jScriptGlobals As New JScriptGlobals |
||||
|
||||
Public ReadOnly Property Globals() As JScriptGlobals |
||||
Get |
||||
Return jScriptGlobals |
||||
End Get |
||||
End Property |
||||
End Class |
||||
|
||||
<ComVisible(True)> _ |
||||
Public Class JScriptGlobals |
||||
Dim variableValueCol As New Dictionary(Of String, String) |
||||
Dim variablePersistCol As New Dictionary(Of String, Boolean) |
||||
|
||||
Public Property VariableValueCollection() As Dictionary(Of String, String) |
||||
Get |
||||
Return variableValueCol |
||||
End Get |
||||
Set |
||||
variableValueCol = value |
||||
End Set |
||||
End Property |
||||
|
||||
Public Property VariablePersistCollection() As Dictionary(Of String, Boolean) |
||||
Get |
||||
Return variablePersistCol |
||||
End Get |
||||
Set |
||||
variablePersistCol = value |
||||
End Set |
||||
End Property |
||||
|
||||
Public Function VariableExists(ByVal key As String) As Boolean |
||||
Return variableValueCol.ContainsKey(key) |
||||
End Function |
||||
|
||||
Public Default Property VariableValue(ByVal key As String) As Object |
||||
Get |
||||
Return variableValueCol(key) |
||||
End Get |
||||
Set |
||||
variableValueCol(key) = value |
||||
End Set |
||||
End Property |
||||
|
||||
Public Property VariablePersists(ByVal key As String) As Boolean |
||||
Get |
||||
Return variablePersistCol(key) |
||||
End Get |
||||
Set |
||||
variablePersistCol(key) = value |
||||
End Set |
||||
End Property |
||||
End Class |
@ -1,53 +0,0 @@
@@ -1,53 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<PropertyGroup> |
||||
<OutputType>Library</OutputType> |
||||
<RootNamespace>HtmlHelp2.JScriptGlobals</RootNamespace> |
||||
<AssemblyName>HtmlHelp2JScriptGlobals</AssemblyName> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<MyType>Windows</MyType> |
||||
<ProjectGuid>{E54A5AD2-418D-4A85-BA5E-CD803DE38715}</ProjectGuid> |
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks> |
||||
<OptionExplicit>On</OptionExplicit> |
||||
<OptionStrict>Off</OptionStrict> |
||||
<OptionCompare>Binary</OptionCompare> |
||||
<RegisterForComInterop>False</RegisterForComInterop> |
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> |
||||
<BaseAddress>120586240</BaseAddress> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
<WarningLevel>4</WarningLevel> |
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||
<OutputPath>bin\Debug\</OutputPath> |
||||
<Optimize>False</Optimize> |
||||
<DefineConstants>DEBUG,TRACE</DefineConstants> |
||||
<DebugSymbols>true</DebugSymbols> |
||||
<DebugType>Full</DebugType> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||
<OutputPath>bin\Release\</OutputPath> |
||||
<Optimize>True</Optimize> |
||||
<DefineConstants>TRACE</DefineConstants> |
||||
<DebugSymbols>False</DebugSymbols> |
||||
<DebugType>None</DebugType> |
||||
</PropertyGroup> |
||||
<ItemGroup> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.Data" /> |
||||
<Reference Include="System.Xml" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Import Include="Microsoft.VisualBasic" /> |
||||
<Import Include="System" /> |
||||
<Import Include="System.Collections" /> |
||||
<Import Include="System.Collections.Generic" /> |
||||
<Import Include="System.Data" /> |
||||
<Import Include="System.Diagnostics" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Compile Include="Globals.vb" /> |
||||
<Compile Include="AssemblyInfo.vb" /> |
||||
</ItemGroup> |
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.Targets" /> |
||||
</Project> |
@ -1,23 +0,0 @@
@@ -1,23 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Mathias Simmack" email="mathias@simmack.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System.Reflection; |
||||
using System.Security.Permissions; |
||||
|
||||
// Information about this assembly is defined by the following
|
||||
// attributes.
|
||||
//
|
||||
// change them to the information which is associated with the assembly
|
||||
// you compile.
|
||||
|
||||
[assembly: AssemblyTitle("Microsoft Help 2.0 Environment")] |
||||
[assembly: AssemblyDescription("Integrates Microsoft Help 2.0 in SharpDevelop")] |
||||
[assembly: AssemblyConfiguration("")] |
||||
[assembly: AssemblyTrademark("")] |
||||
[assembly: AssemblyCulture("")] |
||||
|
||||
[assembly: System.CLSCompliant(false)] |
@ -1,125 +0,0 @@
@@ -1,125 +0,0 @@
|
||||
<AddIn name = "Help 2.0 Environment for SharpDevelop" |
||||
author = "Mathias Simmack" |
||||
description = "integrates Microsoft's Help 2.0 Environment" |
||||
addInManagerHidden = "preinstalled"> |
||||
|
||||
<Manifest> |
||||
<Identity name = "ICSharpCode.HtmlHelp2"/> |
||||
<Dependency addin="SharpDevelop"/> |
||||
</Manifest> |
||||
|
||||
<Runtime> |
||||
<Import assembly="HtmlHelp2.dll"/> |
||||
</Runtime> |
||||
|
||||
<Path name = "/SharpDevelop/Views/Browser/SchemeExtensions"> |
||||
<BrowserSchemeExtension id = "ms-help" class = "HtmlHelp2.BrowserScheme"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Services/HelpProvider"> |
||||
<Class id = "HtmlHelp2" class = "HtmlHelp2.MSHelpProvider"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Workbench/Pads"> |
||||
<Pad id = "TocPad" |
||||
category = "Help2" |
||||
title = "${res:AddIns.HtmlHelp2.Contents}" |
||||
icon = "HtmlHelp2.16x16.Toc" |
||||
class = "HtmlHelp2.HtmlHelp2TocPad" |
||||
defaultPosition = "Right, Hidden" /> |
||||
<Pad id = "IndexPad" |
||||
category = "Help2" |
||||
title = "${res:AddIns.HtmlHelp2.Index}" |
||||
icon = "HtmlHelp2.16x16.Index" |
||||
class = "HtmlHelp2.HtmlHelp2IndexPad" |
||||
defaultPosition = "Right, Hidden" /> |
||||
<Pad id = "SearchPad" |
||||
category = "Help2" |
||||
title = "${res:AddIns.HtmlHelp2.Search}" |
||||
icon = "HtmlHelp2.16x16.Search" |
||||
class = "HtmlHelp2.HtmlHelp2SearchPad" |
||||
defaultPosition = "Right, Hidden" /> |
||||
<Pad id = "IndexResultsPad" |
||||
category = "Help2" |
||||
title = "${res:AddIns.HtmlHelp2.IndexResults}" |
||||
icon = "HtmlHelp2.16x16.IndexResults" |
||||
class = "HtmlHelp2.HtmlHelp2IndexResultsPad" |
||||
defaultPosition = "Bottom, Hidden" /> |
||||
<Pad id = "DynamicHelpPad" |
||||
category = "Help2" |
||||
title = "${res:AddIns.HtmlHelp2.DynamicHelp}" |
||||
icon = "HtmlHelp2.16x16.DynamicHelp" |
||||
class = "HtmlHelp2.HtmlHelp2DynamicHelpPad" |
||||
defaultPosition = "Right, Hidden" /> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Dialogs/OptionsDialog/ToolsOptions"> |
||||
<OptionPanel id = "HtmlHelp2Options" |
||||
label = "${res:AddIns.HtmlHelp2.Environment}" |
||||
class = "HtmlHelp2.Environment.HtmlHelp2OptionsPanel"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Workbench/MainMenu/Help"> |
||||
<MenuItem id = "HtmlHelp2Separator2" |
||||
type = "Separator" |
||||
insertafter = "Help"/> |
||||
<MenuItem id = "TocPadCommand" |
||||
insertafter = "HtmlHelp2Separator2" |
||||
label = "${res:AddIns.HtmlHelp2.Contents}" |
||||
icon = "HtmlHelp2.16x16.Toc" |
||||
shortcut = "Control|Alt|F1" |
||||
class = "HtmlHelp2.ShowTocMenuCommand"/> |
||||
<MenuItem id = "IndexPadCommand" |
||||
label = "${res:AddIns.HtmlHelp2.Index}" |
||||
icon = "HtmlHelp2.16x16.Index" |
||||
shortcut = "Control|Alt|F2" |
||||
class = "HtmlHelp2.ShowIndexMenuCommand" |
||||
insertafter = "TocPadCommand"/> |
||||
<MenuItem id = "SearchPadCommand" |
||||
label = "${res:AddIns.HtmlHelp2.SearchCommand}" |
||||
icon = "HtmlHelp2.16x16.Search" |
||||
shortcut = "Control|Alt|F3" |
||||
class = "HtmlHelp2.ShowSearchMenuCommand" |
||||
insertafter = "IndexPadCommand"/> |
||||
<MenuItem id = "IndexResultsPadCommand" |
||||
label = "${res:AddIns.HtmlHelp2.IndexResults}" |
||||
icon = "HtmlHelp2.16x16.IndexResults" |
||||
shortcut = "Shift|Alt|F2" |
||||
class = "HtmlHelp2.ShowIndexResultsMenuCommand" |
||||
insertafter = "SearchPadCommand" |
||||
insertbefore = "Separator1"/> |
||||
<MenuItem id = "DynamicHelpPadCommand" |
||||
insertbefore = "TocPadCommand" |
||||
label = "${res:AddIns.HtmlHelp2.DynamicHelp}" |
||||
icon = "HtmlHelp2.16x16.DynamicHelp" |
||||
shortcut = "Control|F1" |
||||
class = "HtmlHelp2.ShowDynamicHelpMenuCommand"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/ViewContent/Browser/Toolbar"> |
||||
<Condition name = "BrowserLocation" urlRegex = "^ms-help:\/\/" action="Exclude"> |
||||
<ToolbarItem id = "SyncHelpTopic" |
||||
icon = "Icons.16x16.ArrowLeftRight" |
||||
tooltip = "${res:AddIns.HtmlHelp2.SyncTOC}" |
||||
class = "HtmlHelp2.SyncTocCommand" |
||||
insertafter = "NewWindow"/> |
||||
<ToolbarItem id = "PreviousHelpTopic" |
||||
icon = "Icons.16x16.ArrowUp" |
||||
tooltip = "${res:AddIns.HtmlHelp2.PreviousTopic}" |
||||
class = "HtmlHelp2.PreviousTopicCommand" |
||||
insertafter = "SyncHelpTopic"/> |
||||
<ToolbarItem id = "NextHelpTopic" |
||||
icon = "Icons.16x16.ArrowDown" |
||||
tooltip = "${res:AddIns.HtmlHelp2.NextTopic}" |
||||
class = "HtmlHelp2.NextTopicCommand" |
||||
insertafter = "PreviousHelpTopic"/> |
||||
</Condition> |
||||
</Path> |
||||
|
||||
<!-- Show Error Help item --> |
||||
<Path name="/SharpDevelop/Pads/ErrorList/TaskContextMenu"> |
||||
<MenuItem id = "ShowHelp" |
||||
label = "Show Help" |
||||
class = "HtmlHelp2.Commands.ShowErrorHelpCommand"/> |
||||
</Path> |
||||
</AddIn> |
@ -1,143 +0,0 @@
@@ -1,143 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> |
||||
<PropertyGroup> |
||||
<OutputType>Library</OutputType> |
||||
<RootNamespace>HtmlHelp2</RootNamespace> |
||||
<AssemblyName>HtmlHelp2</AssemblyName> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<ProjectGuid>{918487B7-2153-4618-BBB3-344DBDDF2A2A}</ProjectGuid> |
||||
<ProductVersion>8.0.50215</ProductVersion> |
||||
<SchemaVersion>2.0</SchemaVersion> |
||||
<Win32Resource>Resources\dynamichelp.res</Win32Resource> |
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> |
||||
<NoStdLib>False</NoStdLib> |
||||
<RegisterForComInterop>False</RegisterForComInterop> |
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> |
||||
<BaseAddress>119537664</BaseAddress> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
<FileAlignment>4096</FileAlignment> |
||||
<WarningLevel>4</WarningLevel> |
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
||||
<SourceAnalysisOverrideSettingsFile>C:\SharpDevelop Projects\0\SharpDevelop 3\src\AddIns\Misc\HtmlHelp2\Project\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
||||
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\HtmlHelp2\</OutputPath> |
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||
<Optimize>False</Optimize> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
||||
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\HtmlHelp2\</OutputPath> |
||||
<Optimize>true</Optimize> |
||||
<DefineConstants>TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||
<DebugType>Full</DebugType> |
||||
<DebugSymbols>true</DebugSymbols> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||
<DebugType>None</DebugType> |
||||
<DebugSymbols>false</DebugSymbols> |
||||
</PropertyGroup> |
||||
<ItemGroup> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.Core" /> |
||||
<Reference Include="System.Xml" /> |
||||
<Reference Include="System.Drawing" /> |
||||
<Reference Include="stdole"> |
||||
<HintPath>..\RequiredLibraries\stdole.dll</HintPath> |
||||
<SpecificVersion>False</SpecificVersion> |
||||
</Reference> |
||||
<Reference Include="MSHelpControls"> |
||||
<HintPath>..\RequiredLibraries\MSHelpControls.dll</HintPath> |
||||
<SpecificVersion>False</SpecificVersion> |
||||
</Reference> |
||||
<Reference Include="MSHelpServices"> |
||||
<HintPath>..\RequiredLibraries\MSHelpServices.dll</HintPath> |
||||
<SpecificVersion>False</SpecificVersion> |
||||
</Reference> |
||||
<Reference Include="System.Windows.Forms" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Compile Include="src\BaseControls\TocPad.cs"> |
||||
<SubType>UserControl</SubType> |
||||
</Compile> |
||||
<Compile Include="src\BaseControls\DynamicHelpPad.cs"> |
||||
<SubType>UserControl</SubType> |
||||
</Compile> |
||||
<None Include="src\BaseControls\FavoritesPad.cs" /> |
||||
<Compile Include="src\BaseControls\IndexPad.cs"> |
||||
<SubType>UserControl</SubType> |
||||
</Compile> |
||||
<Compile Include="src\BaseControls\IndexResultsPad.cs" /> |
||||
<Compile Include="src\BaseControls\SearchPad.cs" /> |
||||
<Compile Include="src\BaseControls\SearchResultsPad.cs"> |
||||
<SubType>UserControl</SubType> |
||||
</Compile> |
||||
<Compile Include="src\BrowserControl\ShowHelpBrowser.cs" /> |
||||
<None Include="HtmlHelp2.addin"> |
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
</None> |
||||
<Compile Include="src\Commands\ShowErrorHelpCommand.cs" /> |
||||
<Compile Include="src\Service\Help2RegistryWalker.cs" /> |
||||
<Compile Include="src\Service\HtmlHelp2Dialog.cs"> |
||||
<SubType>Form</SubType> |
||||
</Compile> |
||||
<Compile Include="src\Service\HtmlHelp2Service.cs" /> |
||||
<Compile Include="src\Service\ResourcesHelper.cs" /> |
||||
<Compile Include="src\Service\Help2ControlsValidation.cs" /> |
||||
<Compile Include="src\Service\AxMSHelpControls.cs"> |
||||
<SubType>Component</SubType> |
||||
</Compile> |
||||
<Compile Include="src\Service\HtmlHelp2Options.cs" /> |
||||
<Compile Include="Configuration\AssemblyInfo.cs" /> |
||||
<None Include="Resources\Favorites.16x16.Delete.bmp" /> |
||||
<None Include="Resources\Favorites.16x16.MoveDown.bmp" /> |
||||
<None Include="Resources\Favorites.16x16.MoveUp.bmp" /> |
||||
<None Include="Resources\Favorites.16x16.Rename.bmp" /> |
||||
<EmbeddedResource Include="Resources\HtmlHelp2Options.xfrm" /> |
||||
<EmbeddedResource Include="Resources\HtmlHelp2.16x16.TextZoom.png" /> |
||||
<None Include="Resources\HtmlHelp2.16x16.AddToFavorites.png" /> |
||||
<Compile Include="src\BrowserControl\HelpBrowserCommands.cs" /> |
||||
<Compile Include="src\BrowserScheme.cs" /> |
||||
<EmbeddedResource Include="Resources\HtmlHelp2.16x16.Print.bmp" /> |
||||
<Compile Include="src\MsHelpProvider.cs" /> |
||||
<EmbeddedResource Include="Resources\HtmlHelp2.16x16.Search.png" /> |
||||
<EmbeddedResource Include="Resources\HtmlHelp2.16x16.Toc.png" /> |
||||
<EmbeddedResource Include="Resources\HtmlHelp2.16x16.Index.png" /> |
||||
<Compile Include="src\Service\SharpDevLanguageClass.cs" /> |
||||
<Compile Include="..\..\..\..\Main\GlobalAssemblyInfo.cs"> |
||||
<Link>Configuration\GlobalAssemblyInfo.cs</Link> |
||||
</Compile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\Project\NRefactory.csproj"> |
||||
<Project>{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}</Project> |
||||
<Name>NRefactory</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj"> |
||||
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project> |
||||
<Name>ICSharpCode.SharpDevelop</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj"> |
||||
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project> |
||||
<Name>ICSharpCode.Core</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\JScriptGlobals\HtmlHelp2JScriptGlobals.vbproj"> |
||||
<Project>{E54A5AD2-418D-4A85-BA5E-CD803DE38715}</Project> |
||||
<Name>HtmlHelp2JScriptGlobals</Name> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj"> |
||||
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project> |
||||
<Name>ICSharpCode.SharpDevelop.Dom</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<Folder Include="src\Commands" /> |
||||
</ItemGroup> |
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> |
||||
</Project> |
@ -1,5 +0,0 @@
@@ -1,5 +0,0 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<PropertyGroup> |
||||
<LastOpenVersion>8.0.50215</LastOpenVersion> |
||||
</PropertyGroup> |
||||
</Project> |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 824 B |
Before Width: | Height: | Size: 751 B |
Before Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 834 B |
@ -1,53 +0,0 @@
@@ -1,53 +0,0 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="HtmlHelp2Options" /> |
||||
<ClientSize value="{Width=360, Height=320}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox1" /> |
||||
<Location value="{X=8, Y=8}" /> |
||||
<Text value="${res:AddIns.HtmlHelp2.Options.Groupbox}" /> |
||||
<Size value="{Width=344, Height=112}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.ComboBox> |
||||
<Name value="help2Collections" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=312, Height=21}" /> |
||||
<FormattingEnabled value="True" /> |
||||
<DropDownStyle value="DropDownList" /> |
||||
<Location value="{X=16, Y=75}" /> |
||||
</System.Windows.Forms.ComboBox> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Location value="{X=16,Y=27}" /> |
||||
<Text value="${res:AddIns.HtmlHelp2.Options.Label}" /> |
||||
<Size value="{Width=312, Height=45}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
</System.Windows.Forms.Label> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox2" /> |
||||
<Location value="{X=8, Y=130}" /> |
||||
<Text value="${res:AddIns.HtmlHelp2.Options.AdditionOptions}" /> |
||||
<Size value="{Width=344, Height=55}" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="tocPictures" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Size value="{Width=312, Height=23}" /> |
||||
<Location value="{X=16, Y=20}" /> |
||||
<Text value="${res:AddIns.HtmlHelp2.Options.ShowTocPictures}" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
Before Width: | Height: | Size: 274 B |
@ -1,10 +0,0 @@
@@ -1,10 +0,0 @@
|
||||
@echo off |
||||
setlocal |
||||
set RC="K:\Programme\Microsoft.NET\SDK\v2.0\Bin\rc.exe" |
||||
|
||||
if not exist %RC% goto ExitJump |
||||
if exist dynamichelp.res del dynamichelp.res |
||||
%RC% /fo "dynamichelp.res" "dynamichelp.rc" |
||||
|
||||
set RC= |
||||
:ExitJump |
@ -1,48 +0,0 @@
@@ -1,48 +0,0 @@
|
||||
<html> |
||||
<head> |
||||
<title>Dynamic Help</title> |
||||
<STYLE><!-- |
||||
|
||||
body { |
||||
overflow-y: auto; |
||||
margin: 5px 5px 5px 5px; |
||||
font-family: Tahoma; |
||||
font-size: 8pt; |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.section { |
||||
margin-top: 5px; |
||||
margin-bottom: 35px; |
||||
} |
||||
|
||||
.link { |
||||
color:darkblue; |
||||
background-color:transparent; |
||||
text-decoration:underline; |
||||
cursor:pointer; |
||||
} |
||||
|
||||
--> |
||||
</STYLE> |
||||
<script type="text/javascript"><!-- |
||||
|
||||
function ExpandCollapse(idx) |
||||
{ |
||||
var contentSpan = document.getElementById("content_" + idx); |
||||
if(contentSpan != null) |
||||
{ |
||||
contentSpan.style.display = (contentSpan.style.display == "none")?"":"none"; |
||||
} |
||||
|
||||
var sectionImage = document.getElementById("image_" + idx); |
||||
if(sectionImage != null) |
||||
{ |
||||
sectionImage.src = (contentSpan.style.display == "none")?"close":"open"; |
||||
} |
||||
} |
||||
|
||||
--></script> |
||||
</head> |
||||
<body></body> |
||||
</html> |
@ -1,10 +0,0 @@
@@ -1,10 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////// |
||||
// |
||||
// HTML RESOURCES |
||||
// |
||||
|
||||
#define RT_HTML 23 |
||||
|
||||
context RT_HTML "context.html" |
||||
open RT_HTML "OpenBook.png" |
||||
close RT_HTML "ClosedBook.png" |
@ -1,635 +0,0 @@
@@ -1,635 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Collections.Specialized; |
||||
using System.Drawing; |
||||
using System.Globalization; |
||||
using System.Reflection; |
||||
using System.Security.Permissions; |
||||
using System.Windows.Forms; |
||||
|
||||
using HtmlHelp2.Environment; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; |
||||
using ICSharpCode.SharpDevelop.Dom; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
using MSHelpServices; |
||||
using ICSharpCode.NRefactory; |
||||
using ICSharpCode.SharpDevelop.Editor; |
||||
|
||||
public class ShowDynamicHelpMenuCommand : AbstractMenuCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
PadDescriptor dynamicHelp = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2DynamicHelpPad)); |
||||
if (dynamicHelp != null) dynamicHelp.BringPadToFront(); |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2DynamicHelpPad : AbstractPadContent |
||||
{ |
||||
HtmlHelp2DynamicHelpBrowserControl dynamicHelpBrowser; |
||||
private List<string> dynamicHelpTerms = new List<string>(); |
||||
private Location lastPoint = Location.Empty; |
||||
private string debugPreElement = String.Empty; |
||||
private bool enableDebugInfo = HtmlHelp2Environment.Config.DynamicHelpDebugInfos; |
||||
|
||||
public override object Control |
||||
{ |
||||
get { return dynamicHelpBrowser; } |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public HtmlHelp2DynamicHelpPad() |
||||
{ |
||||
dynamicHelpBrowser = new HtmlHelp2DynamicHelpBrowserControl(); |
||||
dynamicHelpBrowser.LoadDynamicHelpPage(); |
||||
|
||||
ParserService.ParserUpdateStepFinished += UpdateTick; |
||||
PropertyPad.SelectedObjectChanged += new EventHandler(this.FormsDesignerSelectedObjectChanged); |
||||
PropertyPad.SelectedGridItemChanged += new SelectedGridItemChangedEventHandler(this.FormsDesignerSelectedGridItemChanged); |
||||
ProjectService.SolutionClosed += new EventHandler(this.SolutionClosed); |
||||
|
||||
HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); |
||||
ResourceService.LanguageChanged += delegate { dynamicHelpBrowser.RedrawContent(); }; |
||||
} |
||||
|
||||
#region Dynamic Help Calls
|
||||
private void BuildDynamicHelpList() |
||||
{ |
||||
try |
||||
{ |
||||
dynamicHelpBrowser.RemoveAllChildren(); |
||||
this.debugPreElement = string.Empty; |
||||
bool helpResults = false; |
||||
Cursor.Current = Cursors.WaitCursor; |
||||
|
||||
foreach (string currentHelpTerm in this.dynamicHelpTerms) |
||||
{ |
||||
if (!currentHelpTerm.StartsWith("!")) |
||||
{ |
||||
helpResults = (this.CallDynamicHelp(currentHelpTerm, false) || helpResults); |
||||
} |
||||
} |
||||
foreach (string currentHelpTerm in this.dynamicHelpTerms) |
||||
{ |
||||
if (currentHelpTerm.StartsWith("!")) |
||||
{ |
||||
helpResults = (this.CallDynamicHelp(currentHelpTerm.Substring(1)) || helpResults); |
||||
} |
||||
} |
||||
|
||||
Cursor.Current = Cursors.Default; |
||||
|
||||
// debug info
|
||||
if (this.enableDebugInfo) |
||||
{ |
||||
this.debugPreElement += |
||||
string.Format(CultureInfo.InvariantCulture, "<br>Current project language: {0}", SharpDevLanguage.GetPatchedLanguage()); |
||||
dynamicHelpBrowser.CreateDebugPre(this.debugPreElement); |
||||
} |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException ex) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Dynamic Help Call Exception; " + ex.ToString()); |
||||
} |
||||
} |
||||
|
||||
private bool CallDynamicHelp(string searchTerm) |
||||
{ |
||||
return this.CallDynamicHelp(searchTerm, true); |
||||
} |
||||
|
||||
private bool CallDynamicHelp(string searchTerm, bool keywordSearch) |
||||
{ |
||||
if (!HtmlHelp2Environment.SessionIsInitialized || HtmlHelp2Environment.DynamicHelpIsBusy) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
IHxTopicList topics = HtmlHelp2Environment.GetMatchingTopicsForDynamicHelp(searchTerm); |
||||
bool result = (topics != null && topics.Count > 0); |
||||
|
||||
if (result) |
||||
{ |
||||
// debug info
|
||||
this.debugPreElement += |
||||
string.Format(CultureInfo.InvariantCulture, |
||||
"{0} ({1}): {2} {3}<br>", searchTerm, (keywordSearch)?"Kwd":"DH", |
||||
topics.Count, (topics.Count==1)?"topic":"topics"); |
||||
|
||||
List<IHxTopic> newTopics = SortTopics(topics); |
||||
foreach (IHxTopic topic in newTopics) |
||||
{ |
||||
if ((keywordSearch)?SharpDevLanguage.CheckUniqueTopicLanguage(topic):SharpDevLanguage.CheckTopicLanguage(topic)) |
||||
{ |
||||
this.BuildNewChild(topic.Location, |
||||
topic.get_Title(HxTopicGetTitleType.HxTopicGetRLTitle, |
||||
HxTopicGetTitleDefVal.HxTopicGetTitleFileName), |
||||
topic.URL); |
||||
} |
||||
} |
||||
} |
||||
return result; |
||||
} |
||||
|
||||
private void BuildNewChild(string sectionName, string topicName, string topicUrl) |
||||
{ |
||||
try { |
||||
dynamicHelpBrowser.BuildNewChild(sectionName, topicName, topicUrl); |
||||
} catch (NullReferenceException ex) { |
||||
// HACK: the code doesn't properly check for nulls, so we just ignore errors.
|
||||
// There were bug reports with BuildNewChild crashing simply on a layout change.
|
||||
// e.g. http://community.sharpdevelop.net/forums/t/9180.aspx
|
||||
LoggingService.Warn(ex); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Taken from DefinitionView.cs
|
||||
private void UpdateTick(object sender, ParserUpdateStepEventArgs e) |
||||
{ |
||||
WorkbenchSingleton.SafeThreadAsyncCall(UpdateTick, e); |
||||
} |
||||
|
||||
void UpdateTick(ParserUpdateStepEventArgs e) |
||||
{ |
||||
this.dynamicHelpTerms.Clear(); |
||||
ResolveResult res = ResolveAtCaret(e); |
||||
if (res == null) return; |
||||
|
||||
if (res != null && res.ResolvedType != null) |
||||
{ |
||||
this.AddToStringCollection(res.ResolvedType.FullyQualifiedName); |
||||
} |
||||
|
||||
MemberResolveResult member = res as MemberResolveResult; |
||||
NamespaceResolveResult nspace = res as NamespaceResolveResult; |
||||
MethodGroupResolveResult method = res as MethodGroupResolveResult; |
||||
TypeResolveResult types = res as TypeResolveResult; |
||||
|
||||
if (member != null && member.ResolvedMember != null) |
||||
{ |
||||
this.AddToStringCollection(0, member.ResolvedMember.FullyQualifiedName); |
||||
} |
||||
if (nspace != null) |
||||
{ |
||||
this.AddToStringCollection(0, nspace.Name); |
||||
} |
||||
if (method != null && method.ContainingType != null) |
||||
{ |
||||
this.AddToStringCollection(0, method.ContainingType.FullyQualifiedName); |
||||
} |
||||
if (types != null && types.ResolvedClass != null) |
||||
{ |
||||
this.AddToStringCollection(0, types.ResolvedClass.FullyQualifiedName); |
||||
} |
||||
|
||||
BuildDynamicHelpList(); |
||||
} |
||||
|
||||
private ResolveResult ResolveAtCaret(ParserUpdateStepEventArgs e) |
||||
{ |
||||
IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; |
||||
if (window == null) return null; |
||||
ITextEditorProvider provider = window.ActiveViewContent as ITextEditorProvider; |
||||
if (provider == null) return null; |
||||
ITextEditor editor = provider.TextEditor; |
||||
|
||||
// e might be null when this is a manually triggered update
|
||||
FileName fileName = (e == null) ? editor.FileName : e.FileName; |
||||
if (editor.FileName != fileName) return null; |
||||
IExpressionFinder expressionFinder = ParserService.GetExpressionFinder(fileName); |
||||
if (expressionFinder == null) return null; |
||||
string content = (e == null) ? editor.Document.Text : e.Content.Text; |
||||
ExpressionResult expr = expressionFinder.FindFullExpression(content, editor.Caret.Offset); |
||||
if (expr.Expression == null) return null; |
||||
|
||||
// save the current position
|
||||
if(this.lastPoint != null && this.lastPoint == editor.Caret.Position) return null; |
||||
this.lastPoint = editor.Caret.Position; |
||||
this.AddToStringCollection(string.Format(CultureInfo.InvariantCulture, "!{0}", expr.Expression)); |
||||
|
||||
return ParserService.Resolve(expr, editor.Caret.Line, editor.Caret.Column, fileName, content); |
||||
} |
||||
#endregion
|
||||
|
||||
#region Dynamic Help for Forms Designer
|
||||
private void FormsDesignerSelectedObjectChanged(object sender, EventArgs e) |
||||
{ |
||||
this.CallDynamicHelpForFormsDesigner(PropertyPad.Grid.SelectedObject, |
||||
PropertyPad.Grid.SelectedGridItem); |
||||
} |
||||
|
||||
private void FormsDesignerSelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) |
||||
{ |
||||
this.CallDynamicHelpForFormsDesigner(PropertyPad.Grid.SelectedObject, |
||||
e.NewSelection); |
||||
} |
||||
|
||||
private void CallDynamicHelpForFormsDesigner(object selectedObject, GridItem selectedItem) |
||||
{ |
||||
if (selectedObject == null) return; |
||||
this.dynamicHelpTerms.Clear(); |
||||
|
||||
Type myObject = selectedObject.GetType(); |
||||
if (selectedItem != null && selectedItem.Label != null) { |
||||
foreach (Type type in TypeHandling.FindDeclaringType(myObject, selectedItem.Label)) { |
||||
this.AddToStringCollection(string.Format(CultureInfo.InvariantCulture, |
||||
"{0}.{1}", type.FullName, selectedItem.Label)); |
||||
} |
||||
} |
||||
this.AddToStringCollection(myObject.FullName); |
||||
|
||||
WorkbenchSingleton.SafeThreadAsyncCall(BuildDynamicHelpList); |
||||
} |
||||
#endregion
|
||||
|
||||
private void SolutionClosed(object sender, EventArgs e) |
||||
{ |
||||
dynamicHelpBrowser.RemoveAllChildren(); |
||||
} |
||||
|
||||
#region StringCollection & Sorting
|
||||
private void AddToStringCollection(string searchTerm) |
||||
{ |
||||
this.AddToStringCollection(-1, searchTerm); |
||||
} |
||||
|
||||
private void AddToStringCollection(int insertWhere, string searchTerm) |
||||
{ |
||||
if (this.dynamicHelpTerms.IndexOf(searchTerm) == -1) |
||||
{ |
||||
if (insertWhere == -1) |
||||
this.dynamicHelpTerms.Add(searchTerm); |
||||
else |
||||
this.dynamicHelpTerms.Insert(insertWhere, searchTerm); |
||||
} |
||||
} |
||||
|
||||
private static List<IHxTopic> SortTopics(IHxTopicList topics) |
||||
{ |
||||
if (topics == null || topics.Count == 0) |
||||
{ |
||||
return null; |
||||
} |
||||
|
||||
List<IHxTopic> result = new List<IHxTopic>(); |
||||
foreach (IHxTopic topic in topics) |
||||
{ |
||||
if (!result.Contains(topic)) result.Add(topic); |
||||
} |
||||
TopicComparer topicComparer = new TopicComparer(); |
||||
result.Sort(topicComparer); |
||||
|
||||
return result; |
||||
} |
||||
|
||||
class TopicComparer : IComparer<IHxTopic> |
||||
{ |
||||
public int Compare(IHxTopic x, IHxTopic y) |
||||
{ |
||||
int result = CompareType("kbSyntax", x, y); |
||||
if(result == 0) result = CompareType("kbHowTo", x, y); |
||||
if(result == 0) result = CompareType("kbOrient", x, y); |
||||
if(result == 0) result = CompareType("kbArticle", x, y); |
||||
|
||||
return result; |
||||
} |
||||
|
||||
private static int CompareType(string topicType, IHxTopic x, IHxTopic y) |
||||
{ |
||||
if(x.HasAttribute("TopicType", topicType) && !y.HasAttribute("TopicType", topicType)) |
||||
return -1; |
||||
else if(y.HasAttribute("TopicType", topicType) && !x.HasAttribute("TopicType", topicType)) |
||||
return 1; |
||||
else |
||||
return 0; |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
private void NamespaceReloaded(object sender, EventArgs e) |
||||
{ |
||||
this.enableDebugInfo = HtmlHelp2Environment.Config.DynamicHelpDebugInfos; |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2DynamicHelpBrowserControl : UserControl |
||||
{ |
||||
WebBrowser axWebBrowser = new WebBrowser(); |
||||
ToolStrip dynamicHelpToolbar = new ToolStrip(); |
||||
int internalIndex; |
||||
string[] toolbarButtons = new string[] { |
||||
"${res:AddIns.HtmlHelp2.Contents}", |
||||
"${res:AddIns.HtmlHelp2.Index}", |
||||
"${res:AddIns.HtmlHelp2.Search}" |
||||
}; |
||||
|
||||
public void RedrawContent() |
||||
{ |
||||
for (int i = 0; i < toolbarButtons.Length; i++) |
||||
{ |
||||
dynamicHelpToolbar.Items[i].Text = StringParser.Parse(toolbarButtons[i]); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public HtmlHelp2DynamicHelpBrowserControl() |
||||
{ |
||||
this.InitializeComponents(); |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
private void InitializeComponents() |
||||
{ |
||||
Dock = DockStyle.Fill; |
||||
Size = new Size(500, 500); |
||||
|
||||
Controls.Add(axWebBrowser); |
||||
axWebBrowser.Dock = DockStyle.Fill; |
||||
axWebBrowser.WebBrowserShortcutsEnabled = false; |
||||
axWebBrowser.IsWebBrowserContextMenuEnabled = false; |
||||
axWebBrowser.AllowWebBrowserDrop = false; |
||||
axWebBrowser.DocumentCompleted += |
||||
new WebBrowserDocumentCompletedEventHandler(this.OnDocumentCompleted); |
||||
|
||||
Controls.Add(dynamicHelpToolbar); |
||||
dynamicHelpToolbar.Dock = DockStyle.Top; |
||||
dynamicHelpToolbar.AllowItemReorder = false; |
||||
dynamicHelpToolbar.ShowItemToolTips = false; |
||||
dynamicHelpToolbar.GripStyle = ToolStripGripStyle.Hidden; |
||||
for (int i = 0; i < toolbarButtons.Length; i++) |
||||
{ |
||||
ToolStripButton button = new ToolStripButton(); |
||||
button.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
button.ImageIndex = i; |
||||
button.Click += new EventHandler(this.ToolStripButtonClicked); |
||||
|
||||
dynamicHelpToolbar.Items.Add(button); |
||||
} |
||||
|
||||
this.RedrawContent(); |
||||
|
||||
dynamicHelpToolbar.ImageList = new ImageList(); |
||||
dynamicHelpToolbar.ImageList.ColorDepth = ColorDepth.Depth32Bit; |
||||
dynamicHelpToolbar.ImageList.Images.Add(ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Toc.png")); |
||||
dynamicHelpToolbar.ImageList.Images.Add(ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Index.png")); |
||||
dynamicHelpToolbar.ImageList.Images.Add(ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Search.png")); |
||||
|
||||
if (HtmlHelp2Environment.SessionIsInitialized) |
||||
{ |
||||
HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public void LoadDynamicHelpPage() |
||||
{ |
||||
string url = string.Format(CultureInfo.InvariantCulture, "res://{0}/context", Assembly.GetExecutingAssembly().Location); |
||||
axWebBrowser.Navigate(url); |
||||
} |
||||
|
||||
private void OnDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) |
||||
{ |
||||
this.RemoveAllChildren(); |
||||
} |
||||
|
||||
private void ToolStripButtonClicked(object sender, EventArgs e) |
||||
{ |
||||
ToolStripItem item = (ToolStripItem)sender; |
||||
PadDescriptor pad = null; |
||||
|
||||
switch (item.ImageIndex) |
||||
{ |
||||
case 0: |
||||
pad = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)); |
||||
break; |
||||
case 1: |
||||
pad = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexPad)); |
||||
break; |
||||
case 2: |
||||
pad = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); |
||||
break; |
||||
} |
||||
|
||||
if(pad != null) pad.BringPadToFront(); |
||||
} |
||||
|
||||
#region Help 2.0 Environment Events
|
||||
private void NamespaceReloaded(object sender, EventArgs e) |
||||
{ |
||||
this.LoadDynamicHelpPage(); |
||||
} |
||||
#endregion
|
||||
|
||||
#region WebBrowser Scripting
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public void BuildNewChild(string sectionName, string topicName, string topicLink) |
||||
{ |
||||
HtmlElementCollection children = |
||||
axWebBrowser.Document.Body.GetElementsByTagName("span"); |
||||
foreach (HtmlElement child in children) |
||||
{ |
||||
if (child.GetAttribute("className") == "section") |
||||
{ |
||||
HtmlElement sectionBlock = child.FirstChild.NextSibling; |
||||
HtmlElement contentSpan = sectionBlock.NextSibling.NextSibling; |
||||
|
||||
if (sectionBlock.TagName == "B" && |
||||
sectionBlock.InnerText == sectionName && |
||||
contentSpan.TagName == "SPAN" && |
||||
contentSpan.GetAttribute("className") == "content") |
||||
{ |
||||
if (!DoesLinkExist(contentSpan, topicName, topicLink)) |
||||
{ |
||||
HtmlElement newLink = this.CreateNewLink(topicLink, topicName); |
||||
if (newLink != null) |
||||
{ |
||||
contentSpan.AppendChild(newLink); |
||||
contentSpan.AppendChild(this.CreateABreak()); |
||||
} |
||||
} |
||||
|
||||
return; |
||||
} |
||||
} |
||||
} |
||||
|
||||
if (children.Count > 0) |
||||
{ |
||||
axWebBrowser.Document.Body.InsertAdjacentElement |
||||
(HtmlElementInsertionOrientation.BeforeEnd, this.CreateABreak()); |
||||
} |
||||
|
||||
HtmlElement linkContent = null; |
||||
HtmlElement htmlSection = this.CreateNewSection(sectionName, out linkContent); |
||||
if (htmlSection != null) |
||||
{ |
||||
axWebBrowser.Document.Body.InsertAdjacentElement |
||||
(HtmlElementInsertionOrientation.BeforeEnd, htmlSection); |
||||
|
||||
HtmlElement newLink = this.CreateNewLink(topicLink, topicName); |
||||
if (newLink != null) |
||||
{ |
||||
linkContent.AppendChild(newLink); |
||||
linkContent.AppendChild(this.CreateABreak()); |
||||
} |
||||
|
||||
this.internalIndex++; |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
private HtmlElement CreateNewSection(string sectionName, out HtmlElement linkNode) |
||||
{ |
||||
HtmlElement span = axWebBrowser.Document.CreateElement("span"); |
||||
span.SetAttribute("className", "section"); |
||||
span.InnerHtml = string.Format |
||||
(CultureInfo.InvariantCulture, |
||||
"<img style=\"width:16px;height:16px;margin-right:5px\" id=\"image_{0}\" src=\"open\">" + |
||||
"<b style=\"cursor:auto;\" id=\"{0}\" onclick=\"ExpandCollapse({0})\">{1}</b><br>", |
||||
this.internalIndex, sectionName); |
||||
|
||||
linkNode = axWebBrowser.Document.CreateElement("span"); |
||||
linkNode.SetAttribute("className", "content"); |
||||
linkNode.Id = string.Format(CultureInfo.InvariantCulture, "content_{0}", this.internalIndex); |
||||
span.AppendChild(linkNode); |
||||
|
||||
return span; |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
private HtmlElement CreateNewLink(string topicUrl, string topicName) |
||||
{ |
||||
HtmlElement span = axWebBrowser.Document.CreateElement("a"); |
||||
span.InnerText = topicName; |
||||
span.SetAttribute("src", topicUrl); |
||||
span.SetAttribute("className", "link"); |
||||
span.SetAttribute("title", topicName); |
||||
span.Click += new HtmlElementEventHandler(OnLinkClick); |
||||
span.MouseOver += new HtmlElementEventHandler(OnMouseOver); |
||||
span.MouseLeave += new HtmlElementEventHandler(OnMouseOut); |
||||
|
||||
return span; |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
private HtmlElement CreateABreak() |
||||
{ |
||||
HtmlElement br = axWebBrowser.Document.CreateElement("br"); |
||||
return br; |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
private static bool DoesLinkExist(HtmlElement parentNode, string topicName, string topicUrl) |
||||
{ |
||||
HtmlElementCollection links = parentNode.GetElementsByTagName("a"); |
||||
foreach (HtmlElement link in links) |
||||
{ |
||||
if (string.Compare(topicName, link.InnerText) == 0 && |
||||
string.Compare(topicUrl, link.GetAttribute("src")) == 0) |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
private void OnMouseOver(object sender, HtmlElementEventArgs e) |
||||
{ |
||||
HtmlElement link = sender as HtmlElement; |
||||
if (link != null) |
||||
{ |
||||
StatusBarService.SetMessage(link.GetAttribute("src")); |
||||
} |
||||
} |
||||
|
||||
private void OnMouseOut(object sender, HtmlElementEventArgs e) |
||||
{ |
||||
StatusBarService.SetMessage(string.Empty); |
||||
} |
||||
|
||||
private void OnLinkClick(object sender, HtmlElementEventArgs e) |
||||
{ |
||||
HtmlElement link = sender as HtmlElement; |
||||
if (link != null) |
||||
{ |
||||
string url = link.GetAttribute("src"); |
||||
if (!string.IsNullOrEmpty(url)) ShowHelpBrowser.OpenHelpView(url); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public void RemoveAllChildren() |
||||
{ |
||||
try |
||||
{ |
||||
this.internalIndex = 0; |
||||
var document = axWebBrowser != null ? axWebBrowser.Document : null; |
||||
var body = document != null ? document.Body : null; |
||||
if (body != null) |
||||
body.InnerHtml = string.Empty; |
||||
} |
||||
catch (System.NotSupportedException ex) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Clean-up Call Exception; " + ex.ToString()); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region DebugInfo
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public void CreateDebugPre(string debugInformation) |
||||
{ |
||||
if (!string.IsNullOrEmpty(debugInformation)) |
||||
{ |
||||
axWebBrowser.Document.Body.InsertAdjacentElement |
||||
(HtmlElementInsertionOrientation.BeforeEnd, CreateABreak()); |
||||
axWebBrowser.Document.Body.InsertAdjacentElement |
||||
(HtmlElementInsertionOrientation.BeforeEnd, CreateABreak()); |
||||
|
||||
HtmlElement pre = axWebBrowser.Document.CreateElement("pre"); |
||||
pre.InnerHtml = "--- Dynamic Help Debug ---<br>" + debugInformation; |
||||
|
||||
axWebBrowser.Document.Body.InsertAdjacentElement |
||||
(HtmlElementInsertionOrientation.BeforeEnd, pre); |
||||
} |
||||
} |
||||
#endregion
|
||||
} |
||||
|
||||
public static class TypeHandling |
||||
{ |
||||
public static IEnumerable<Type> FindDeclaringType(Type type, string memberName) |
||||
{ |
||||
MemberInfo[] memberInfos = type.GetMember(memberName); |
||||
List<Type> declaringTypes = new List<Type>(); |
||||
|
||||
foreach (MemberInfo memberInfo in memberInfos) |
||||
{ |
||||
if (!declaringTypes.Contains(memberInfo.DeclaringType)) |
||||
declaringTypes.Add(memberInfo.DeclaringType); |
||||
} |
||||
|
||||
foreach (Type declaringType in declaringTypes) |
||||
{ |
||||
yield return declaringType; |
||||
} |
||||
|
||||
#region TypeHandling Class by Robert_G
|
||||
// QUOTE: "Aber das ist ja wohl eher ein no-Brainer... ;-)
|
||||
#endregion
|
||||
} |
||||
} |
||||
} |
@ -1,319 +0,0 @@
@@ -1,319 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using System.Drawing; |
||||
using System.Windows.Forms; |
||||
using System.Xml; |
||||
|
||||
using HtmlHelp2.Environment; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
public class ShowFavoritesMenuCommand : AbstractMenuCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
PadDescriptor favorites = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2FavoritesPad)); |
||||
if (favorites != null) favorites.BringPadToFront(); |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2FavoritesPad : AbstractPadContent |
||||
{ |
||||
const string help2FavoritesFile = "help2favorites.xml"; |
||||
string[] toolbarButtons = new string[] { |
||||
"${res:AddIns.HtmlHelp2.MoveUp}", |
||||
"${res:AddIns.HtmlHelp2.MoveDown}", |
||||
"${res:AddIns.HtmlHelp2.Rename}", |
||||
"${res:AddIns.HtmlHelp2.Delete}" |
||||
}; |
||||
|
||||
bool Help2EnvIsReady = false; |
||||
Panel mainPanel = new Panel(); |
||||
TreeView tv = new TreeView(); |
||||
ToolStrip toolStrip = new ToolStrip(); |
||||
|
||||
public override Control Control |
||||
{ |
||||
get { return mainPanel; } |
||||
} |
||||
|
||||
public override void RedrawContent() |
||||
{ |
||||
for (int i = 0; i < toolbarButtons.Length; i++) |
||||
{ |
||||
toolStrip.Items[i].ToolTipText = StringParser.Parse(toolbarButtons[i]); |
||||
} |
||||
} |
||||
|
||||
public HtmlHelp2FavoritesPad() |
||||
{ |
||||
this.InitializeComponents(); |
||||
} |
||||
|
||||
private void InitializeComponents() |
||||
{ |
||||
Help2EnvIsReady = HtmlHelp2Environment.IsReady; |
||||
|
||||
mainPanel.Controls.Add(tv); |
||||
tv.Dock = DockStyle.Fill; |
||||
tv.Enabled = Help2EnvIsReady; |
||||
tv.ShowLines = false; |
||||
tv.ShowRootLines = false; |
||||
tv.LabelEdit = true; |
||||
tv.HideSelection = false; |
||||
tv.AfterSelect += new TreeViewEventHandler(this.TreeNodeAfterSelect); |
||||
tv.BeforeLabelEdit += new NodeLabelEditEventHandler(this.BeforeLabelEdit); |
||||
tv.AfterLabelEdit += new NodeLabelEditEventHandler(this.AfterLabelEdit); |
||||
tv.KeyDown += new KeyEventHandler(this.TreeViewKeyDown); |
||||
tv.DoubleClick += new EventHandler(this.TreeNodeDoubleClick); |
||||
|
||||
mainPanel.Controls.Add(toolStrip); |
||||
toolStrip.Dock = DockStyle.Top; |
||||
toolStrip.Enabled = Help2EnvIsReady; |
||||
toolStrip.AllowItemReorder = false; |
||||
for (int i = 0; i < toolbarButtons.Length; i++) |
||||
{ |
||||
ToolStripButton button = new ToolStripButton(); |
||||
button.ToolTipText = StringParser.Parse(toolbarButtons[i]); |
||||
button.ImageIndex = i; |
||||
button.Enabled = false; |
||||
button.Click += new EventHandler(this.ToolStripButtonClicked); |
||||
|
||||
toolStrip.Items.Add(button); |
||||
} |
||||
|
||||
toolStrip.ImageList = new ImageList(); |
||||
toolStrip.ImageList.ColorDepth = ColorDepth.Depth4Bit; |
||||
toolStrip.ImageList.TransparentColor = Color.Red; |
||||
toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.MoveUp.bmp")); |
||||
toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.MoveDown.bmp")); |
||||
toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.Rename.bmp")); |
||||
toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.Delete.bmp")); |
||||
|
||||
if (Help2EnvIsReady) this.LoadFavorites(); |
||||
} |
||||
|
||||
#region TreeView
|
||||
private void TreeNodeAfterSelect(object sender, TreeViewEventArgs e) |
||||
{ |
||||
TreeNode tn = tv.SelectedNode; |
||||
|
||||
toolStrip.Items[0].Enabled = (tn != null && tn.PrevNode != null); |
||||
toolStrip.Items[1].Enabled = (tn != null && tn.NextNode != null); |
||||
toolStrip.Items[2].Enabled = (tn != null); |
||||
toolStrip.Items[3].Enabled = (tn != null); |
||||
} |
||||
|
||||
private void BeforeLabelEdit(object sender, NodeLabelEditEventArgs e) |
||||
{ |
||||
e.CancelEdit = (e.Node == null); |
||||
} |
||||
|
||||
private void AfterLabelEdit(object Sender, NodeLabelEditEventArgs e) |
||||
{ |
||||
if (e.Label != null && e.Label.Length > 0) |
||||
{ |
||||
if (e.Node.Tag != null && e.Node.Tag is string && (string)e.Node.Tag != "") |
||||
{ |
||||
this.PatchFavoriteName(e.Label.ToString(), (string)e.Node.Tag); |
||||
} |
||||
} |
||||
} |
||||
|
||||
private void TreeViewKeyDown(object sender, KeyEventArgs e) |
||||
{ |
||||
if (tv.SelectedNode != null) |
||||
{ |
||||
switch (e.KeyCode) |
||||
{ |
||||
case Keys.F2: |
||||
tv.SelectedNode.BeginEdit(); |
||||
break; |
||||
case Keys.Delete: |
||||
tv.Nodes.Remove(tv.SelectedNode); |
||||
this.SaveFavorites(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
|
||||
private void TreeNodeDoubleClick(object sender, EventArgs e) |
||||
{ |
||||
TreeNode tn = tv.SelectedNode; |
||||
|
||||
if (tn != null && tn.Tag != null && tn.Tag is string && (string)tn.Tag != "") |
||||
{ |
||||
ShowHelpBrowser.OpenHelpView((string)tn.Tag); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region ToolStrip
|
||||
private void ToolStripButtonClicked(object sender, EventArgs e) |
||||
{ |
||||
if (tv.SelectedNode == null) return; |
||||
|
||||
ToolStripItem item = (ToolStripItem)sender; |
||||
TreeNode tempNode = null; |
||||
|
||||
switch (item.ImageIndex) |
||||
{ |
||||
case 0: |
||||
tempNode = (TreeNode)tv.SelectedNode.Clone(); |
||||
tv.Nodes.Insert(tv.SelectedNode.PrevNode.Index, tempNode); |
||||
tv.Nodes.Remove(tv.SelectedNode); |
||||
tv.SelectedNode = tempNode; |
||||
this.SaveFavorites(); |
||||
break; |
||||
case 1: |
||||
tempNode = (TreeNode)tv.SelectedNode.Clone(); |
||||
TreeNode nextNextNode = tv.SelectedNode.NextNode.NextNode; |
||||
if (nextNextNode == null) |
||||
tv.Nodes.Add(tempNode); |
||||
else |
||||
tv.Nodes.Insert(nextNextNode.Index, tempNode); |
||||
tv.Nodes.Remove(tv.SelectedNode); |
||||
tv.SelectedNode = tempNode; |
||||
this.SaveFavorites(); |
||||
break; |
||||
case 2: |
||||
tv.SelectedNode.BeginEdit(); |
||||
break; |
||||
case 3: |
||||
string text = StringParser.Parse("${res:AddIns.HtmlHelp2.RemoveFavorite}", new string[,] {{"0", tv.SelectedNode.Text}}); |
||||
DialogResult result = MessageBox.Show(text, |
||||
StringParser.Parse("${res:MainWindow.Windows.HelpScoutLabel}"), |
||||
MessageBoxButtons.YesNo, |
||||
MessageBoxIcon.Question, |
||||
MessageBoxDefaultButton.Button2); |
||||
if (result == DialogResult.Yes) |
||||
{ |
||||
tv.Nodes.Remove(tv.SelectedNode); |
||||
this.SaveFavorites(); |
||||
} |
||||
break; |
||||
} |
||||
|
||||
this.TreeNodeAfterSelect(null, null); |
||||
} |
||||
#endregion
|
||||
|
||||
#region Favorites
|
||||
private void LoadFavorites() |
||||
{ |
||||
tv.Nodes.Clear(); |
||||
tv.BeginUpdate(); |
||||
|
||||
try |
||||
{ |
||||
XmlDocument xmldoc = new XmlDocument(); |
||||
xmldoc.Load(PropertyService.ConfigDirectory + help2FavoritesFile); |
||||
|
||||
XmlNodeList nl = xmldoc.SelectNodes("favorites/favorite"); |
||||
for (int i = 0; i < nl.Count; i++) |
||||
{ |
||||
XmlNode title = nl.Item(i).SelectSingleNode("title"); |
||||
XmlNode url = nl.Item(i).SelectSingleNode("url"); |
||||
|
||||
if (title != null && url != null && title.InnerText != "" && url.InnerText != "") |
||||
{ |
||||
TreeNode node = new TreeNode(); |
||||
node.Text = title.InnerText; |
||||
node.Tag = url.InnerText; |
||||
tv.Nodes.Add(node); |
||||
} |
||||
} |
||||
} |
||||
catch {} |
||||
|
||||
tv.EndUpdate(); |
||||
} |
||||
|
||||
private void SaveFavorites() |
||||
{ |
||||
try |
||||
{ |
||||
XmlDocument xmldoc = new XmlDocument(); |
||||
xmldoc.LoadXml("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><favorites/>"); |
||||
|
||||
foreach (TreeNode node in tv.Nodes) |
||||
{ |
||||
if (node.Text != "" && node.Tag != null && node.Tag is string && (string)node.Tag != "") |
||||
{ |
||||
XmlNode favorite = xmldoc.CreateElement("favorite"); |
||||
|
||||
XmlNode title = xmldoc.CreateElement("title"); |
||||
title.InnerText = node.Text; |
||||
favorite.AppendChild(title); |
||||
|
||||
XmlCDataSection cdata = xmldoc.CreateCDataSection((string)node.Tag); |
||||
XmlNode url = xmldoc.CreateElement("url"); |
||||
url.AppendChild(cdata); |
||||
favorite.AppendChild(url); |
||||
xmldoc.DocumentElement.AppendChild(favorite); |
||||
} |
||||
} |
||||
|
||||
xmldoc.Save(PropertyService.ConfigDirectory + help2FavoritesFile); |
||||
} |
||||
catch {} |
||||
} |
||||
|
||||
private void PatchFavoriteName(string newName, string topicUrl) |
||||
{ |
||||
try |
||||
{ |
||||
XmlDocument xmldoc = new XmlDocument(); |
||||
xmldoc.Load(PropertyService.ConfigDirectory + help2FavoritesFile); |
||||
|
||||
XmlNode node = xmldoc.SelectSingleNode(String.Format("/favorites/favorite[url=\"{0}\"]/title", topicUrl)); |
||||
|
||||
if (node != null) |
||||
{ |
||||
node.InnerText = newName; |
||||
xmldoc.Save(PropertyService.ConfigDirectory + help2FavoritesFile); |
||||
} |
||||
} |
||||
catch {} |
||||
} |
||||
|
||||
public void AddToFavorites(string topicName, string topicUrl) |
||||
{ |
||||
if (Help2EnvIsReady && topicName != "" && topicUrl != "") |
||||
{ |
||||
bool urlFound = false; |
||||
|
||||
foreach (TreeNode node in tv.Nodes) |
||||
{ |
||||
if (node.Tag != null && |
||||
node.Tag is string && |
||||
String.Compare(topicUrl, (string)node.Tag) == 0) |
||||
{ |
||||
urlFound = true; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
if (!urlFound) |
||||
{ |
||||
TreeNode node = new TreeNode(); |
||||
node.Text = topicName; |
||||
node.Tag = topicUrl; |
||||
|
||||
tv.Nodes.Add(node); |
||||
this.SaveFavorites(); |
||||
} |
||||
} |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
@ -1,345 +0,0 @@
@@ -1,345 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using System.Drawing; |
||||
using System.Security.Permissions; |
||||
using System.Windows.Forms; |
||||
|
||||
using AxMSHelpControls; |
||||
using HtmlHelp2.Environment; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using MSHelpControls; |
||||
using MSHelpServices; |
||||
|
||||
public class ShowIndexMenuCommand : AbstractMenuCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
PadDescriptor index = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexPad)); |
||||
if (index != null) index.BringPadToFront(); |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2IndexPad : AbstractPadContent |
||||
{ |
||||
MSHelp2IndexControl help2IndexControl; |
||||
|
||||
public override object Control |
||||
{ |
||||
get { return help2IndexControl; } |
||||
} |
||||
|
||||
public override void Dispose() |
||||
{ |
||||
help2IndexControl.Dispose(); |
||||
} |
||||
|
||||
public HtmlHelp2IndexPad() |
||||
{ |
||||
help2IndexControl = new MSHelp2IndexControl(); |
||||
ResourceService.LanguageChanged += delegate { help2IndexControl.RedrawContent(); }; |
||||
} |
||||
} |
||||
|
||||
public class MSHelp2IndexControl : UserControl |
||||
{ |
||||
AxHxIndexCtrl indexControl; |
||||
ComboBox filterCombobox = new ComboBox(); |
||||
ComboBox searchTerm = new ComboBox(); |
||||
Label label1 = new Label(); |
||||
Label label2 = new Label(); |
||||
Label infoLabel = new Label(); |
||||
bool indexControlFailed; |
||||
bool itemClicked; |
||||
|
||||
protected override void Dispose(bool disposing) |
||||
{ |
||||
base.Dispose(disposing); |
||||
if (disposing && indexControl != null) |
||||
{ |
||||
indexControl.Dispose(); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public MSHelp2IndexControl() |
||||
{ |
||||
this.InitializeComponents(); |
||||
this.UpdateControls(); |
||||
|
||||
HtmlHelp2Environment.FilterQueryChanged += new EventHandler(this.FilterQueryChanged); |
||||
HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); |
||||
} |
||||
|
||||
private void UpdateControls() |
||||
{ |
||||
filterCombobox.Enabled = |
||||
(HtmlHelp2Environment.SessionIsInitialized && !this.indexControlFailed); |
||||
searchTerm.Enabled = |
||||
(HtmlHelp2Environment.SessionIsInitialized && !this.indexControlFailed); |
||||
infoLabel.Visible = false; |
||||
|
||||
if (this.indexControlFailed) |
||||
{ |
||||
this.ShowInfoMessage |
||||
(StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSystemNotAvailable}")); |
||||
} |
||||
else if (!HtmlHelp2Environment.SessionIsInitialized) |
||||
{ |
||||
if (indexControl != null) indexControl.Visible = false; |
||||
this.ShowInfoMessage |
||||
("${res:AddIns.HtmlHelp2.HelpCollectionMayBeEmpty}"); |
||||
} |
||||
else |
||||
{ |
||||
indexControl.Visible = true; |
||||
this.LoadIndex(); |
||||
} |
||||
} |
||||
|
||||
private void InitializeComponents() |
||||
{ |
||||
infoLabel.Dock = DockStyle.Fill; |
||||
infoLabel.Visible = false; |
||||
infoLabel.TextAlign = ContentAlignment.MiddleCenter; |
||||
Controls.Add(infoLabel); |
||||
|
||||
if (Help2ControlsValidation.IsIndexControlRegistered) |
||||
{ |
||||
try |
||||
{ |
||||
indexControl = new AxHxIndexCtrl(); |
||||
indexControl.BeginInit(); |
||||
indexControl.Dock = DockStyle.Fill; |
||||
indexControl.ItemClick += |
||||
new AxMSHelpControls.IHxIndexViewEvents_ItemClickEventHandler(this.IndexItemClick); |
||||
indexControl.EndInit(); |
||||
Controls.Add(indexControl); |
||||
indexControl.CreateControl(); |
||||
indexControl.BorderStyle = HxBorderStyle.HxBorderStyle_FixedSingle; |
||||
indexControl.FontSource = HxFontSourceConstant.HxFontExternal; |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException ex) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Index control failed; " + ex.ToString()); |
||||
this.indexControlFailed = true; |
||||
} |
||||
} |
||||
|
||||
Panel panel1 = new Panel(); |
||||
Controls.Add(panel1); |
||||
panel1.Dock = DockStyle.Top; |
||||
panel1.Height = filterCombobox.Height + 7; |
||||
|
||||
panel1.Controls.Add(filterCombobox); |
||||
filterCombobox.Dock = DockStyle.Top; |
||||
filterCombobox.DropDownStyle = ComboBoxStyle.DropDownList; |
||||
filterCombobox.Sorted = true; |
||||
filterCombobox.Enabled = false; |
||||
filterCombobox.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); |
||||
|
||||
Controls.Add(label1); |
||||
label1.Dock = DockStyle.Top; |
||||
label1.TextAlign = ContentAlignment.MiddleLeft; |
||||
label1.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
Panel panel2 = new Panel(); |
||||
Controls.Add(panel2); |
||||
panel2.Dock = DockStyle.Top; |
||||
panel2.Height = searchTerm.Height + 7; |
||||
|
||||
panel2.Controls.Add(searchTerm); |
||||
searchTerm.Dock = DockStyle.Top; |
||||
searchTerm.Enabled = false; |
||||
searchTerm.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
searchTerm.TextChanged += new EventHandler(this.SearchTextChanged); |
||||
searchTerm.KeyPress += new KeyPressEventHandler(this.SearchKeyPress); |
||||
|
||||
Controls.Add(label2); |
||||
label2.Dock = DockStyle.Top; |
||||
label2.TextAlign = ContentAlignment.MiddleLeft; |
||||
label2.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
this.RedrawContent(); |
||||
|
||||
this.indexControlFailed = (this.indexControlFailed || indexControl == null); |
||||
} |
||||
|
||||
private void ShowInfoMessage(string infoText) |
||||
{ |
||||
filterCombobox.Items.Clear(); |
||||
searchTerm.Items.Clear(); |
||||
searchTerm.Text = string.Empty; |
||||
infoLabel.Text = infoText; |
||||
infoLabel.Visible = true; |
||||
} |
||||
|
||||
public void RedrawContent() |
||||
{ |
||||
label1.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.FilteredBy}"); |
||||
label2.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.LookFor}"); |
||||
} |
||||
|
||||
private void IndexItemClick(object sender, IHxIndexViewEvents_ItemClickEvent e) |
||||
{ |
||||
string indexTerm = indexControl.IndexData.GetFullStringFromSlot(e.iItem, ","); |
||||
int indexSlot = e.iItem; |
||||
|
||||
itemClicked = true; |
||||
searchTerm.Items.Insert(0, indexTerm); |
||||
searchTerm.SelectedIndex = 0; |
||||
itemClicked = false; |
||||
|
||||
this.ShowSelectedItemEntry(indexTerm, indexSlot); |
||||
} |
||||
|
||||
private void FilterChanged(object sender, EventArgs e) |
||||
{ |
||||
string selectedFilterName = filterCombobox.SelectedItem.ToString(); |
||||
if (!string.IsNullOrEmpty(selectedFilterName)) |
||||
{ |
||||
Cursor.Current = Cursors.WaitCursor; |
||||
this.SetIndex(selectedFilterName); |
||||
Cursor.Current = Cursors.Default; |
||||
} |
||||
} |
||||
|
||||
private void SearchTextChanged(object sender, EventArgs e) |
||||
{ |
||||
if (!this.itemClicked && searchTerm.Text.Length > 0) |
||||
{ |
||||
indexControl.Selection = |
||||
indexControl.IndexData.GetSlotFromString(searchTerm.Text); |
||||
} |
||||
} |
||||
|
||||
private void SearchKeyPress(object sender, KeyPressEventArgs e) |
||||
{ |
||||
if (e.KeyChar == (char)13) |
||||
{ |
||||
int indexSlot = indexControl.IndexData.GetSlotFromString(searchTerm.Text); |
||||
string indexTerm = indexControl.IndexData.GetFullStringFromSlot(indexSlot, ","); |
||||
|
||||
searchTerm.Items.Insert(0, indexTerm); |
||||
searchTerm.SelectedIndex = 0; |
||||
if (searchTerm.Items.Count > 10) |
||||
{ |
||||
searchTerm.Items.RemoveAt(10); |
||||
} |
||||
|
||||
this.ShowSelectedItemEntry(indexTerm, indexSlot); |
||||
} |
||||
} |
||||
|
||||
private void LoadIndex() |
||||
{ |
||||
if (this.SetIndex(HtmlHelp2Environment.CurrentFilterName)) |
||||
{ |
||||
searchTerm.Text = string.Empty; |
||||
searchTerm.Items.Clear(); |
||||
filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); |
||||
HtmlHelp2Environment.BuildFilterList(filterCombobox); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); |
||||
} |
||||
} |
||||
|
||||
private bool SetIndex(string filterName) |
||||
{ |
||||
try |
||||
{ |
||||
indexControl.IndexData = |
||||
HtmlHelp2Environment.GetIndex(HtmlHelp2Environment.FindFilterQuery(filterName)); |
||||
return true; |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
LoggingService.Error("Help 2.0: cannot connect to IHxIndex interface (Index)"); |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
private void ShowSelectedItemEntry(string indexTerm, int indexSlot) |
||||
{ |
||||
PadDescriptor indexResults = |
||||
WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexResultsPad)); |
||||
if (indexResults == null) return; |
||||
|
||||
try |
||||
{ |
||||
IHxTopicList matchingTopics = indexControl.IndexData.GetTopicsFromSlot(indexSlot); |
||||
|
||||
try |
||||
{ |
||||
((HtmlHelp2IndexResultsPad)indexResults.PadContent).CleanUp(); |
||||
((HtmlHelp2IndexResultsPad)indexResults.PadContent).IndexResultsListView.BeginUpdate(); |
||||
|
||||
foreach (IHxTopic topic in matchingTopics) |
||||
{ |
||||
ListViewItem lvi = new ListViewItem(); |
||||
lvi.Text = |
||||
topic.get_Title(HxTopicGetTitleType.HxTopicGetRLTitle, |
||||
HxTopicGetTitleDefVal.HxTopicGetTitleFileName); |
||||
lvi.Tag = topic; |
||||
lvi.SubItems.Add(topic.Location); |
||||
((HtmlHelp2IndexResultsPad)indexResults.PadContent).IndexResultsListView.Items.Add(lvi); |
||||
} |
||||
} |
||||
finally |
||||
{ |
||||
((HtmlHelp2IndexResultsPad)indexResults.PadContent).IndexResultsListView.EndUpdate(); |
||||
((HtmlHelp2IndexResultsPad)indexResults.PadContent).SortLV(0); |
||||
((HtmlHelp2IndexResultsPad)indexResults.PadContent).SetStatusMessage(indexTerm); |
||||
} |
||||
|
||||
switch (matchingTopics.Count) |
||||
{ |
||||
case 0: |
||||
break; |
||||
case 1: |
||||
IHxTopic topic = (IHxTopic)matchingTopics.ItemAt(1); |
||||
if(topic != null) ShowHelpBrowser.OpenHelpView(topic); |
||||
break; |
||||
default: |
||||
indexResults.BringPadToFront(); |
||||
break; |
||||
} |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException cEx) |
||||
{ |
||||
LoggingService.Error("Help 2.0: cannot get matching index entries; " + cEx.ToString()); |
||||
} |
||||
} |
||||
|
||||
#region Help 2.0 Environment Events
|
||||
private void FilterQueryChanged(object sender, EventArgs e) |
||||
{ |
||||
Application.DoEvents(); |
||||
|
||||
string currentFilterName = filterCombobox.SelectedItem.ToString(); |
||||
if (string.Compare(currentFilterName, HtmlHelp2Environment.CurrentFilterName) != 0) |
||||
{ |
||||
filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); |
||||
filterCombobox.SelectedIndex = |
||||
filterCombobox.Items.IndexOf(HtmlHelp2Environment.CurrentFilterName); |
||||
this.SetIndex(HtmlHelp2Environment.CurrentFilterName); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); |
||||
} |
||||
} |
||||
|
||||
private void NamespaceReloaded(object sender, EventArgs e) |
||||
{ |
||||
this.UpdateControls(); |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
@ -1,144 +0,0 @@
@@ -1,144 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using System.Collections; |
||||
using System.Globalization; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using MSHelpServices; |
||||
|
||||
public class ShowIndexResultsMenuCommand : AbstractMenuCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
PadDescriptor indexResults = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexResultsPad)); |
||||
if (indexResults != null) indexResults.BringPadToFront(); |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2IndexResultsPad : AbstractPadContent |
||||
{ |
||||
ListView listView = new ListView(); |
||||
ColumnHeader title = new ColumnHeader(); |
||||
ColumnHeader location = new ColumnHeader(); |
||||
|
||||
public override object Control |
||||
{ |
||||
get { return listView; } |
||||
} |
||||
|
||||
public ListView IndexResultsListView |
||||
{ |
||||
get { return listView; } |
||||
} |
||||
|
||||
public HtmlHelp2IndexResultsPad() |
||||
{ |
||||
this.SetListViewHeader(); |
||||
ResourceService.LanguageChanged += delegate { SetListViewHeader(); }; |
||||
|
||||
listView.Columns.Add(title); |
||||
listView.Columns.Add(location); |
||||
|
||||
listView.FullRowSelect = true; |
||||
listView.Alignment = ListViewAlignment.Left; |
||||
listView.View = View.Details; |
||||
listView.Dock = DockStyle.Fill; |
||||
listView.MultiSelect = false; |
||||
listView.HideSelection = false; |
||||
listView.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
ListViewResize(this,null); |
||||
|
||||
listView.Resize += new EventHandler(ListViewResize); |
||||
listView.DoubleClick += new EventHandler(ListViewDoubleClick); |
||||
listView.ColumnClick += new ColumnClickEventHandler(ColumnClick); |
||||
listView.CreateControl(); |
||||
} |
||||
|
||||
public void SortLV(int listViewColumn) |
||||
{ |
||||
listView.ListViewItemSorter = new ListViewItemComparer(listViewColumn); |
||||
listView.Sort(); |
||||
} |
||||
|
||||
private void SetListViewHeader() |
||||
{ |
||||
title.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Title}"); |
||||
location.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Location}"); |
||||
} |
||||
|
||||
private void ListViewResize(object sender, EventArgs e) |
||||
{ |
||||
int w = (listView.Width - 60) / 2; |
||||
title.Width = w; |
||||
location.Width = w; |
||||
} |
||||
|
||||
private void ListViewDoubleClick(object sender, EventArgs e) |
||||
{ |
||||
ListViewItem lvi = listView.SelectedItems[0]; |
||||
if (lvi != null && lvi.Tag != null && lvi.Tag is IHxTopic) |
||||
{ |
||||
ShowHelpBrowser.OpenHelpView((IHxTopic)lvi.Tag); |
||||
} |
||||
} |
||||
|
||||
private void ColumnClick(object sender, ColumnClickEventArgs e) |
||||
{ |
||||
this.SortLV(e.Column); |
||||
} |
||||
|
||||
public void CleanUp() |
||||
{ |
||||
foreach (ListViewItem lvi in listView.Items) |
||||
{ |
||||
if(lvi.Tag != null) { lvi.Tag = null; } |
||||
} |
||||
|
||||
listView.Items.Clear(); |
||||
} |
||||
|
||||
public void SetStatusMessage(string indexTerm) |
||||
{ |
||||
if (listView.Items.Count > 1) |
||||
{ |
||||
string text = StringParser.Parse("${res:AddIns.HtmlHelp2.ResultsOfIndexResults}", |
||||
new string[,] |
||||
{{"0", indexTerm}, |
||||
{"1", listView.Items.Count.ToString(CultureInfo.InvariantCulture)}, |
||||
{"2", (listView.Items.Count == 1)?"${res:AddIns.HtmlHelp2.SingleTopic}":"${res:AddIns.HtmlHelp2.MultiTopic}"}} |
||||
); |
||||
|
||||
StatusBarService.SetMessage(text); |
||||
} |
||||
} |
||||
|
||||
#region Sorting
|
||||
class ListViewItemComparer : IComparer |
||||
{ |
||||
private int col; |
||||
|
||||
public ListViewItemComparer(int column) |
||||
{ |
||||
col = column; |
||||
} |
||||
|
||||
public int Compare(object x, object y) |
||||
{ |
||||
return String.Compare(((ListViewItem)x).SubItems[col].Text, |
||||
((ListViewItem)y).SubItems[col].Text); |
||||
} |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
@ -1,411 +0,0 @@
@@ -1,411 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using System.Drawing; |
||||
using System.Globalization; |
||||
using System.Windows.Forms; |
||||
|
||||
using HtmlHelp2.Environment; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
using ICSharpCode.SharpDevelop.Editor.Search; |
||||
using MSHelpServices; |
||||
|
||||
public class ShowSearchMenuCommand : AbstractMenuCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); |
||||
if (search != null) |
||||
{ |
||||
search.BringPadToFront(); |
||||
((HtmlHelp2SearchPad)search.PadContent).FocusSearchTextBox(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2SearchPad : AbstractPadContent |
||||
{ |
||||
Panel mainPanel = new Panel(); |
||||
Button searchButton = new Button(); |
||||
ComboBox filterCombobox = new ComboBox(); |
||||
ComboBox searchTerm = new ComboBox(); |
||||
CheckBox titlesOnly = new CheckBox(); |
||||
CheckBox enableStemming = new CheckBox(); |
||||
CheckBox reuseMatches = new CheckBox(); |
||||
CheckBox hiliteTopics = new CheckBox(); |
||||
CheckBox useCurrentLang = new CheckBox(); |
||||
Label label1 = new Label(); |
||||
Label label2 = new Label(); |
||||
bool searchIsBusy; |
||||
|
||||
public override object Control |
||||
{ |
||||
get { return mainPanel; } |
||||
} |
||||
|
||||
public void FocusSearchTextBox() |
||||
{ |
||||
searchTerm.Focus(); |
||||
} |
||||
|
||||
void RedrawContentInternal() |
||||
{ |
||||
searchButton.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Search}"); |
||||
titlesOnly.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.SearchInTitlesOnly}"); |
||||
enableStemming.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.LookForSimilarWords}"); |
||||
reuseMatches.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.SearchInPreviouslyFoundTopics}"); |
||||
hiliteTopics.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.HighlightMatches}"); |
||||
useCurrentLang.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.UseCurrentProjectLanguageForSearch}"); |
||||
label1.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.FilteredBy}"); |
||||
label2.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.LookFor}"); |
||||
} |
||||
|
||||
public bool HiliteEnabled |
||||
{ |
||||
get { return hiliteTopics.Checked; } |
||||
} |
||||
|
||||
public HtmlHelp2SearchPad() |
||||
{ |
||||
this.InitializeComponents(); |
||||
this.UpdateControls(); |
||||
ResourceService.LanguageChanged += delegate { RedrawContentInternal(); }; |
||||
|
||||
HtmlHelp2Environment.FilterQueryChanged += new EventHandler(FilterQueryChanged); |
||||
HtmlHelp2Environment.NamespaceReloaded += new EventHandler(NamespaceReloaded); |
||||
|
||||
ProjectService.SolutionLoaded += this.SolutionLoaded; |
||||
ProjectService.SolutionClosed += this.SolutionUnloaded; |
||||
} |
||||
|
||||
private void UpdateControls() |
||||
{ |
||||
titlesOnly.Enabled = HtmlHelp2Environment.SessionIsInitialized; |
||||
enableStemming.Enabled = HtmlHelp2Environment.SessionIsInitialized; |
||||
hiliteTopics.Enabled = HtmlHelp2Environment.SessionIsInitialized; |
||||
useCurrentLang.Enabled = HtmlHelp2Environment.SessionIsInitialized; |
||||
filterCombobox.Enabled = HtmlHelp2Environment.SessionIsInitialized; |
||||
searchTerm.Enabled = HtmlHelp2Environment.SessionIsInitialized; |
||||
|
||||
searchTerm.Text = string.Empty; |
||||
searchTerm.Items.Clear(); |
||||
filterCombobox.Items.Clear(); |
||||
|
||||
if (HtmlHelp2Environment.SessionIsInitialized) |
||||
{ |
||||
HtmlHelp2Environment.BuildFilterList(filterCombobox); |
||||
} |
||||
} |
||||
|
||||
private void InitializeComponents() |
||||
{ |
||||
// Search controls
|
||||
Panel panel3 = new Panel(); |
||||
mainPanel.Controls.Add(panel3); |
||||
panel3.Width = 500; |
||||
int pw = panel3.Width; |
||||
|
||||
panel3.Controls.Add(searchButton); |
||||
searchButton.Enabled = false; |
||||
searchButton.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
searchButton.Click += new EventHandler(SearchButtonClick); |
||||
panel3.Controls.Add(titlesOnly); |
||||
panel3.Controls.Add(enableStemming); |
||||
panel3.Controls.Add(reuseMatches); |
||||
panel3.Controls.Add(hiliteTopics); |
||||
panel3.Controls.Add(useCurrentLang); |
||||
|
||||
titlesOnly.Width = pw; |
||||
titlesOnly.Top = searchButton.Top + searchButton.Height + 10; |
||||
titlesOnly.TextAlign = ContentAlignment.MiddleLeft; |
||||
titlesOnly.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
enableStemming.Width = pw; |
||||
enableStemming.Top = titlesOnly.Top + titlesOnly.Height - 4; |
||||
enableStemming.TextAlign = ContentAlignment.MiddleLeft; |
||||
enableStemming.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
reuseMatches.Width = pw; |
||||
reuseMatches.Top = enableStemming.Top + enableStemming.Height - 4; |
||||
reuseMatches.Enabled = false; |
||||
reuseMatches.TextAlign = ContentAlignment.MiddleLeft; |
||||
reuseMatches.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
hiliteTopics.Width = pw; |
||||
hiliteTopics.Top = reuseMatches.Top + reuseMatches.Height - 4; |
||||
hiliteTopics.TextAlign = ContentAlignment.MiddleLeft; |
||||
hiliteTopics.Checked = true; |
||||
hiliteTopics.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
useCurrentLang.Width = pw; |
||||
useCurrentLang.Top = hiliteTopics.Top + hiliteTopics.Height; |
||||
useCurrentLang.TextAlign = ContentAlignment.MiddleLeft; |
||||
useCurrentLang.Visible = ProjectService.CurrentProject != null; |
||||
useCurrentLang.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
panel3.Dock = DockStyle.Fill; |
||||
|
||||
// Filter Combobox
|
||||
Panel panel1 = new Panel(); |
||||
mainPanel.Controls.Add(panel1); |
||||
panel1.Dock = DockStyle.Top; |
||||
panel1.Height = filterCombobox.Height + 15; |
||||
panel1.Controls.Add(filterCombobox); |
||||
filterCombobox.Dock = DockStyle.Top; |
||||
filterCombobox.DropDownStyle = ComboBoxStyle.DropDownList; |
||||
filterCombobox.Sorted = true; |
||||
filterCombobox.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(FilterChanged); |
||||
|
||||
// Filter label
|
||||
mainPanel.Controls.Add(label1); |
||||
label1.Dock = DockStyle.Top; |
||||
label1.TextAlign = ContentAlignment.MiddleLeft; |
||||
label1.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
// SearchTerm Combobox
|
||||
Panel panel2 = new Panel(); |
||||
mainPanel.Controls.Add(panel2); |
||||
panel2.Dock = DockStyle.Top; |
||||
panel2.Height = searchTerm.Height + 7; |
||||
panel2.Controls.Add(searchTerm); |
||||
searchTerm.Dock = DockStyle.Top; |
||||
searchTerm.TextChanged += new EventHandler(SearchTextChanged); |
||||
searchTerm.KeyPress += new KeyPressEventHandler(KeyPressed); |
||||
searchTerm.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
mainPanel.Controls.Add(label2); |
||||
label2.Dock = DockStyle.Top; |
||||
label2.TextAlign = ContentAlignment.MiddleLeft; |
||||
label2.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
|
||||
this.RedrawContentInternal(); |
||||
} |
||||
|
||||
private void FilterChanged(object sender, EventArgs e) |
||||
{ |
||||
string selectedFilterName = filterCombobox.SelectedItem.ToString(); |
||||
if (!string.IsNullOrEmpty(selectedFilterName)) |
||||
{ |
||||
HtmlHelp2Environment.FindFilterQuery(selectedFilterName); |
||||
} |
||||
} |
||||
|
||||
#region Help 2.0 Environment Events
|
||||
private void FilterQueryChanged(object sender, EventArgs e) |
||||
{ |
||||
mainPanel.Refresh(); |
||||
|
||||
string selectedFilterName = filterCombobox.SelectedItem.ToString(); |
||||
if (string.Compare(selectedFilterName, HtmlHelp2Environment.CurrentFilterName) != 0) |
||||
{ |
||||
filterCombobox.SelectedIndexChanged -= new EventHandler(FilterChanged); |
||||
filterCombobox.SelectedIndex = filterCombobox.Items.IndexOf(HtmlHelp2Environment.CurrentFilterName); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(FilterChanged); |
||||
} |
||||
} |
||||
|
||||
private void NamespaceReloaded(object sender, EventArgs e) |
||||
{ |
||||
this.UpdateControls(); |
||||
|
||||
if (HtmlHelp2Environment.SessionIsInitialized) |
||||
{ |
||||
filterCombobox.SelectedIndexChanged -= new EventHandler(FilterChanged); |
||||
HtmlHelp2Environment.BuildFilterList(filterCombobox); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(FilterChanged); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
private void SearchButtonClick(object sender, EventArgs e) |
||||
{ |
||||
if (!string.IsNullOrEmpty(searchTerm.Text)) |
||||
{ |
||||
this.AddTermToList(searchTerm.Text); |
||||
this.PerformFts(searchTerm.Text); |
||||
} |
||||
} |
||||
|
||||
private void SearchTextChanged(object sender, EventArgs e) |
||||
{ |
||||
searchButton.Enabled = (!string.IsNullOrEmpty(searchTerm.Text)); |
||||
} |
||||
|
||||
private void KeyPressed(object sender, KeyPressEventArgs e) |
||||
{ |
||||
if (e.KeyChar == (char)13 && searchTerm.Text.Length > 0) |
||||
{ |
||||
e.Handled = true; |
||||
this.AddTermToList(searchTerm.Text); |
||||
this.PerformFts(searchTerm.Text); |
||||
} |
||||
} |
||||
|
||||
private void AddTermToList(string searchText) |
||||
{ |
||||
if (searchTerm.Items.IndexOf(searchText) == -1) |
||||
{ |
||||
searchTerm.Items.Insert(0, searchText); |
||||
if (searchTerm.Items.Count > 10) searchTerm.Items.RemoveAt(10); |
||||
searchTerm.SelectedIndex = 0; |
||||
} |
||||
} |
||||
|
||||
#region FTS
|
||||
private void PerformFts(string searchWord) |
||||
{ |
||||
this.PerformFts(searchWord, false); |
||||
} |
||||
|
||||
private void PerformFts(string searchWord, bool useDynamicHelp) |
||||
{ |
||||
if (!HtmlHelp2Environment.SessionIsInitialized || string.IsNullOrEmpty(searchWord) || searchIsBusy) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
HtmlHelp2SearchResultsView searchResults = HtmlHelp2SearchResultsView.Instance; |
||||
|
||||
HtmlHelp2Dialog searchDialog = new HtmlHelp2Dialog(); |
||||
try |
||||
{ |
||||
searchIsBusy = true; |
||||
IHxTopicList matchingTopics = null; |
||||
|
||||
HxQuery_Options searchFlags = HxQuery_Options.HxQuery_No_Option; |
||||
searchFlags |= (titlesOnly.Checked)?HxQuery_Options.HxQuery_FullTextSearch_Title_Only:HxQuery_Options.HxQuery_No_Option; |
||||
searchFlags |= (enableStemming.Checked)?HxQuery_Options.HxQuery_FullTextSearch_Enable_Stemming:HxQuery_Options.HxQuery_No_Option; |
||||
searchFlags |= (reuseMatches.Checked)?HxQuery_Options.HxQuery_FullTextSearch_SearchPrevious:HxQuery_Options.HxQuery_No_Option; |
||||
|
||||
searchDialog.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSearchCaption}"); |
||||
searchDialog.ActionLabel = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSearchInProgress}", |
||||
new string[,] |
||||
{{"0", searchWord}}); |
||||
searchDialog.Show(); |
||||
Application.DoEvents(); |
||||
Cursor.Current = Cursors.WaitCursor; |
||||
if (useDynamicHelp) |
||||
matchingTopics = HtmlHelp2Environment.GetMatchingTopicsForDynamicHelp(searchWord); |
||||
else |
||||
matchingTopics = HtmlHelp2Environment.Fts.Query(searchWord, searchFlags); |
||||
|
||||
Cursor.Current = Cursors.Default; |
||||
|
||||
try |
||||
{ |
||||
searchResults.CleanUp(); |
||||
searchResults.SearchResultsListView.BeginUpdate(); |
||||
|
||||
foreach (IHxTopic topic in matchingTopics) |
||||
{ |
||||
if (useCurrentLang.Checked && !useDynamicHelp && !SharpDevLanguage.CheckTopicLanguage(topic)) |
||||
continue; |
||||
|
||||
ListViewItem lvi = new ListViewItem(); |
||||
lvi.Text = topic.get_Title(HxTopicGetTitleType.HxTopicGetRLTitle, |
||||
HxTopicGetTitleDefVal.HxTopicGetTitleFileName); |
||||
lvi.Tag = topic; |
||||
lvi.SubItems.Add(topic.Location); |
||||
lvi.SubItems.Add(topic.Rank.ToString(CultureInfo.CurrentCulture)); |
||||
|
||||
searchResults.SearchResultsListView.Items.Add(lvi); |
||||
} |
||||
|
||||
reuseMatches.Enabled = true; |
||||
} |
||||
finally |
||||
{ |
||||
searchResults.SearchResultsListView.EndUpdate(); |
||||
searchResults.SetStatusMessage(searchTerm.Text); |
||||
SearchResultsPad.Instance.ShowSearchResults( |
||||
new HelpSearchResult(searchTerm.Text, searchResults) |
||||
); |
||||
SearchResultsPad.Instance.BringToFront(); |
||||
searchIsBusy = false; |
||||
} |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException ex) |
||||
{ |
||||
LoggingService.Error("Help 2.0: cannot get matching search word; " + ex.ToString()); |
||||
|
||||
foreach (Control control in this.mainPanel.Controls) |
||||
{ |
||||
control.Enabled = false; |
||||
} |
||||
} |
||||
finally |
||||
{ |
||||
searchDialog.Dispose(); |
||||
} |
||||
} |
||||
|
||||
public bool PerformF1Fts(string keyword) |
||||
{ |
||||
return this.PerformF1Fts(keyword, false); |
||||
} |
||||
|
||||
public bool PerformF1Fts(string keyword, bool useDynamicHelp) |
||||
{ |
||||
if (!HtmlHelp2Environment.SessionIsInitialized || string.IsNullOrEmpty(keyword) || searchIsBusy) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
this.PerformFts(keyword, useDynamicHelp); |
||||
|
||||
HtmlHelp2SearchResultsView searchResults = HtmlHelp2SearchResultsView.Instance; |
||||
return searchResults.SearchResultsListView.Items.Count > 0; |
||||
} |
||||
#endregion
|
||||
|
||||
#region Project Events to hide/show the new "Use language" checkbox
|
||||
private void SolutionLoaded(object sender, SolutionEventArgs e) |
||||
{ |
||||
useCurrentLang.Visible = true; |
||||
} |
||||
|
||||
private void SolutionUnloaded(object sender, EventArgs e) |
||||
{ |
||||
useCurrentLang.Visible = false; |
||||
useCurrentLang.Checked = false; |
||||
} |
||||
#endregion
|
||||
} |
||||
|
||||
sealed class HelpSearchResult : ISearchResult |
||||
{ |
||||
string searchTerm; |
||||
HtmlHelp2SearchResultsView view; |
||||
|
||||
public HelpSearchResult(string searchTerm, HtmlHelp2SearchResultsView view) |
||||
{ |
||||
this.searchTerm = searchTerm; |
||||
this.view = view; |
||||
} |
||||
|
||||
public string Text { |
||||
get { return searchTerm; } |
||||
} |
||||
|
||||
public object GetControl() |
||||
{ |
||||
return view; |
||||
} |
||||
|
||||
public System.Collections.IList GetToolbarItems() |
||||
{ |
||||
return null; |
||||
} |
||||
} |
||||
} |
@ -1,155 +0,0 @@
@@ -1,155 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using System.Collections; |
||||
using System.Globalization; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using MSHelpServices; |
||||
|
||||
public class HtmlHelp2SearchResultsView : UserControl |
||||
{ |
||||
ListView listView = new ListView(); |
||||
ColumnHeader title = new ColumnHeader(); |
||||
ColumnHeader location = new ColumnHeader(); |
||||
ColumnHeader rank = new ColumnHeader(); |
||||
|
||||
static HtmlHelp2SearchResultsView instance; |
||||
|
||||
public static HtmlHelp2SearchResultsView Instance |
||||
{ |
||||
get |
||||
{ |
||||
if (instance == null) instance = new HtmlHelp2SearchResultsView(); |
||||
return instance; |
||||
} |
||||
} |
||||
|
||||
public override void Refresh() |
||||
{ |
||||
this.SetListViewHeader(); |
||||
base.Refresh(); |
||||
} |
||||
|
||||
public ListView SearchResultsListView |
||||
{ |
||||
get { return listView; } |
||||
} |
||||
|
||||
public HtmlHelp2SearchResultsView() |
||||
{ |
||||
this.SetListViewHeader(); |
||||
listView.Columns.Add(title); |
||||
listView.Columns.Add(location); |
||||
listView.Columns.Add(rank); |
||||
|
||||
listView.FullRowSelect = true; |
||||
listView.AutoArrange = true; |
||||
listView.Alignment = ListViewAlignment.Left; |
||||
listView.View = View.Details; |
||||
listView.Dock = DockStyle.Fill; |
||||
listView.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
ListViewResize(this,null); |
||||
|
||||
listView.Resize += new EventHandler(ListViewResize); |
||||
listView.DoubleClick += new EventHandler(ListViewDoubleClick); |
||||
listView.ColumnClick += new ColumnClickEventHandler(ColumnClick); |
||||
Controls.Add(listView); |
||||
} |
||||
|
||||
private void SetListViewHeader() |
||||
{ |
||||
title.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Title}"); |
||||
location.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Location}"); |
||||
rank.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Rank}"); |
||||
} |
||||
|
||||
private void ListViewResize(object sender, EventArgs e) |
||||
{ |
||||
rank.Width = 80; |
||||
int w = (listView.Width - rank.Width - 40) / 2; |
||||
title.Width = w; |
||||
location.Width = w; |
||||
} |
||||
|
||||
private void ListViewDoubleClick(object sender, EventArgs e) |
||||
{ |
||||
PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); |
||||
bool hiliteMatches = (search != null && ((HtmlHelp2SearchPad)search.PadContent).HiliteEnabled); |
||||
|
||||
ListViewItem lvi = listView.SelectedItems[0]; |
||||
if (lvi != null && lvi.Tag != null && lvi.Tag is IHxTopic) |
||||
{ |
||||
ShowHelpBrowser.OpenHelpView((IHxTopic)lvi.Tag, hiliteMatches); |
||||
} |
||||
} |
||||
|
||||
private void ColumnClick(object sender, ColumnClickEventArgs e) |
||||
{ |
||||
listView.ListViewItemSorter = new ListViewItemComparer(e.Column); |
||||
listView.Sort(); |
||||
} |
||||
|
||||
public void CleanUp() |
||||
{ |
||||
foreach (ListViewItem lvi in listView.Items) |
||||
{ |
||||
if(lvi.Tag != null) { lvi.Tag = null; } |
||||
} |
||||
|
||||
listView.Items.Clear(); |
||||
} |
||||
|
||||
public void SetStatusMessage(string indexTerm) |
||||
{ |
||||
string text = StringParser.Parse("${res:AddIns.HtmlHelp2.ResultsOfSearchResults}", |
||||
new string[,] |
||||
{{"0", indexTerm}, |
||||
{"1", listView.Items.Count.ToString(CultureInfo.InvariantCulture)}, |
||||
{"2", (listView.Items.Count == 1)?"${res:AddIns.HtmlHelp2.SingleTopic}":"${res:AddIns.HtmlHelp2.MultiTopic}"}} |
||||
); |
||||
|
||||
StatusBarService.SetMessage(text); |
||||
} |
||||
|
||||
#region Sorting
|
||||
class ListViewItemComparer : IComparer |
||||
{ |
||||
private int col; |
||||
|
||||
public ListViewItemComparer(int column) |
||||
{ |
||||
col = column; |
||||
} |
||||
|
||||
public int Compare(object x, object y) |
||||
{ |
||||
ListViewItem itemA = x as ListViewItem; |
||||
ListViewItem itemB = y as ListViewItem; |
||||
|
||||
switch (col) |
||||
{ |
||||
case 2: |
||||
int a = Int32.Parse(itemA.SubItems[col].Text, CultureInfo.InvariantCulture); |
||||
int b = Int32.Parse(itemB.SubItems[col].Text, CultureInfo.InvariantCulture); |
||||
if(a > b) return 1; |
||||
else if(a < b) return -1; |
||||
else return 0; |
||||
default: |
||||
return string.Compare(itemA.SubItems[col].Text, itemB.SubItems[col].Text); |
||||
} |
||||
} |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
@ -1,450 +0,0 @@
@@ -1,450 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using System.Drawing; |
||||
using System.Security.Permissions; |
||||
using System.Windows.Forms; |
||||
|
||||
using AxMSHelpControls; |
||||
using HtmlHelp2.Environment; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using MSHelpControls; |
||||
using PrintOptions = MSHelpServices.HxHierarchy_PrintNode_Options; |
||||
using TSC = MSHelpControls.HxTreeStyleConstant; |
||||
|
||||
public class ShowTocMenuCommand : AbstractMenuCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
PadDescriptor toc = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)); |
||||
if (toc != null) toc.BringPadToFront(); |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2TocPad : AbstractPadContent |
||||
{ |
||||
MSHelp2TocControl help2TocControl; |
||||
|
||||
public override object Control |
||||
{ |
||||
get { return help2TocControl; } |
||||
} |
||||
|
||||
public override void Dispose() |
||||
{ |
||||
help2TocControl.Dispose(); |
||||
} |
||||
|
||||
public HtmlHelp2TocPad() |
||||
{ |
||||
help2TocControl = new MSHelp2TocControl(); |
||||
ResourceService.LanguageChanged += delegate { help2TocControl.RedrawContent(); }; |
||||
} |
||||
|
||||
public void SyncToc(string topic) |
||||
{ |
||||
help2TocControl.SynchronizeToc(topic); |
||||
} |
||||
|
||||
public void GetPrevFromNode() |
||||
{ |
||||
help2TocControl.GetPrevFromNode(); |
||||
} |
||||
|
||||
public void GetPrevFromUrl(string topic) |
||||
{ |
||||
help2TocControl.GetPrevFromUrl(topic); |
||||
} |
||||
|
||||
public void GetNextFromNode() |
||||
{ |
||||
help2TocControl.GetNextFromNode(); |
||||
} |
||||
|
||||
public void GetNextFromUrl(string topic) |
||||
{ |
||||
help2TocControl.GetNextFromUrl(topic); |
||||
} |
||||
|
||||
public bool IsNotFirstNode |
||||
{ |
||||
get { return help2TocControl.IsNotFirstNode; } |
||||
} |
||||
|
||||
public bool IsNotLastNode |
||||
{ |
||||
get { return help2TocControl.IsNotLastNode; } |
||||
} |
||||
} |
||||
|
||||
public class MSHelp2TocControl : UserControl |
||||
{ |
||||
AxHxTocCtrl tocControl; |
||||
ComboBox filterCombobox = new ComboBox(); |
||||
Label label1 = new Label(); |
||||
Label infoLabel = new Label(); |
||||
ContextMenuStrip printContextMenu = new ContextMenuStrip(); |
||||
ToolStripMenuItem printTopic = new ToolStripMenuItem(); |
||||
ToolStripMenuItem printTopicAndSubTopics = new ToolStripMenuItem(); |
||||
bool tocControlFailed; |
||||
|
||||
protected override void Dispose(bool disposing) |
||||
{ |
||||
base.Dispose(disposing); |
||||
if (disposing && tocControl != null) |
||||
{ |
||||
tocControl.Dispose(); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public MSHelp2TocControl() |
||||
{ |
||||
this.InitializeComponents(); |
||||
this.UpdateControl(); |
||||
|
||||
HtmlHelp2Environment.FilterQueryChanged += new EventHandler(this.FilterQueryChanged); |
||||
HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); |
||||
} |
||||
|
||||
private void UpdateControl() |
||||
{ |
||||
filterCombobox.Enabled = |
||||
(HtmlHelp2Environment.SessionIsInitialized && !this.tocControlFailed); |
||||
infoLabel.Visible = false; |
||||
|
||||
if (this.tocControlFailed) |
||||
{ |
||||
this.ShowInfoMessage |
||||
(StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSystemNotAvailable}")); |
||||
} |
||||
else if (!HtmlHelp2Environment.SessionIsInitialized) |
||||
{ |
||||
if (tocControl != null) tocControl.Visible = false; |
||||
this.ShowInfoMessage |
||||
("${res:AddIns.HtmlHelp2.HelpCollectionMayBeEmpty}"); |
||||
} |
||||
else |
||||
{ |
||||
tocControl.Visible = true; |
||||
this.LoadToc(); |
||||
} |
||||
} |
||||
|
||||
private void InitializeComponents() |
||||
{ |
||||
infoLabel.Dock = DockStyle.Fill; |
||||
infoLabel.Visible = false; |
||||
infoLabel.TextAlign = ContentAlignment.MiddleCenter; |
||||
Controls.Add(infoLabel); |
||||
|
||||
if (Help2ControlsValidation.IsTocControlRegistered) |
||||
{ |
||||
try |
||||
{ |
||||
tocControl = new AxHxTocCtrl(); |
||||
tocControl.BeginInit(); |
||||
tocControl.Dock = DockStyle.Fill; |
||||
tocControl.NodeClick += |
||||
new AxMSHelpControls.IHxTreeViewEvents_NodeClickEventHandler(this.TocNodeClick); |
||||
tocControl.NodeRightClick += |
||||
new AxMSHelpControls.IHxTreeViewEvents_NodeRightClickEventHandler(TocNodeRightClick); |
||||
tocControl.EndInit(); |
||||
Controls.Add(tocControl); |
||||
tocControl.CreateControl(); |
||||
|
||||
tocControl.Visible = false; |
||||
tocControl.BorderStyle = HxBorderStyle.HxBorderStyle_FixedSingle; |
||||
tocControl.FontSource = HxFontSourceConstant.HxFontExternal; |
||||
tocControl.TreeStyle = |
||||
(HtmlHelp2Environment.Config.TocPictures)?TSC.HxTreeStyle_TreelinesPlusMinusPictureText:TSC.HxTreeStyle_TreelinesPlusMinusText; |
||||
|
||||
printTopic.Image = ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Print.bmp"); |
||||
printTopic.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; |
||||
printTopic.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.PrintTopic}"); |
||||
printTopic.Click += new EventHandler(this.PrintTopic); |
||||
printContextMenu.Items.Add(printTopic); |
||||
|
||||
printTopicAndSubTopics.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.PrintSubtopics}"); |
||||
printTopicAndSubTopics.Click += new EventHandler(this.PrintTopicAndSubTopics); |
||||
printContextMenu.Items.Add(printTopicAndSubTopics); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException cEx) |
||||
{ |
||||
LoggingService.Error("Help 2.0: TOC control failed: " + cEx.ToString()); |
||||
this.tocControlFailed = true; |
||||
} |
||||
} |
||||
|
||||
Panel panel1 = new Panel(); |
||||
Controls.Add(panel1); |
||||
panel1.Dock = DockStyle.Top; |
||||
panel1.Height = filterCombobox.Height + 7; |
||||
|
||||
panel1.Controls.Add(filterCombobox); |
||||
filterCombobox.Dock = DockStyle.Top; |
||||
filterCombobox.DropDownStyle = ComboBoxStyle.DropDownList; |
||||
filterCombobox.Sorted = true; |
||||
filterCombobox.Enabled = false; |
||||
filterCombobox.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); |
||||
|
||||
Controls.Add(label1); |
||||
label1.Dock = DockStyle.Top; |
||||
label1.TextAlign = ContentAlignment.MiddleLeft; |
||||
label1.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
this.RedrawContent(); |
||||
|
||||
this.tocControlFailed = (this.tocControlFailed || tocControl == null); |
||||
} |
||||
|
||||
private void ShowInfoMessage(string infoText) |
||||
{ |
||||
filterCombobox.Items.Clear(); |
||||
infoLabel.Text = infoText; |
||||
infoLabel.Visible = true; |
||||
} |
||||
|
||||
public void RedrawContent() |
||||
{ |
||||
label1.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.FilteredBy}"); |
||||
} |
||||
|
||||
private void TocNodeClick(object sender, IHxTreeViewEvents_NodeClickEvent e) |
||||
{ |
||||
string topicUrl = tocControl.Hierarchy.GetURL(e.hNode); |
||||
this.CallHelp(topicUrl); |
||||
} |
||||
|
||||
private void TocNodeRightClick(object sender, IHxTreeViewEvents_NodeRightClickEvent e) |
||||
{ |
||||
if (e.hNode != 0) |
||||
{ |
||||
printTopic.Enabled = !string.IsNullOrEmpty(tocControl.Hierarchy.GetURL(e.hNode)); |
||||
printTopicAndSubTopics.Enabled = tocControl.Hierarchy.GetFirstChild(e.hNode) != 0; |
||||
bool selectTextFlag = (tocControl.Hierarchy.GetFirstChild(e.hNode) == 0 || |
||||
string.IsNullOrEmpty(tocControl.Hierarchy.GetURL(e.hNode))); |
||||
printTopicAndSubTopics.Text = |
||||
StringParser.Parse((selectTextFlag)? |
||||
"${res:AddIns.HtmlHelp2.PrintSubtopics}": |
||||
"${res:AddIns.HtmlHelp2.PrintTopicAndSubtopics}"); |
||||
|
||||
Point p = new Point(e.x, e.y); |
||||
p = this.PointToClient(p); |
||||
printContextMenu.Show(this, p); |
||||
} |
||||
} |
||||
|
||||
#region Printing
|
||||
private void PrintTopic(object sender, EventArgs e) |
||||
{ |
||||
if (tocControl.Selection != 0) |
||||
{ |
||||
tocControl.Hierarchy.PrintNode(0, tocControl.Selection, PrintOptions.HxHierarchy_PrintNode_Option_Node); |
||||
} |
||||
} |
||||
|
||||
private void PrintTopicAndSubTopics(object sender, EventArgs e) |
||||
{ |
||||
if (tocControl.Selection != 0) |
||||
{ |
||||
tocControl.Hierarchy.PrintNode(0, tocControl.Selection, PrintOptions.HxHierarchy_PrintNode_Option_Children); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
private void FilterChanged(object sender, EventArgs e) |
||||
{ |
||||
string selectedFilterName = filterCombobox.SelectedItem.ToString(); |
||||
if (selectedFilterName != null && selectedFilterName.Length > 0) |
||||
{ |
||||
Cursor.Current = Cursors.WaitCursor; |
||||
this.SetToc(selectedFilterName); |
||||
Cursor.Current = Cursors.Default; |
||||
} |
||||
} |
||||
|
||||
private void LoadToc() |
||||
{ |
||||
if (this.SetToc(HtmlHelp2Environment.CurrentFilterName)) |
||||
{ |
||||
filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); |
||||
HtmlHelp2Environment.BuildFilterList(filterCombobox); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); |
||||
} |
||||
} |
||||
|
||||
private bool SetToc(string filterName) |
||||
{ |
||||
try |
||||
{ |
||||
tocControl.Hierarchy = |
||||
HtmlHelp2Environment.GetTocHierarchy(HtmlHelp2Environment.FindFilterQuery(filterName)); |
||||
return true; |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Cannot connect to the IHxHierarchy interface."); |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
private void CallHelp(string topic) |
||||
{ |
||||
this.CallHelp(topic, true); |
||||
} |
||||
|
||||
private void CallHelp(string topic, bool syncToc) |
||||
{ |
||||
if (!string.IsNullOrEmpty(topic)) |
||||
{ |
||||
if (syncToc) this.SynchronizeToc(topic); |
||||
ShowHelpBrowser.OpenHelpView(topic); |
||||
} |
||||
} |
||||
|
||||
#region Help 2.0 Environment Events
|
||||
private void FilterQueryChanged(object sender, EventArgs e) |
||||
{ |
||||
Application.DoEvents(); |
||||
|
||||
string currentFilterName = filterCombobox.SelectedItem.ToString(); |
||||
if (string.Compare(currentFilterName, HtmlHelp2Environment.CurrentFilterName) != 0) |
||||
{ |
||||
filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); |
||||
filterCombobox.SelectedIndex = |
||||
filterCombobox.Items.IndexOf(HtmlHelp2Environment.CurrentFilterName); |
||||
this.SetToc(HtmlHelp2Environment.CurrentFilterName); |
||||
filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); |
||||
} |
||||
} |
||||
|
||||
private void NamespaceReloaded(object sender, EventArgs e) |
||||
{ |
||||
this.UpdateControl(); |
||||
|
||||
if (tocControl != null) { |
||||
tocControl.TreeStyle = |
||||
(HtmlHelp2Environment.Config.TocPictures)?TSC.HxTreeStyle_TreelinesPlusMinusPictureText:TSC.HxTreeStyle_TreelinesPlusMinusText; |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Published Help 2.0 Commands
|
||||
public void SynchronizeToc(string topic) |
||||
{ |
||||
try |
||||
{ |
||||
tocControl.Synchronize(topic); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
// SD2-812: ignore exception when trying to synchronize non-existing URL
|
||||
} |
||||
} |
||||
|
||||
public void GetNextFromNode() |
||||
{ |
||||
try |
||||
{ |
||||
int currentNode = tocControl.Hierarchy.GetNextFromNode(tocControl.Selection); |
||||
string topicUrl = tocControl.Hierarchy.GetURL(currentNode); |
||||
this.CallHelp(topicUrl, true); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
} |
||||
} |
||||
|
||||
public void GetNextFromUrl(string topic) |
||||
{ |
||||
if (topic == null || topic.Length == 0) return; |
||||
try |
||||
{ |
||||
int currentNode = tocControl.Hierarchy.GetNextFromUrl(topic); |
||||
string topicUrl = tocControl.Hierarchy.GetURL(currentNode); |
||||
this.CallHelp(topicUrl, true); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
// SD2-812: ignore exception when trying to synchronize non-existing URL
|
||||
} |
||||
catch (ArgumentException) |
||||
{ |
||||
} |
||||
} |
||||
|
||||
public void GetPrevFromNode() |
||||
{ |
||||
try |
||||
{ |
||||
int currentNode = tocControl.Hierarchy.GetPrevFromNode(tocControl.Selection); |
||||
string topicUrl = tocControl.Hierarchy.GetURL(currentNode); |
||||
this.CallHelp(topicUrl, true); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
} |
||||
} |
||||
|
||||
public void GetPrevFromUrl(string topic) |
||||
{ |
||||
if (topic == null || topic.Length == 0) return; |
||||
try |
||||
{ |
||||
int currentNode = tocControl.Hierarchy.GetPrevFromUrl(topic); |
||||
string topicUrl = tocControl.Hierarchy.GetURL(currentNode); |
||||
this.CallHelp(topicUrl, true); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
// SD2-812: ignore exception when trying to synchronize non-existing URL
|
||||
} |
||||
catch (ArgumentException) |
||||
{ |
||||
} |
||||
} |
||||
|
||||
public bool IsNotFirstNode |
||||
{ |
||||
get |
||||
{ |
||||
try |
||||
{ |
||||
int node = tocControl.Hierarchy.GetPrevFromNode(tocControl.Selection); |
||||
return node != 0; |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public bool IsNotLastNode |
||||
{ |
||||
get |
||||
{ |
||||
try |
||||
{ |
||||
int node = tocControl.Hierarchy.GetNextFromNode(tocControl.Selection); |
||||
return (node != 0); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
@ -1,88 +0,0 @@
@@ -1,88 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Security.Permissions; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.BrowserDisplayBinding; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
public abstract class HelpToolbarCommand : AbstractCommand |
||||
{ |
||||
public static HtmlHelp2TocPad TocPad |
||||
{ |
||||
get |
||||
{ |
||||
return (HtmlHelp2TocPad)WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)).PadContent; |
||||
} |
||||
} |
||||
|
||||
public WebBrowser Browser |
||||
{ |
||||
get |
||||
{ |
||||
return ((HtmlViewPane)Owner).WebBrowser; |
||||
} |
||||
} |
||||
|
||||
public static void BringTocPadToFront() |
||||
{ |
||||
WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)).BringPadToFront(); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
[PermissionSet(SecurityAction.InheritanceDemand, Name="Execution")] |
||||
public class SyncTocCommand : HelpToolbarCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
TocPad.SyncToc(Browser.Url.ToString()); |
||||
BringTocPadToFront(); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
[PermissionSet(SecurityAction.InheritanceDemand, Name="Execution")] |
||||
public class PreviousTopicCommand : HelpToolbarCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
try |
||||
{ |
||||
TocPad.GetPrevFromNode(); |
||||
} |
||||
catch (System.ArgumentException) |
||||
{ |
||||
TocPad.GetPrevFromUrl(Browser.Url.ToString()); |
||||
} |
||||
BringTocPadToFront(); |
||||
} |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
[PermissionSet(SecurityAction.InheritanceDemand, Name="Execution")] |
||||
public class NextTopicCommand : HelpToolbarCommand |
||||
{ |
||||
public override void Run() |
||||
{ |
||||
try |
||||
{ |
||||
TocPad.GetNextFromNode(); |
||||
} |
||||
catch (System.ArgumentException) |
||||
{ |
||||
TocPad.GetNextFromUrl(Browser.Url.ToString()); |
||||
} |
||||
BringTocPadToFront(); |
||||
} |
||||
} |
||||
} |
@ -1,103 +0,0 @@
@@ -1,103 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
// With a big "Thank you" to Robert_G (Delphi-PRAXiS)
|
||||
|
||||
using System; |
||||
using System.Security.Permissions; |
||||
using ICSharpCode.SharpDevelop.BrowserDisplayBinding; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using MSHelpServices; |
||||
|
||||
public static class ShowHelpBrowser |
||||
{ |
||||
static bool hiliteMatches; |
||||
static IHxTopic lastTopic; |
||||
|
||||
public static void OpenHelpView(IHxTopic topic) |
||||
{ |
||||
if (topic == null) |
||||
{ |
||||
throw new ArgumentNullException("topic"); |
||||
} |
||||
OpenHelpView(topic.URL, null, false); |
||||
} |
||||
|
||||
public static void OpenHelpView(IHxTopic topic, bool hiliteMatchingWords) |
||||
{ |
||||
if (topic == null) |
||||
{ |
||||
throw new ArgumentNullException("topic"); |
||||
} |
||||
OpenHelpView(topic.URL, topic, hiliteMatchingWords); |
||||
} |
||||
|
||||
public static void OpenHelpView(string topicLink) |
||||
{ |
||||
OpenHelpView(topicLink, null, false); |
||||
} |
||||
|
||||
public static void OpenHelpView(string topicLink, bool hiliteMatchingWords) |
||||
{ |
||||
OpenHelpView(topicLink, null, hiliteMatchingWords); |
||||
} |
||||
|
||||
public static void OpenHelpView(string topicLink, IHxTopic topic, bool hiliteMatchingWords) |
||||
{ |
||||
hiliteMatches = hiliteMatchingWords; |
||||
lastTopic = topic; |
||||
BrowserPane help2Browser = ActiveHelp2BrowserView(); |
||||
|
||||
if (help2Browser != null) |
||||
{ |
||||
help2Browser.Navigate(topicLink); |
||||
help2Browser.WorkbenchWindow.SelectWindow(); |
||||
} |
||||
} |
||||
|
||||
public static BrowserPane ActiveHelp2BrowserView() |
||||
{ |
||||
IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; |
||||
if (window != null) |
||||
{ |
||||
BrowserPane browserPane = window.ActiveViewContent as BrowserPane; |
||||
if (browserPane != null && browserPane.Url.Scheme == "ms-help") |
||||
return browserPane; |
||||
} |
||||
|
||||
foreach(IViewContent view in WorkbenchSingleton.Workbench.ViewContentCollection) |
||||
{ |
||||
BrowserPane browserPane = view as BrowserPane; |
||||
if (browserPane != null && browserPane.Url.Scheme == "ms-help") |
||||
return browserPane; |
||||
} |
||||
return CreateNewHelp2BrowserView(); |
||||
} |
||||
|
||||
public static BrowserPane CreateNewHelp2BrowserView() |
||||
{ |
||||
BrowserPane tempPane = new BrowserPane(); |
||||
WorkbenchSingleton.Workbench.ShowView(tempPane); |
||||
return tempPane; |
||||
} |
||||
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name="Execution")] |
||||
public static void HighlightDocument(HtmlViewPane htmlViewPane) |
||||
{ |
||||
if (htmlViewPane == null) |
||||
{ |
||||
throw new ArgumentNullException("htmlViewPane"); |
||||
} |
||||
if (hiliteMatches && lastTopic != null) |
||||
{ |
||||
lastTopic.HighlightDocument(htmlViewPane.WebBrowser.Document.DomDocument); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,91 +0,0 @@
@@ -1,91 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Windows.Forms; |
||||
|
||||
using HtmlHelp2.Environment; |
||||
using HtmlHelp2.JScriptGlobals; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.BrowserDisplayBinding; |
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
public class BrowserScheme : DefaultSchemeExtension |
||||
{ |
||||
JScriptExternal scriptObject; |
||||
|
||||
public override void GoHome(HtmlViewPane pane) |
||||
{ |
||||
if (pane == null) |
||||
{ |
||||
throw new ArgumentNullException("pane"); |
||||
} |
||||
pane.Navigate(new Uri(HtmlHelp2Environment.DefaultPage)); |
||||
} |
||||
|
||||
public override void GoSearch(HtmlViewPane pane) |
||||
{ |
||||
if (pane == null) |
||||
{ |
||||
throw new ArgumentNullException("pane"); |
||||
} |
||||
pane.Navigate(new Uri(HtmlHelp2Environment.SearchPage)); |
||||
} |
||||
|
||||
// [PermissionSet(SecurityAction.LinkDemand, Name="Execution")]
|
||||
public override void InterceptNavigate(HtmlViewPane pane, WebBrowserNavigatingEventArgs e) |
||||
{ |
||||
if (pane == null) |
||||
{ |
||||
throw new ArgumentNullException("pane"); |
||||
} |
||||
if (scriptObject == null) { |
||||
scriptObject = new JScriptExternal(); |
||||
LoadHelpState(); |
||||
} |
||||
pane.WebBrowser.ObjectForScripting = scriptObject; |
||||
// add event (max. 1 one time)
|
||||
pane.WebBrowser.Disposed -= SaveHelpState; |
||||
pane.WebBrowser.Disposed += SaveHelpState; |
||||
base.InterceptNavigate(pane, e); |
||||
} |
||||
|
||||
void LoadHelpState() |
||||
{ |
||||
foreach (string line in PropertyService.Get("HtmlHelpPersistedJScriptGlobals", new string[0])) { |
||||
int pos = line.IndexOf('='); |
||||
string name = line.Substring(0, pos); |
||||
scriptObject.Globals.VariablePersistCollection[name] = true; |
||||
scriptObject.Globals.VariableValueCollection[name] = line.Substring(pos + 1); |
||||
} |
||||
} |
||||
|
||||
void SaveHelpState(object sender, EventArgs e) |
||||
{ |
||||
((System.ComponentModel.IComponent)sender).Disposed -= SaveHelpState; |
||||
List<string> lines = new List<string>(); |
||||
foreach (KeyValuePair<string, bool> pair in scriptObject.Globals.VariablePersistCollection) { |
||||
if (pair.Value) { |
||||
lines.Add(pair.Key + "=" + scriptObject.Globals.VariableValueCollection[pair.Key]); |
||||
} |
||||
} |
||||
PropertyService.Set("HtmlHelpPersistedJScriptGlobals", lines.ToArray()); |
||||
} |
||||
|
||||
// [PermissionSet(SecurityAction.LinkDemand, Name="Execution")]
|
||||
public override void DocumentCompleted(HtmlViewPane pane, WebBrowserDocumentCompletedEventArgs e) |
||||
{ |
||||
if (pane == null) |
||||
{ |
||||
throw new ArgumentNullException("pane"); |
||||
} |
||||
ShowHelpBrowser.HighlightDocument(pane); |
||||
} |
||||
} |
||||
} |
@ -1,85 +0,0 @@
@@ -1,85 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Siegfried Pammer" email="sie_pam@gmx.at"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using MSHelpServices; |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Windows.Forms; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
namespace HtmlHelp2.Commands |
||||
{ |
||||
/// <summary>
|
||||
/// Shows help information for an error in the Errors window.
|
||||
/// </summary>
|
||||
public class ShowErrorHelpCommand : AbstractMenuCommand |
||||
{ |
||||
/// <summary>
|
||||
/// Starts the command
|
||||
/// </summary>
|
||||
public override void Run() |
||||
{ |
||||
ICSharpCode.SharpDevelop.Gui.TaskView view = (ICSharpCode.SharpDevelop.Gui.TaskView)Owner; |
||||
|
||||
// Search all selected tasks
|
||||
foreach (Task t in new List<Task>(view.SelectedTasks)) { |
||||
if (t.BuildError == null) |
||||
continue; |
||||
|
||||
string code = t.BuildError.ErrorCode; |
||||
|
||||
if (string.IsNullOrEmpty(code)) |
||||
return; |
||||
|
||||
// Get help content
|
||||
MSHelpServices.IHxTopic topic; |
||||
|
||||
// If HtmlHelp2 AddIn is initialised correctly we can start!
|
||||
if (HtmlHelp2.Environment.HtmlHelp2Environment.SessionIsInitialized) { |
||||
// Get the topic
|
||||
IHxIndex index = HtmlHelp2.Environment.HtmlHelp2Environment.GetIndex(""); |
||||
if (index == null) { |
||||
MessageService.ShowErrorFormatted("No help available for {0}!", code); |
||||
return; |
||||
} |
||||
int indexSlot = index.GetSlotFromString(code); |
||||
if (indexSlot <= 0) { |
||||
MessageService.ShowErrorFormatted("No help available for {0}!", code); |
||||
return; |
||||
} |
||||
IHxTopicList list = index.GetTopicsFromSlot(indexSlot); |
||||
if (list == null) { |
||||
MessageService.ShowErrorFormatted("No help available for {0}!", code); |
||||
return; |
||||
} |
||||
try { |
||||
topic = list.ItemAt(1); |
||||
} catch (ArgumentException) { |
||||
topic = null; |
||||
} |
||||
if (topic == null) { |
||||
MessageService.ShowErrorFormatted("No help available for {0}!", code); |
||||
return; |
||||
} |
||||
string topicTitle = topic.get_Title(HxTopicGetTitleType.HxTopicGetTOCTitle, HxTopicGetTitleDefVal.HxTopicGetTitleFileName); |
||||
if (topicTitle == null || !topicTitle.Contains(code)) { |
||||
MessageService.ShowErrorFormatted("No help available for {0}!", code); |
||||
return; |
||||
} |
||||
} else { // Otherwise we have to show an Error message ...
|
||||
LoggingService.Error("Couldn't initialize help database"); |
||||
return; |
||||
} |
||||
|
||||
// Show Browser window
|
||||
HtmlHelp2.ShowHelpBrowser.OpenHelpView(topic); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,47 +0,0 @@
@@ -1,47 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2 |
||||
{ |
||||
using System; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
public class MSHelpProvider : HelpProvider |
||||
{ |
||||
public override bool TryShowHelp(string fullTypeName) |
||||
{ |
||||
LoggingService.Info("Help 2.0: MsHelpProvider.TryShowHelp"); |
||||
|
||||
// try
|
||||
// {
|
||||
PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); |
||||
return ((HtmlHelp2SearchPad)search.PadContent).PerformF1Fts(fullTypeName, true); |
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
} |
||||
|
||||
public override bool TryShowHelpByKeyword(string keyword) |
||||
{ |
||||
LoggingService.Info("Help 2.0: MsHelpProvider.TryShowHelpByKeyword"); |
||||
|
||||
// try
|
||||
// {
|
||||
PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); |
||||
return ((HtmlHelp2SearchPad)search.PadContent).PerformF1Fts(keyword); |
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
} |
||||
} |
||||
} |
@ -1,764 +0,0 @@
@@ -1,764 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50215.44
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
namespace AxMSHelpControls |
||||
{ |
||||
[System.Windows.Forms.AxHost.ClsidAttribute("{314111b8-a502-11d2-bbca-00c04f8ec294}")] |
||||
[System.ComponentModel.DesignTimeVisibleAttribute(true)] |
||||
public class AxHxTocCtrl : System.Windows.Forms.AxHost { |
||||
|
||||
private MSHelpControls.IHxTreeView ocx; |
||||
|
||||
private AxHxTocCtrlEventMulticaster eventMulticaster; |
||||
|
||||
private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; |
||||
|
||||
public AxHxTocCtrl() : base("314111b8-a502-11d2-bbca-00c04f8ec294") |
||||
{ |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(false)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4096)] |
||||
public virtual MSHelpServices.IHxHierarchy Hierarchy { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Hierarchy; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Hierarchy = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4100)] |
||||
public virtual int ImageList { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.ImageList; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.ImageList = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4097)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual bool HideSelection { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.HideSelection; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.HideSelection = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4098)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxTreeLineStyleConstant LineStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.LineStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.LineStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4099)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxTreeStyleConstant TreeStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.TreeStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.TreeStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-501)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Color BackColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.BackColor))); |
||||
} |
||||
else { |
||||
return base.BackColor; |
||||
} |
||||
} |
||||
set { |
||||
base.BackColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-513)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Color ForeColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); |
||||
} |
||||
else { |
||||
return base.ForeColor; |
||||
} |
||||
} |
||||
set { |
||||
base.ForeColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-504)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxBorderStyle BorderStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.BorderStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.BorderStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-520)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxAppearanceConstant Appearance { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Appearance; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Appearance = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-521)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxMousePointerConstant MousePointer { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.MousePointer; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.MousePointer = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-512)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Font Font { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetFontFromIFont(this.ocx.Font); |
||||
} |
||||
else { |
||||
return base.Font; |
||||
} |
||||
} |
||||
set { |
||||
base.Font = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4102)] |
||||
public virtual int Selection { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Selection; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4103)] |
||||
public virtual short LangId { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.LangId; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.LangId = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4104)] |
||||
public virtual MSHelpControls.HxFontSourceConstant FontSource { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.FontSource; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FontSource = value; |
||||
} |
||||
} |
||||
|
||||
public event IHxTreeViewEvents_NodeClickEventHandler NodeClick; |
||||
|
||||
public event IHxTreeViewEvents_NodeRightClickEventHandler NodeRightClick; |
||||
|
||||
public override void Refresh() { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.Refresh(); |
||||
} |
||||
|
||||
public virtual void Synchronize(string bstrURL) { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Synchronize", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.Synchronize(bstrURL); |
||||
} |
||||
|
||||
protected override void CreateSink() { |
||||
try { |
||||
this.eventMulticaster = new AxHxTocCtrlEventMulticaster(this); |
||||
this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxTreeViewEvents)); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void DetachSink() { |
||||
try { |
||||
this.cookie.Disconnect(); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void AttachInterfaces() { |
||||
try { |
||||
this.ocx = ((MSHelpControls.IHxTreeView)(this.GetOcx())); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnNodeClick(object sender, IHxTreeViewEvents_NodeClickEvent e) { |
||||
if ((this.NodeClick != null)) { |
||||
this.NodeClick(sender, e); |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnNodeRightClick(object sender, IHxTreeViewEvents_NodeRightClickEvent e) { |
||||
if ((this.NodeRightClick != null)) { |
||||
this.NodeRightClick(sender, e); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxTreeViewEvents_NodeClickEventHandler(object sender, IHxTreeViewEvents_NodeClickEvent e); |
||||
|
||||
public class IHxTreeViewEvents_NodeClickEvent { |
||||
|
||||
public int hNode; |
||||
|
||||
public IHxTreeViewEvents_NodeClickEvent(int hNode) { |
||||
this.hNode = hNode; |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxTreeViewEvents_NodeRightClickEventHandler(object sender, IHxTreeViewEvents_NodeRightClickEvent e); |
||||
|
||||
public class IHxTreeViewEvents_NodeRightClickEvent { |
||||
|
||||
public int hNode; |
||||
|
||||
public int x; |
||||
|
||||
public int y; |
||||
|
||||
public IHxTreeViewEvents_NodeRightClickEvent(int hNode, int x, int y) { |
||||
this.hNode = hNode; |
||||
this.x = x; |
||||
this.y = y; |
||||
} |
||||
} |
||||
|
||||
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] |
||||
public class AxHxTocCtrlEventMulticaster : MSHelpControls.IHxTreeViewEvents { |
||||
|
||||
private AxHxTocCtrl parent; |
||||
|
||||
public AxHxTocCtrlEventMulticaster(AxHxTocCtrl parent) { |
||||
this.parent = parent; |
||||
} |
||||
|
||||
public virtual void NodeClick(int hNode) { |
||||
IHxTreeViewEvents_NodeClickEvent nodeclickEvent = new IHxTreeViewEvents_NodeClickEvent(hNode); |
||||
this.parent.RaiseOnNodeClick(this.parent, nodeclickEvent); |
||||
} |
||||
|
||||
public virtual void NodeRightClick(int hNode, int x, int y) { |
||||
IHxTreeViewEvents_NodeRightClickEvent noderightclickEvent = new IHxTreeViewEvents_NodeRightClickEvent(hNode, x, y); |
||||
this.parent.RaiseOnNodeRightClick(this.parent, noderightclickEvent); |
||||
} |
||||
} |
||||
|
||||
[System.Windows.Forms.AxHost.ClsidAttribute("{314111c6-a502-11d2-bbca-00c04f8ec294}")] |
||||
[System.ComponentModel.DesignTimeVisibleAttribute(true)] |
||||
public class AxHxIndexCtrl : System.Windows.Forms.AxHost { |
||||
|
||||
private MSHelpControls.IHxIndexView ocx; |
||||
|
||||
private AxHxIndexCtrlEventMulticaster eventMulticaster; |
||||
|
||||
private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; |
||||
|
||||
public AxHxIndexCtrl() : |
||||
base("314111c6-a502-11d2-bbca-00c04f8ec294") { |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(false)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16384)] |
||||
public virtual MSHelpServices.IHxIndex IndexData { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.IndexData; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.IndexData = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16385)] |
||||
public virtual int Selection { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Selection; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Selection = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-501)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public override System.Drawing.Color BackColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.BackColor))); |
||||
} |
||||
else { |
||||
return base.BackColor; |
||||
} |
||||
} |
||||
set { |
||||
base.BackColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-513)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public override System.Drawing.Color ForeColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); |
||||
} |
||||
else { |
||||
return base.ForeColor; |
||||
} |
||||
} |
||||
set { |
||||
base.ForeColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-504)] |
||||
public virtual MSHelpControls.HxBorderStyle BorderStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.BorderStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.BorderStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-520)] |
||||
public virtual MSHelpControls.HxAppearanceConstant Appearance { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Appearance; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Appearance = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-521)] |
||||
public virtual MSHelpControls.HxMousePointerConstant MousePointer { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.MousePointer; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.MousePointer = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-512)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Font Font { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetFontFromIFont(this.ocx.Font); |
||||
} |
||||
else { |
||||
return base.Font; |
||||
} |
||||
} |
||||
set { |
||||
base.Font = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16388)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color HighlightForeColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.HighlightForeColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.HighlightForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16389)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color HighlightBackColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.HighlightBackColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.HighlightBackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16390)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color FocusHighlightForeColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightForeColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FocusHighlightForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16391)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color FocusHighlightBackColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightBackColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FocusHighlightBackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16392)] |
||||
public virtual short LangId { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.LangId; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.LangId = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16393)] |
||||
public virtual MSHelpControls.HxFontSourceConstant FontSource { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.FontSource; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FontSource = value; |
||||
} |
||||
} |
||||
|
||||
public event IHxIndexViewEvents_ItemClickEventHandler ItemClick; |
||||
|
||||
public event IHxIndexViewEvents_ItemSelectEventHandler ItemSelect; |
||||
|
||||
public virtual void SelectItem(int iItem) { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SelectItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.SelectItem(iItem); |
||||
} |
||||
|
||||
public virtual void ClickItem(int iItem) { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ClickItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.ClickItem(iItem); |
||||
} |
||||
|
||||
public override void Refresh() { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.Refresh(); |
||||
} |
||||
|
||||
protected override void CreateSink() { |
||||
try { |
||||
this.eventMulticaster = new AxHxIndexCtrlEventMulticaster(this); |
||||
this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxIndexViewEvents)); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void DetachSink() { |
||||
try { |
||||
this.cookie.Disconnect(); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void AttachInterfaces() { |
||||
try { |
||||
this.ocx = ((MSHelpControls.IHxIndexView)(this.GetOcx())); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnItemClick(object sender, IHxIndexViewEvents_ItemClickEvent e) { |
||||
if ((this.ItemClick != null)) { |
||||
this.ItemClick(sender, e); |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnItemSelect(object sender, IHxIndexViewEvents_ItemSelectEvent e) { |
||||
if ((this.ItemSelect != null)) { |
||||
this.ItemSelect(sender, e); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxIndexViewEvents_ItemClickEventHandler(object sender, IHxIndexViewEvents_ItemClickEvent e); |
||||
|
||||
public class IHxIndexViewEvents_ItemClickEvent { |
||||
|
||||
public int iItem; |
||||
|
||||
public IHxIndexViewEvents_ItemClickEvent(int iItem) { |
||||
this.iItem = iItem; |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxIndexViewEvents_ItemSelectEventHandler(object sender, IHxIndexViewEvents_ItemSelectEvent e); |
||||
|
||||
public class IHxIndexViewEvents_ItemSelectEvent { |
||||
|
||||
public int iItem; |
||||
|
||||
public IHxIndexViewEvents_ItemSelectEvent(int iItem) { |
||||
this.iItem = iItem; |
||||
} |
||||
} |
||||
|
||||
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] |
||||
public class AxHxIndexCtrlEventMulticaster : MSHelpControls.IHxIndexViewEvents { |
||||
|
||||
private AxHxIndexCtrl parent; |
||||
|
||||
public AxHxIndexCtrlEventMulticaster(AxHxIndexCtrl parent) { |
||||
this.parent = parent; |
||||
} |
||||
|
||||
public virtual void ItemClick(int iItem) { |
||||
IHxIndexViewEvents_ItemClickEvent itemclickEvent = new IHxIndexViewEvents_ItemClickEvent(iItem); |
||||
this.parent.RaiseOnItemClick(this.parent, itemclickEvent); |
||||
} |
||||
|
||||
public virtual void ItemSelect(int iItem) { |
||||
IHxIndexViewEvents_ItemSelectEvent itemselectEvent = new IHxIndexViewEvents_ItemSelectEvent(iItem); |
||||
this.parent.RaiseOnItemSelect(this.parent, itemselectEvent); |
||||
} |
||||
} |
||||
} |
@ -1,52 +0,0 @@
@@ -1,52 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2.Environment |
||||
{ |
||||
using System; |
||||
using System.IO; |
||||
using Microsoft.Win32; |
||||
|
||||
public sealed class Help2ControlsValidation |
||||
{ |
||||
Help2ControlsValidation() |
||||
{ |
||||
} |
||||
|
||||
public static bool IsTocControlRegistered |
||||
{ |
||||
get |
||||
{ |
||||
return IsClassRegistered("{314111b8-a502-11d2-bbca-00c04f8ec294}"); |
||||
} |
||||
} |
||||
|
||||
public static bool IsIndexControlRegistered |
||||
{ |
||||
get |
||||
{ |
||||
return IsClassRegistered("{314111c6-a502-11d2-bbca-00c04f8ec294}"); |
||||
} |
||||
} |
||||
|
||||
private static bool IsClassRegistered(string classId) |
||||
{ |
||||
try |
||||
{ |
||||
RegistryKey tmp = Registry.ClassesRoot.OpenSubKey |
||||
(string.Format(null, @"CLSID\{0}\InprocServer32", classId), false); |
||||
string help2Library = (string)tmp.GetValue("", string.Empty); |
||||
tmp.Close(); |
||||
return (!string.IsNullOrEmpty(help2Library) && File.Exists(help2Library)); |
||||
} |
||||
catch (System.NullReferenceException) |
||||
{ |
||||
} |
||||
return false; |
||||
} |
||||
} |
||||
} |
@ -1,180 +0,0 @@
@@ -1,180 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2.Environment |
||||
{ |
||||
using System; |
||||
using System.Runtime.InteropServices; |
||||
using System.Windows.Forms; |
||||
|
||||
using MSHelpServices; |
||||
|
||||
public sealed class Help2RegistryWalker |
||||
{ |
||||
Help2RegistryWalker() |
||||
{ |
||||
} |
||||
|
||||
public static bool BuildNamespacesList(ComboBox help2Collections, string selectedHelp2Collection) |
||||
{ |
||||
if (help2Collections == null) |
||||
{ |
||||
throw new ArgumentNullException("help2Collections"); |
||||
} |
||||
|
||||
HxRegistryWalkerClass registryWalker; |
||||
IHxRegNamespaceList help2Namespaces; |
||||
try |
||||
{ |
||||
registryWalker = new HxRegistryWalkerClass(); |
||||
help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
help2Namespaces = null; |
||||
registryWalker = null; |
||||
} |
||||
|
||||
if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
help2Collections.Items.Clear(); |
||||
help2Collections.BeginUpdate(); |
||||
try |
||||
{ |
||||
string currentDescription = string.Empty; |
||||
|
||||
foreach (IHxRegNamespace currentNamespace in help2Namespaces) |
||||
{ |
||||
help2Collections.Items.Add |
||||
((string)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespaceDescription)); |
||||
|
||||
if (!string.IsNullOrEmpty(selectedHelp2Collection) && |
||||
string.Compare(selectedHelp2Collection, currentNamespace.Name) == 0) |
||||
{ |
||||
currentDescription = |
||||
(string)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespaceDescription); |
||||
} |
||||
} |
||||
|
||||
if (!string.IsNullOrEmpty(currentDescription)) |
||||
help2Collections.SelectedIndex = help2Collections.Items.IndexOf(currentDescription); |
||||
else |
||||
help2Collections.SelectedIndex = 0; |
||||
} |
||||
finally |
||||
{ |
||||
help2Collections.EndUpdate(); |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public static string GetNamespaceName(string description) |
||||
{ |
||||
HxRegistryWalkerClass registryWalker; |
||||
IHxRegNamespaceList help2Namespaces; |
||||
try |
||||
{ |
||||
registryWalker = new HxRegistryWalkerClass(); |
||||
help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
help2Namespaces = null; |
||||
registryWalker = null; |
||||
} |
||||
|
||||
if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0) |
||||
{ |
||||
return string.Empty; |
||||
} |
||||
foreach (IHxRegNamespace currentNamespace in help2Namespaces) |
||||
{ |
||||
string currentDescription = |
||||
(string)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespaceDescription); |
||||
if (string.Compare(currentDescription, description) == 0) |
||||
{ |
||||
return currentNamespace.Name; |
||||
} |
||||
} |
||||
return string.Empty; |
||||
} |
||||
|
||||
public static string GetFirstNamespace(string name) |
||||
{ |
||||
HxRegistryWalkerClass registryWalker; |
||||
IHxRegNamespaceList help2Namespaces; |
||||
try |
||||
{ |
||||
registryWalker = new HxRegistryWalkerClass(); |
||||
help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
help2Namespaces = null; |
||||
registryWalker = null; |
||||
} |
||||
|
||||
if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0) |
||||
{ |
||||
return string.Empty; |
||||
} |
||||
foreach (IHxRegNamespace currentNamespace in help2Namespaces) |
||||
{ |
||||
if (string.Compare(currentNamespace.Name, name) == 0) |
||||
{ |
||||
return name; |
||||
} |
||||
} |
||||
return help2Namespaces.ItemAt(1).Name; |
||||
} |
||||
|
||||
public static string GetFirstMatchingNamespaceName(string matchingName) |
||||
{ |
||||
HxRegistryWalkerClass registryWalker; |
||||
IHxRegNamespaceList help2Namespaces; |
||||
try |
||||
{ |
||||
registryWalker = new HxRegistryWalkerClass(); |
||||
help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); |
||||
|
||||
if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0 || string.IsNullOrEmpty(matchingName)) |
||||
{ |
||||
return string.Empty; |
||||
} |
||||
foreach (IHxRegNamespace currentNamespace in help2Namespaces) |
||||
{ |
||||
if (NativeMethods.PathMatchSpec(currentNamespace.Name, matchingName)) |
||||
{ |
||||
return currentNamespace.Name; |
||||
} |
||||
} |
||||
return help2Namespaces.ItemAt(1).Name; |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
return string.Empty; |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
internal class NativeMethods |
||||
{ |
||||
NativeMethods() |
||||
{ |
||||
} |
||||
|
||||
#region PatchMatchSpec
|
||||
[DllImport("shlwapi.dll")] |
||||
[return: MarshalAs(UnmanagedType.Bool)] |
||||
internal static extern bool PathMatchSpec(string pwszFile, string pwszSpec); |
||||
#endregion
|
||||
} |
||||
} |
@ -1,123 +0,0 @@
@@ -1,123 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2.Environment |
||||
{ |
||||
using System; |
||||
using System.Drawing; |
||||
using System.Windows.Forms; |
||||
|
||||
public class IconPictureBox : PictureBox |
||||
{ |
||||
private Icon icon; |
||||
|
||||
public Icon Icon |
||||
{ |
||||
get |
||||
{ |
||||
return this.icon; |
||||
} |
||||
set |
||||
{ |
||||
if (value == null) |
||||
{ |
||||
throw new ArgumentNullException("value"); |
||||
} |
||||
else |
||||
{ |
||||
this.icon = value; |
||||
base.Image = this.icon.ToBitmap(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
protected override void OnPaint(PaintEventArgs e) |
||||
{ |
||||
e.Graphics.DrawIconUnstretched(this.icon, base.ClientRectangle); |
||||
} |
||||
} |
||||
|
||||
public class HtmlHelp2Dialog : Form |
||||
{ |
||||
private IconPictureBox pictureBox1; |
||||
private System.Windows.Forms.Label actionLabel; |
||||
|
||||
public string ActionLabel |
||||
{ |
||||
get { return actionLabel.Text; } |
||||
set { actionLabel.Text = value; } |
||||
} |
||||
|
||||
public Icon ActionIcon |
||||
{ |
||||
get { return pictureBox1.Icon; } |
||||
set |
||||
{ |
||||
if (value == null) |
||||
{ |
||||
throw new ArgumentNullException("value"); |
||||
} |
||||
else |
||||
{ |
||||
pictureBox1.Icon = value; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public HtmlHelp2Dialog() |
||||
{ |
||||
this.InitializeComponent(); |
||||
pictureBox1.Icon = SystemIcons.Question; |
||||
} |
||||
|
||||
#region Windows Forms Designer generated code
|
||||
/// <summary>
|
||||
/// This method is required for Windows Forms designer support.
|
||||
/// Do not change the method contents inside the source code editor. The Forms designer might
|
||||
/// not be able to load this method if it was changed manually.
|
||||
/// </summary>
|
||||
private void InitializeComponent() |
||||
{ |
||||
this.actionLabel = new System.Windows.Forms.Label(); |
||||
this.pictureBox1 = new IconPictureBox(); |
||||
|
||||
this.SuspendLayout(); |
||||
//
|
||||
// actionLabel
|
||||
//
|
||||
this.actionLabel.Location = new System.Drawing.Point(66, 16); |
||||
this.actionLabel.Name = "actionLabel"; |
||||
this.actionLabel.Size = new System.Drawing.Size(190, 64); |
||||
this.actionLabel.TabIndex = 1; |
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Location = new System.Drawing.Point(16, 16); |
||||
this.pictureBox1.Name = "pictureBox1"; |
||||
this.pictureBox1.Size = new System.Drawing.Size(32, 32); |
||||
this.pictureBox1.TabIndex = 0; |
||||
this.pictureBox1.TabStop = false; |
||||
//
|
||||
// HtmlHelp2Dialog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
||||
this.ClientSize = new System.Drawing.Size(268, 96); |
||||
this.Controls.Add(this.actionLabel); |
||||
this.Controls.Add(this.pictureBox1); |
||||
this.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
||||
this.MaximizeBox = false; |
||||
this.MinimizeBox = false; |
||||
this.ControlBox = false; |
||||
this.Name = "HtmlHelp2Dialog"; |
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
||||
// this.Text = "HtmlHelp2Dialog";
|
||||
this.ResumeLayout(false); |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
@ -1,98 +0,0 @@
@@ -1,98 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2.Environment |
||||
{ |
||||
using ICSharpCode.SharpDevelop.Gui.OptionPanels; |
||||
using System; |
||||
using System.Windows.Forms; |
||||
using System.Xml.Serialization; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
public class HtmlHelp2OptionsPanel : XmlFormsOptionPanel |
||||
{ |
||||
ComboBox help2Collections; |
||||
CheckBox tocPictures; |
||||
string selectedHelp2Collection = string.Empty; |
||||
|
||||
public override void LoadPanelContents() |
||||
{ |
||||
SetupFromXmlStream |
||||
(this.GetType().Assembly.GetManifestResourceStream("HtmlHelp2.Resources.HtmlHelp2Options.xfrm")); |
||||
this.InitializeComponents(); |
||||
} |
||||
|
||||
public override bool StorePanelContents() |
||||
{ |
||||
this.SaveHelp2Config(); |
||||
HtmlHelp2Environment.ReloadNamespace(); |
||||
return true; |
||||
} |
||||
|
||||
private void InitializeComponents() |
||||
{ |
||||
selectedHelp2Collection = HtmlHelp2Environment.DefaultNamespaceName; |
||||
|
||||
help2Collections = (ComboBox)ControlDictionary["help2Collections"]; |
||||
help2Collections.SelectedIndexChanged += new EventHandler(this.NamespaceNameChanged); |
||||
|
||||
tocPictures = (CheckBox)ControlDictionary["tocPictures"]; |
||||
tocPictures.Checked = HtmlHelp2Environment.Config.TocPictures; |
||||
|
||||
if (!Help2RegistryWalker.BuildNamespacesList(help2Collections, selectedHelp2Collection)) |
||||
{ |
||||
help2Collections.Enabled = false; |
||||
tocPictures.Enabled = false; |
||||
} |
||||
} |
||||
|
||||
private void NamespaceNameChanged(object sender, EventArgs e) |
||||
{ |
||||
if (help2Collections.SelectedItem != null) |
||||
{ |
||||
selectedHelp2Collection = |
||||
Help2RegistryWalker.GetNamespaceName(help2Collections.SelectedItem.ToString()); |
||||
} |
||||
} |
||||
|
||||
private void SaveHelp2Config() |
||||
{ |
||||
HtmlHelp2Environment.Config.SelectedCollection = selectedHelp2Collection; |
||||
HtmlHelp2Environment.Config.TocPictures = tocPictures.Checked; |
||||
HtmlHelp2Environment.SaveConfiguration(); |
||||
} |
||||
} |
||||
|
||||
[XmlRoot("help2environment")] |
||||
public class HtmlHelp2Options |
||||
{ |
||||
private string selectedCollection = string.Empty; |
||||
private bool tocPictures; |
||||
private bool dynamicHelpDebugInfo; |
||||
|
||||
[XmlElement("collection")] |
||||
public string SelectedCollection |
||||
{ |
||||
get { return selectedCollection; } |
||||
set { selectedCollection = value; } |
||||
} |
||||
|
||||
[XmlElement("tocpictures")] |
||||
public bool TocPictures |
||||
{ |
||||
get { return tocPictures; } |
||||
set { tocPictures = value; } |
||||
} |
||||
|
||||
[XmlElement("dhdebuginfos")] |
||||
public bool DynamicHelpDebugInfos |
||||
{ |
||||
get { return this.dynamicHelpDebugInfo; } |
||||
set { this.dynamicHelpDebugInfo = value; } |
||||
} |
||||
} |
||||
} |
@ -1,407 +0,0 @@
@@ -1,407 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2.Environment |
||||
{ |
||||
using System; |
||||
using System.Globalization; |
||||
using System.IO; |
||||
using System.Windows.Forms; |
||||
using System.Xml.Serialization; |
||||
|
||||
using ICSharpCode.Core; |
||||
using MSHelpServices; |
||||
|
||||
public sealed class HtmlHelp2Environment |
||||
{ |
||||
static Guid TocGuid = new Guid("314111B2-A502-11D2-BBCA-00C04F8EC294"); |
||||
static Guid IndexGuid = new Guid("314111CC-A502-11D2-BBCA-00C04F8EC294"); |
||||
static Guid QueryGuid = new Guid("31411193-A502-11D2-BBCA-00C04F8EC294"); |
||||
static HxSession session; |
||||
static IHxRegFilterList namespaceFilters; |
||||
static IHxQuery fulltextSearch; |
||||
static IHxIndex dynamicHelp; |
||||
static string defaultNamespaceName; |
||||
static string currentSelectedFilterQuery; |
||||
static string currentSelectedFilterName; |
||||
static string defaultPage = "about:blank"; |
||||
static string searchPage = "http://msdn.microsoft.com"; |
||||
static bool dynamicHelpIsBusy; |
||||
static HtmlHelp2Options config = new HtmlHelp2Options(); |
||||
|
||||
HtmlHelp2Environment() |
||||
{ |
||||
} |
||||
|
||||
static HtmlHelp2Environment() |
||||
{ |
||||
InitializeNamespace(); |
||||
} |
||||
|
||||
#region Properties
|
||||
public static bool SessionIsInitialized |
||||
{ |
||||
get { return session != null; } |
||||
} |
||||
|
||||
public static string DefaultNamespaceName |
||||
{ |
||||
get { return defaultNamespaceName; } |
||||
} |
||||
|
||||
public static string CurrentFilterQuery |
||||
{ |
||||
get { return currentSelectedFilterQuery; } |
||||
} |
||||
|
||||
public static string CurrentFilterName |
||||
{ |
||||
get { return currentSelectedFilterName; } |
||||
} |
||||
|
||||
public static string DefaultPage |
||||
{ |
||||
get { return defaultPage; } |
||||
} |
||||
|
||||
public static string SearchPage |
||||
{ |
||||
get { return searchPage; } |
||||
} |
||||
|
||||
public static IHxQuery Fts |
||||
{ |
||||
get { return fulltextSearch; } |
||||
} |
||||
|
||||
public static bool DynamicHelpIsBusy |
||||
{ |
||||
get { return dynamicHelpIsBusy; } |
||||
} |
||||
|
||||
public static HtmlHelp2Options Config |
||||
{ |
||||
get { return config; } |
||||
} |
||||
#endregion
|
||||
|
||||
#region Namespace Functions
|
||||
private static void LoadHelp2Config() |
||||
{ |
||||
if (string.IsNullOrEmpty(defaultNamespaceName)) |
||||
{ |
||||
defaultNamespaceName = |
||||
Help2RegistryWalker.GetFirstMatchingNamespaceName("MS.NETFramework.v20*"); |
||||
} |
||||
else |
||||
{ |
||||
defaultNamespaceName = Help2RegistryWalker.GetFirstNamespace(defaultNamespaceName); |
||||
} |
||||
|
||||
LoadConfiguration(); |
||||
|
||||
if (!string.IsNullOrEmpty(config.SelectedCollection)) |
||||
{ |
||||
defaultNamespaceName = |
||||
Help2RegistryWalker.GetFirstNamespace(config.SelectedCollection); |
||||
} |
||||
} |
||||
|
||||
public static void ReloadNamespace() |
||||
{ |
||||
InitializeNamespace(); |
||||
OnNamespaceReloaded(EventArgs.Empty); |
||||
} |
||||
|
||||
private static void InitializeNamespace() |
||||
{ |
||||
LoadHelp2Config(); |
||||
|
||||
if (string.IsNullOrEmpty(defaultNamespaceName)) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
session = null; |
||||
|
||||
HtmlHelp2Dialog initDialog = new HtmlHelp2Dialog(); |
||||
try |
||||
{ |
||||
initDialog.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpUpdateCaption}"); |
||||
initDialog.ActionLabel = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpUpdateInProgress}"); |
||||
initDialog.Show(); |
||||
Application.DoEvents(); |
||||
|
||||
currentSelectedFilterQuery = string.Empty; |
||||
currentSelectedFilterName = string.Empty; |
||||
|
||||
session = new HxSession(); |
||||
session.Initialize(String.Format(CultureInfo.InvariantCulture, "ms-help://{0}", defaultNamespaceName), 0); |
||||
namespaceFilters = session.GetFilterList(); |
||||
|
||||
ReloadDefaultPages(); |
||||
ReloadFTSSystem(); |
||||
ReloadDynamicHelpSystem(); |
||||
|
||||
LoggingService.Info("Help 2.0: Service sucessfully loaded"); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException cEx) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Cannot not initialize service; " + cEx.ToString()); |
||||
session = null; |
||||
} |
||||
finally |
||||
{ |
||||
initDialog.Dispose(); |
||||
} |
||||
} |
||||
|
||||
private static void ReloadFTSSystem() |
||||
{ |
||||
try |
||||
{ |
||||
fulltextSearch = (IHxQuery)session.GetNavigationInterface |
||||
("!DefaultFullTextSearch", currentSelectedFilterQuery, ref QueryGuid); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
fulltextSearch = null; |
||||
} |
||||
} |
||||
|
||||
private static void ReloadDynamicHelpSystem() |
||||
{ |
||||
try |
||||
{ |
||||
dynamicHelp = (IHxIndex)session.GetNavigationInterface |
||||
("!DefaultContextWindowIndex", currentSelectedFilterQuery, ref IndexGuid); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
dynamicHelp = null; |
||||
} |
||||
} |
||||
|
||||
private static void ReloadDefaultPages() |
||||
{ |
||||
defaultPage = GetDefaultPage("HomePage", "DefaultPage"); |
||||
searchPage = GetDefaultPage("SearchHelpPage", "SearchWebPage", "http://msdn.microsoft.com"); |
||||
} |
||||
|
||||
private static string GetDefaultPage(string pageName, string alternatePageName) |
||||
{ |
||||
return GetDefaultPage(pageName, alternatePageName, "about:blank"); |
||||
} |
||||
|
||||
private static string GetDefaultPage(string pageName, string alternatePageName, string defaultValue) |
||||
{ |
||||
if (string.IsNullOrEmpty(pageName) && string.IsNullOrEmpty(alternatePageName)) |
||||
{ |
||||
throw new ArgumentNullException("pageName & alternatePageName"); |
||||
} |
||||
try |
||||
{ |
||||
string result = string.Empty; |
||||
|
||||
IHxIndex namedUrlIndex = |
||||
(IHxIndex)session.GetNavigationInterface("!DefaultNamedUrlIndex", "", ref IndexGuid); |
||||
IHxTopicList topics = namedUrlIndex.GetTopicsFromString(pageName, 0); |
||||
|
||||
if (topics.Count == 0 && !string.IsNullOrEmpty(alternatePageName)) |
||||
{ |
||||
topics = namedUrlIndex.GetTopicsFromString(alternatePageName, 0); |
||||
} |
||||
|
||||
if (topics.Count > 0) result = topics.ItemAt(1).URL; |
||||
if (string.IsNullOrEmpty(result)) result = defaultValue; |
||||
|
||||
return result; |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
return defaultValue; |
||||
} |
||||
} |
||||
|
||||
public static IHxHierarchy GetTocHierarchy(string filterQuery) |
||||
{ |
||||
IHxHierarchy defaultToc = |
||||
(IHxHierarchy)session.GetNavigationInterface("!DefaultTOC", filterQuery, ref TocGuid); |
||||
return defaultToc; |
||||
} |
||||
|
||||
public static IHxIndex GetIndex(string filterQuery) |
||||
{ |
||||
IHxIndex defaultIndex = |
||||
(IHxIndex)session.GetNavigationInterface("!DefaultKeywordIndex", filterQuery, ref IndexGuid); |
||||
return defaultIndex; |
||||
} |
||||
|
||||
public static void BuildFilterList(ComboBox filterCombobox) |
||||
{ |
||||
if (filterCombobox == null) |
||||
{ |
||||
throw new ArgumentNullException("filterCombobox"); |
||||
} |
||||
|
||||
filterCombobox.Items.Clear(); |
||||
filterCombobox.BeginUpdate(); |
||||
|
||||
if (namespaceFilters == null || namespaceFilters.Count == 0) |
||||
{ |
||||
filterCombobox.Items.Add |
||||
(StringParser.Parse("${res:AddIns.HtmlHelp2.DefaultEmptyFilter}")); |
||||
filterCombobox.SelectedIndex = 0; |
||||
} |
||||
else |
||||
{ |
||||
foreach (IHxRegFilter filter in namespaceFilters) |
||||
{ |
||||
string filterName = |
||||
(string)filter.GetProperty(HxRegFilterPropId.HxRegFilterName); |
||||
filterCombobox.Items.Add(filterName); |
||||
|
||||
if (string.IsNullOrEmpty(currentSelectedFilterName)) |
||||
{ |
||||
currentSelectedFilterName = filterName; |
||||
} |
||||
} |
||||
|
||||
if (string.IsNullOrEmpty(currentSelectedFilterName)) |
||||
filterCombobox.SelectedIndex = 0; |
||||
else |
||||
filterCombobox.SelectedIndex = filterCombobox.Items.IndexOf(currentSelectedFilterName); |
||||
} |
||||
filterCombobox.EndUpdate(); |
||||
} |
||||
|
||||
public static string FindFilterQuery(string filterName) |
||||
{ |
||||
if (string.Compare(filterName, currentSelectedFilterName) == 0) |
||||
{ |
||||
return currentSelectedFilterQuery; |
||||
} |
||||
if (namespaceFilters == null || namespaceFilters.Count == 0) |
||||
{ |
||||
return string.Empty; |
||||
} |
||||
|
||||
IHxRegFilter filter = namespaceFilters.FindFilter(filterName); |
||||
if (filter == null) |
||||
{ |
||||
return string.Empty; |
||||
} |
||||
|
||||
currentSelectedFilterName = filterName; |
||||
currentSelectedFilterQuery = |
||||
(string)filter.GetProperty(HxRegFilterPropId.HxRegFilterQuery); |
||||
|
||||
OnFilterQueryChanged(EventArgs.Empty); |
||||
|
||||
try |
||||
{ |
||||
ReloadFTSSystem(); |
||||
ReloadDynamicHelpSystem(); |
||||
ReloadDefaultPages(); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException cEx) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Cannot not initialize service; " + cEx.ToString()); |
||||
} |
||||
return currentSelectedFilterQuery; |
||||
} |
||||
|
||||
public static IHxTopicList GetMatchingTopicsForDynamicHelp(string searchTerm) |
||||
{ |
||||
if (dynamicHelpIsBusy || dynamicHelp == null || string.IsNullOrEmpty(searchTerm)) |
||||
{ |
||||
return null; |
||||
} |
||||
IHxTopicList topics; |
||||
try |
||||
{ |
||||
dynamicHelpIsBusy = true; |
||||
topics = dynamicHelp.GetTopicsFromString(searchTerm, 0); |
||||
LoggingService.Info("Help 2.0: Dynamic Help called"); |
||||
} |
||||
catch (System.Runtime.InteropServices.COMException) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Dynamic Help search failed"); |
||||
topics = null; |
||||
} |
||||
finally |
||||
{ |
||||
dynamicHelpIsBusy = false; |
||||
} |
||||
return topics; |
||||
} |
||||
#endregion
|
||||
|
||||
#region Event Handling
|
||||
public static event EventHandler FilterQueryChanged; |
||||
public static event EventHandler NamespaceReloaded; |
||||
|
||||
private static void OnFilterQueryChanged(EventArgs e) |
||||
{ |
||||
if(FilterQueryChanged != null) |
||||
{ |
||||
FilterQueryChanged(null, e); |
||||
} |
||||
} |
||||
|
||||
private static void OnNamespaceReloaded(EventArgs e) |
||||
{ |
||||
if(NamespaceReloaded != null) |
||||
{ |
||||
NamespaceReloaded(null, e); |
||||
} |
||||
} |
||||
#endregion
|
||||
|
||||
#region Configuration
|
||||
public static void LoadConfiguration() |
||||
{ |
||||
string configFile = Path.Combine(PropertyService.ConfigDirectory, "help2environment.xml"); |
||||
if (!File.Exists(configFile)) |
||||
{ |
||||
return; |
||||
} |
||||
try |
||||
{ |
||||
XmlSerializer serialize = new XmlSerializer(typeof(HtmlHelp2Options)); |
||||
TextReader file = new StreamReader(configFile); |
||||
config = (HtmlHelp2Options)serialize.Deserialize(file); |
||||
file.Close(); |
||||
|
||||
LoggingService.Info("Help 2.0: Configuration successfully loaded"); |
||||
} |
||||
catch (InvalidOperationException) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Error while trying to load configuration"); |
||||
} |
||||
} |
||||
|
||||
public static void SaveConfiguration() |
||||
{ |
||||
string configFile = Path.Combine(PropertyService.ConfigDirectory, "help2environment.xml"); |
||||
try |
||||
{ |
||||
XmlSerializer serialize = new XmlSerializer(typeof(HtmlHelp2Options)); |
||||
TextWriter file = new StreamWriter(configFile); |
||||
serialize.Serialize(file, config); |
||||
file.Close(); |
||||
|
||||
LoggingService.Info("Help 2.0: Configuration successfully saved"); |
||||
} |
||||
catch (InvalidOperationException) |
||||
{ |
||||
LoggingService.Error("Help 2.0: Error while trying to save configuration"); |
||||
} |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
@ -1,38 +0,0 @@
@@ -1,38 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2.Environment |
||||
{ |
||||
using System; |
||||
using System.Drawing; |
||||
using System.Reflection; |
||||
using System.Resources; |
||||
|
||||
public sealed class ResourcesHelper |
||||
{ |
||||
static ResourcesHelper instance = new ResourcesHelper(); |
||||
|
||||
public static Bitmap GetBitmap(string resourceName) |
||||
{ |
||||
Assembly assembly = typeof(ResourcesHelper).Assembly; |
||||
string fullName = string.Format(null, "HtmlHelp2.Resources.{0}", resourceName); |
||||
return new Bitmap(assembly.GetManifestResourceStream(fullName)); |
||||
} |
||||
|
||||
public static Image GetImage(string imageName) |
||||
{ |
||||
return instance.ImageResourceHelper.GetObject(imageName) as Image; |
||||
} |
||||
|
||||
ResourceManager ImageResourceHelper; |
||||
|
||||
ResourcesHelper() |
||||
{ |
||||
ImageResourceHelper = new ResourceManager("HtmlHelp2.Resources", GetType().Assembly); |
||||
} |
||||
} |
||||
} |
@ -1,131 +0,0 @@
@@ -1,131 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Mathias Simmack"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace HtmlHelp2.Environment |
||||
{ |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
using MSHelpServices; |
||||
|
||||
public sealed class SharpDevLanguage |
||||
{ |
||||
static Dictionary<string, string> languages = InitializeLanguages(); |
||||
|
||||
static Dictionary<string, string> InitializeLanguages() |
||||
{ |
||||
Dictionary<string, string> result = new Dictionary<string, string>(); |
||||
result.Add("C#", "CSharp"); |
||||
result.Add("VBNet", "VB"); |
||||
|
||||
return result; |
||||
} |
||||
|
||||
SharpDevLanguage() |
||||
{ |
||||
} |
||||
|
||||
private static int DevLangCounter(IHxTopic topic) |
||||
{ |
||||
if (topic == null) |
||||
{ |
||||
return 0; |
||||
} |
||||
|
||||
int counter = 0; |
||||
IHxAttributeList topicAttributes = topic.Attributes; |
||||
if (topicAttributes == null || topicAttributes.Count == 0) |
||||
{ |
||||
return 0; |
||||
} |
||||
|
||||
foreach (IHxAttribute attr in topicAttributes) |
||||
{ |
||||
if (String.Compare(attr.DisplayName, "DevLang") == 0) |
||||
{ |
||||
counter++; |
||||
} |
||||
} |
||||
return counter; |
||||
} |
||||
|
||||
public static bool CheckTopicLanguage(IHxTopic topic) |
||||
{ |
||||
if (ProjectService.CurrentProject != null) |
||||
{ |
||||
return CheckTopicLanguage(topic, ProjectService.CurrentProject.Language); |
||||
} |
||||
else |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public static bool CheckTopicLanguage(IHxTopic topic, string expectedLanguage) |
||||
{ |
||||
if (string.IsNullOrEmpty(expectedLanguage)) |
||||
{ |
||||
return true; |
||||
} |
||||
if (topic == null) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
string tempLanguage = String.Empty; |
||||
if (!languages.ContainsKey(expectedLanguage) || |
||||
!languages.TryGetValue(expectedLanguage, out tempLanguage)) |
||||
{ |
||||
tempLanguage = expectedLanguage; |
||||
} |
||||
|
||||
return (string.IsNullOrEmpty(tempLanguage) || topic.HasAttribute("DevLang", tempLanguage)); |
||||
} |
||||
|
||||
public static bool CheckUniqueTopicLanguage(IHxTopic topic) |
||||
{ |
||||
if (ProjectService.CurrentProject != null) |
||||
{ |
||||
return CheckUniqueTopicLanguage(topic, ProjectService.CurrentProject.Language); |
||||
} |
||||
else |
||||
{ |
||||
return CheckUniqueTopicLanguage(topic, string.Empty); |
||||
} |
||||
} |
||||
|
||||
public static bool CheckUniqueTopicLanguage(IHxTopic topic, string expectedLanguage) |
||||
{ |
||||
return (CheckTopicLanguage(topic, expectedLanguage) && DevLangCounter(topic) == 1); |
||||
} |
||||
|
||||
public static string GetPatchedLanguage() |
||||
{ |
||||
if (ProjectService.CurrentProject == null) |
||||
return GetPatchedLanguage(AmbienceService.DefaultAmbienceName); |
||||
else |
||||
return GetPatchedLanguage(ProjectService.CurrentProject.Language); |
||||
} |
||||
|
||||
public static string GetPatchedLanguage(string expectedLanguage) |
||||
{ |
||||
string tempLanguage = expectedLanguage; |
||||
|
||||
if (!string.IsNullOrEmpty(tempLanguage)) |
||||
{ |
||||
if (!languages.ContainsKey(expectedLanguage) || |
||||
!languages.TryGetValue(expectedLanguage, out tempLanguage)) |
||||
{ |
||||
tempLanguage = expectedLanguage; |
||||
} |
||||
} |
||||
|
||||
return tempLanguage; |
||||
} |
||||
} |
||||
} |
@ -1,769 +0,0 @@
@@ -1,769 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50215.44
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
[assembly: System.Reflection.AssemblyVersion("1.0.0.0")] |
||||
[assembly: System.Windows.Forms.AxHost.TypeLibraryTimeStamp("09.04.2005 00:38:34")] |
||||
|
||||
namespace AxMSHelpControls { |
||||
|
||||
|
||||
[System.Windows.Forms.AxHost.ClsidAttribute("{314111b8-a502-11d2-bbca-00c04f8ec294}")] |
||||
[System.ComponentModel.DesignTimeVisibleAttribute(true)] |
||||
public class AxHxTocCtrl : System.Windows.Forms.AxHost { |
||||
|
||||
private MSHelpControls.IHxTreeView ocx; |
||||
|
||||
private AxHxTocCtrlEventMulticaster eventMulticaster; |
||||
|
||||
private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; |
||||
|
||||
public AxHxTocCtrl() : |
||||
base("314111b8-a502-11d2-bbca-00c04f8ec294") { |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(false)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4096)] |
||||
public virtual MSHelpServices.IHxHierarchy Hierarchy { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Hierarchy; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Hierarchy = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4100)] |
||||
public virtual int ImageList { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.ImageList; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.ImageList = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4097)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual bool HideSelection { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.HideSelection; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.HideSelection = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4098)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxTreeLineStyleConstant LineStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.LineStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.LineStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4099)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxTreeStyleConstant TreeStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.TreeStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.TreeStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-501)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Color BackColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.BackColor))); |
||||
} |
||||
else { |
||||
return base.BackColor; |
||||
} |
||||
} |
||||
set { |
||||
base.BackColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-513)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Color ForeColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); |
||||
} |
||||
else { |
||||
return base.ForeColor; |
||||
} |
||||
} |
||||
set { |
||||
base.ForeColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-504)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxBorderStyle BorderStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.BorderStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.BorderStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-520)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxAppearanceConstant Appearance { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Appearance; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Appearance = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-521)] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public virtual MSHelpControls.HxMousePointerConstant MousePointer { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.MousePointer; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.MousePointer = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-512)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Font Font { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetFontFromIFont(this.ocx.Font); |
||||
} |
||||
else { |
||||
return base.Font; |
||||
} |
||||
} |
||||
set { |
||||
base.Font = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4102)] |
||||
public virtual int Selection { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Selection; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4103)] |
||||
public virtual short LangId { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.LangId; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.LangId = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(4104)] |
||||
public virtual MSHelpControls.HxFontSourceConstant FontSource { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.FontSource; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FontSource = value; |
||||
} |
||||
} |
||||
|
||||
public event IHxTreeViewEvents_NodeClickEventHandler NodeClick; |
||||
|
||||
public event IHxTreeViewEvents_NodeRightClickEventHandler NodeRightClick; |
||||
|
||||
public virtual void Refresh() { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.Refresh(); |
||||
} |
||||
|
||||
public virtual void Synchronize(string bstrURL) { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Synchronize", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.Synchronize(bstrURL); |
||||
} |
||||
|
||||
protected override void CreateSink() { |
||||
try { |
||||
this.eventMulticaster = new AxHxTocCtrlEventMulticaster(this); |
||||
this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxTreeViewEvents)); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void DetachSink() { |
||||
try { |
||||
this.cookie.Disconnect(); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void AttachInterfaces() { |
||||
try { |
||||
this.ocx = ((MSHelpControls.IHxTreeView)(this.GetOcx())); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnNodeClick(object sender, IHxTreeViewEvents_NodeClickEvent e) { |
||||
if ((this.NodeClick != null)) { |
||||
this.NodeClick(sender, e); |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnNodeRightClick(object sender, IHxTreeViewEvents_NodeRightClickEvent e) { |
||||
if ((this.NodeRightClick != null)) { |
||||
this.NodeRightClick(sender, e); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxTreeViewEvents_NodeClickEventHandler(object sender, IHxTreeViewEvents_NodeClickEvent e); |
||||
|
||||
public class IHxTreeViewEvents_NodeClickEvent { |
||||
|
||||
public int hNode; |
||||
|
||||
public IHxTreeViewEvents_NodeClickEvent(int hNode) { |
||||
this.hNode = hNode; |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxTreeViewEvents_NodeRightClickEventHandler(object sender, IHxTreeViewEvents_NodeRightClickEvent e); |
||||
|
||||
public class IHxTreeViewEvents_NodeRightClickEvent { |
||||
|
||||
public int hNode; |
||||
|
||||
public int x; |
||||
|
||||
public int y; |
||||
|
||||
public IHxTreeViewEvents_NodeRightClickEvent(int hNode, int x, int y) { |
||||
this.hNode = hNode; |
||||
this.x = x; |
||||
this.y = y; |
||||
} |
||||
} |
||||
|
||||
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] |
||||
public class AxHxTocCtrlEventMulticaster : MSHelpControls.IHxTreeViewEvents { |
||||
|
||||
private AxHxTocCtrl parent; |
||||
|
||||
public AxHxTocCtrlEventMulticaster(AxHxTocCtrl parent) { |
||||
this.parent = parent; |
||||
} |
||||
|
||||
public virtual void NodeClick(int hNode) { |
||||
IHxTreeViewEvents_NodeClickEvent nodeclickEvent = new IHxTreeViewEvents_NodeClickEvent(hNode); |
||||
this.parent.RaiseOnNodeClick(this.parent, nodeclickEvent); |
||||
} |
||||
|
||||
public virtual void NodeRightClick(int hNode, int x, int y) { |
||||
IHxTreeViewEvents_NodeRightClickEvent noderightclickEvent = new IHxTreeViewEvents_NodeRightClickEvent(hNode, x, y); |
||||
this.parent.RaiseOnNodeRightClick(this.parent, noderightclickEvent); |
||||
} |
||||
} |
||||
|
||||
[System.Windows.Forms.AxHost.ClsidAttribute("{314111c6-a502-11d2-bbca-00c04f8ec294}")] |
||||
[System.ComponentModel.DesignTimeVisibleAttribute(true)] |
||||
public class AxHxIndexCtrl : System.Windows.Forms.AxHost { |
||||
|
||||
private MSHelpControls.IHxIndexView ocx; |
||||
|
||||
private AxHxIndexCtrlEventMulticaster eventMulticaster; |
||||
|
||||
private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; |
||||
|
||||
public AxHxIndexCtrl() : |
||||
base("314111c6-a502-11d2-bbca-00c04f8ec294") { |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(false)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16384)] |
||||
public virtual MSHelpServices.IHxIndex IndexData { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.IndexData; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.IndexData = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16385)] |
||||
public virtual int Selection { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Selection; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Selection = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-501)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public override System.Drawing.Color BackColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.BackColor))); |
||||
} |
||||
else { |
||||
return base.BackColor; |
||||
} |
||||
} |
||||
set { |
||||
base.BackColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-513)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public override System.Drawing.Color ForeColor { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); |
||||
} |
||||
else { |
||||
return base.ForeColor; |
||||
} |
||||
} |
||||
set { |
||||
base.ForeColor = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-504)] |
||||
public virtual MSHelpControls.HxBorderStyle BorderStyle { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.BorderStyle; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.BorderStyle = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-520)] |
||||
public virtual MSHelpControls.HxAppearanceConstant Appearance { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.Appearance; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.Appearance = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-521)] |
||||
public virtual MSHelpControls.HxMousePointerConstant MousePointer { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.MousePointer; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.MousePointer = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.Browsable(true)] |
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(-512)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] |
||||
[System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] |
||||
public override System.Drawing.Font Font { |
||||
get { |
||||
if (((this.ocx != null) |
||||
&& (this.PropsValid() == true))) { |
||||
return GetFontFromIFont(this.ocx.Font); |
||||
} |
||||
else { |
||||
return base.Font; |
||||
} |
||||
} |
||||
set { |
||||
base.Font = value; |
||||
if ((this.ocx != null)) { |
||||
this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16388)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color HighlightForeColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.HighlightForeColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.HighlightForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16389)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color HighlightBackColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.HighlightBackColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.HighlightBackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16390)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color FocusHighlightForeColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightForeColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FocusHighlightForeColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16391)] |
||||
[System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] |
||||
public virtual System.Drawing.Color FocusHighlightBackColor { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightBackColor))); |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FocusHighlightBackColor = ((uint)(GetOleColorFromColor(value))); |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16392)] |
||||
public virtual short LangId { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.LangId; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.LangId = value; |
||||
} |
||||
} |
||||
|
||||
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] |
||||
[System.Runtime.InteropServices.DispIdAttribute(16393)] |
||||
public virtual MSHelpControls.HxFontSourceConstant FontSource { |
||||
get { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); |
||||
} |
||||
return this.ocx.FontSource; |
||||
} |
||||
set { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); |
||||
} |
||||
this.ocx.FontSource = value; |
||||
} |
||||
} |
||||
|
||||
public event IHxIndexViewEvents_ItemClickEventHandler ItemClick; |
||||
|
||||
public event IHxIndexViewEvents_ItemSelectEventHandler ItemSelect; |
||||
|
||||
public virtual void SelectItem(int iItem) { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SelectItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.SelectItem(iItem); |
||||
} |
||||
|
||||
public virtual void ClickItem(int iItem) { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ClickItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.ClickItem(iItem); |
||||
} |
||||
|
||||
public virtual void Refresh() { |
||||
if ((this.ocx == null)) { |
||||
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); |
||||
} |
||||
this.ocx.Refresh(); |
||||
} |
||||
|
||||
protected override void CreateSink() { |
||||
try { |
||||
this.eventMulticaster = new AxHxIndexCtrlEventMulticaster(this); |
||||
this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxIndexViewEvents)); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void DetachSink() { |
||||
try { |
||||
this.cookie.Disconnect(); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
protected override void AttachInterfaces() { |
||||
try { |
||||
this.ocx = ((MSHelpControls.IHxIndexView)(this.GetOcx())); |
||||
} |
||||
catch (System.Exception ) { |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnItemClick(object sender, IHxIndexViewEvents_ItemClickEvent e) { |
||||
if ((this.ItemClick != null)) { |
||||
this.ItemClick(sender, e); |
||||
} |
||||
} |
||||
|
||||
internal void RaiseOnItemSelect(object sender, IHxIndexViewEvents_ItemSelectEvent e) { |
||||
if ((this.ItemSelect != null)) { |
||||
this.ItemSelect(sender, e); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxIndexViewEvents_ItemClickEventHandler(object sender, IHxIndexViewEvents_ItemClickEvent e); |
||||
|
||||
public class IHxIndexViewEvents_ItemClickEvent { |
||||
|
||||
public int iItem; |
||||
|
||||
public IHxIndexViewEvents_ItemClickEvent(int iItem) { |
||||
this.iItem = iItem; |
||||
} |
||||
} |
||||
|
||||
public delegate void IHxIndexViewEvents_ItemSelectEventHandler(object sender, IHxIndexViewEvents_ItemSelectEvent e); |
||||
|
||||
public class IHxIndexViewEvents_ItemSelectEvent { |
||||
|
||||
public int iItem; |
||||
|
||||
public IHxIndexViewEvents_ItemSelectEvent(int iItem) { |
||||
this.iItem = iItem; |
||||
} |
||||
} |
||||
|
||||
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] |
||||
public class AxHxIndexCtrlEventMulticaster : MSHelpControls.IHxIndexViewEvents { |
||||
|
||||
private AxHxIndexCtrl parent; |
||||
|
||||
public AxHxIndexCtrlEventMulticaster(AxHxIndexCtrl parent) { |
||||
this.parent = parent; |
||||
} |
||||
|
||||
public virtual void ItemClick(int iItem) { |
||||
IHxIndexViewEvents_ItemClickEvent itemclickEvent = new IHxIndexViewEvents_ItemClickEvent(iItem); |
||||
this.parent.RaiseOnItemClick(this.parent, itemclickEvent); |
||||
} |
||||
|
||||
public virtual void ItemSelect(int iItem) { |
||||
IHxIndexViewEvents_ItemSelectEvent itemselectEvent = new IHxIndexViewEvents_ItemSelectEvent(iItem); |
||||
this.parent.RaiseOnItemSelect(this.parent, itemselectEvent); |
||||
} |
||||
} |
||||
} |
@ -1,15 +0,0 @@
@@ -1,15 +0,0 @@
|
||||
@echo off |
||||
|
||||
del *.dll |
||||
del *.cs |
||||
|
||||
|
||||
setlocal |
||||
set AxImp="C:\Programme\Microsoft Visual Studio 8\SDK\v2.0\Bin\AxImp.exe" |
||||
%AxImp% -source "%CommonProgramFiles%\Microsoft Shared\help\hxvz.dll" |
||||
set AxImp= |
||||
|
||||
del *.pdb |
||||
del Ax*.dll |
||||
|
||||
pause |
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
The "MSHelpControls.dll", "MSHelpServices.dll" and the "stdole.dll" are generated .NET wrappers. There is a fourth file, you can find in the "source\HtmlHelp2\Help2Service" folder, called "AxMSHelpControls.cs". |
||||
|
||||
If you want to re-generate the wrapper files, just call the "import.bat" file. But first make sure that all paths are valid. These are the two important lines |
||||
|
||||
set AxImp="K:\Programme\Microsoft.NET\SDK\v2.0\Bin\AxImp.exe" |
||||
%AxImp% -source "%CommonProgramFiles%\Microsoft Shared\help\hxvz.dll" |
||||
|
||||
|
||||
The AxImp tool will create an "AxMSHelpControls.cs" file and an "AxMSHelpControls.dll" file. My addin was build with the CSharp source file. Please copy the re-created version into the "source\HtmlHelp2\Help2Service" folder, overwriting the existing file. |
||||
|
||||
|
||||
NOTE: It's not necessary to rename the wrapper libraries with some kind of an "Interop." prefix or something like that. There are no native Windows libraries with the same names. |
||||
|
||||
|
||||
Mathias Simmack |
||||
(2005-06-24) |