Start to work on WinHelp-specific part of BPlusFileSystem
This commit is contained in:
parent
c0adfe6922
commit
3a9f30812a
@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using UniversalEditor.DataFormats.FileSystem.BPlus;
|
||||
using UniversalEditor.ObjectModels.FileSystem;
|
||||
|
||||
using UniversalEditor.ObjectModels.Help.Compiled;
|
||||
|
||||
namespace UniversalEditor.DataFormats.Help.Compiled.WinHelp
|
||||
{
|
||||
/// <summary>
|
||||
/// The Windows Help (WinHelp) HLP data format. Much of the framework for reading these files is contained in BPlusFileSystemDataFormat, since the container file format
|
||||
/// itself is remarkably generic (albeit unused, as far as I can tell, apart from WinHelp files), but WinHelp-specific stuff is here.
|
||||
/// </summary>
|
||||
public class HLPDataFormat : BPlusFileSystemDataFormat
|
||||
{
|
||||
protected override void BeforeLoadInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.BeforeLoadInternal(objectModels);
|
||||
objectModels.Push(new FileSystemObjectModel());
|
||||
}
|
||||
protected override void AfterLoadInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.AfterLoadInternal(objectModels);
|
||||
|
||||
FileSystemObjectModel fsom = (objectModels.Pop() as FileSystemObjectModel);
|
||||
CompiledHelpObjectModel help = (objectModels.Pop() as CompiledHelpObjectModel);
|
||||
}
|
||||
protected override void BeforeSaveInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.BeforeSaveInternal(objectModels);
|
||||
|
||||
CompiledHelpObjectModel help = (objectModels.Pop() as CompiledHelpObjectModel);
|
||||
FileSystemObjectModel fsom = new FileSystemObjectModel();
|
||||
|
||||
objectModels.Push(fsom);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor.ObjectModels.Help.Compiled
|
||||
{
|
||||
public class CompiledHelpObjectModel : ObjectModel
|
||||
{
|
||||
public override void Clear()
|
||||
{
|
||||
}
|
||||
|
||||
public override void CopyTo(ObjectModel where)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -60,6 +60,7 @@
|
||||
<Compile Include="DataFormats\FileSystem\Microsoft\WindowsImage\WIMResourceHeaderDiskFlags.cs" />
|
||||
<Compile Include="DataFormats\FileSystem\Microsoft\WindowsImage\WIMResourceHeaderDiskShort.cs" />
|
||||
<Compile Include="DataFormats\FileSystem\Microsoft\WindowsImage\WIMStreamEntry.cs" />
|
||||
<Compile Include="DataFormats\Help\Compiled\WinHelp\HLPDataFormat.cs" />
|
||||
<Compile Include="DataFormats\Help\TableOfContents\V3\H1TDataFormat.cs" />
|
||||
<Compile Include="DataFormats\Shortcut\Microsoft\LNKDataFlags.cs" />
|
||||
<Compile Include="DataFormats\Shortcut\Microsoft\LNKDataFormat.cs" />
|
||||
@ -67,6 +68,7 @@
|
||||
<Compile Include="DataFormats\Shortcut\Microsoft\LNKHotkey.cs" />
|
||||
<Compile Include="DataFormats\Shortcut\Microsoft\LNKLocationFlags.cs" />
|
||||
<Compile Include="DataFormats\Shortcut\Microsoft\LNKWindowState.cs" />
|
||||
<Compile Include="ObjectModels\Help\Compiled\CompiledHelpObjectModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="DataFormats\Text\Formatted\XPS\XPSDataFormat.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user