Moved unused code into Achive

This commit is contained in:
Simon Martens
2022-11-25 19:15:23 +01:00
parent 5cc684550b
commit 02abfb111a
239 changed files with 51948 additions and 1673 deletions

View File

@@ -0,0 +1,454 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

View File

@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,43 @@
using System;
using System.ComponentModel.Design;
using System.Linq;
using System.Xml.Linq;
namespace HaEdits
{
class Program
{
static void Main(string[] args)
{
var doc = XDocument.Load("../../../briefe.xml", LoadOptions.PreserveWhitespace);
var document = doc.Root.Element("document");
string pg = "";
foreach (var elem in document.Descendants())
{
if (elem.Name == "page")
pg = elem.Attribute("index").Value;
if (elem.Name == "structure" && elem.Attribute("ref").Value == "2")
{
if (elem.Descendants().First().Name != "page" )
{
var ne = new XElement("page");
ne.Add(new XAttribute("index", pg.ToString())); ;
ne.Add(new XAttribute("autopsic", pg.ToString()));
elem.AddFirst(ne);
elem.AddFirst("\r\n\t\t\t\t");
}
}
}
foreach (var bd in document.Elements("structure"))
{
var l = bd.Elements();
foreach (var lt in l) { lt.Name = "letterText"; lt.Attribute("ref").Remove(); }
document.Add(l);
}
document.Elements("structure").Remove();
foreach (var e in document.Elements("letterText")) e.AddAfterSelf("\r\n\t\t\t");
doc.Save("briefeedit.xml", SaveOptions.DisableFormatting);
}
}
}

View File

@@ -0,0 +1,4 @@
# 2021-09-15 XML Transformations
Automatische Transformationen für die Brieftext XML-Datei:
- Nach jedem `<structure>` wird ein `<page>`-Tag eingeschoben.
- `<structure>` wird nach `<letterText>` umbenannt.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,454 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

View File

@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net6.0/2022-11-25_XML_Transforms.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

View File

@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/2022-11-25_XML_Transforms.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/2022-11-25_XML_Transforms.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/2022-11-25_XML_Transforms.csproj"
],
"problemMatcher": "$msCompile"
}
]
}

View File

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>_2022_11_25_XML_Transforms</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,186 @@
using System.Xml;
using System.Xml.Linq;
// See https://aka.ms/new-console-template for more information
static (XDocument, XDocument) LoadDocuments(string tradfile, string reffile)
{
var tradoc = XDocument.Load(tradfile, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo);
var refdoc = XDocument.Load(reffile, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo);
return (tradoc, refdoc);
}
static void TestOpenTags(XDocument traditions)
{
Console.WriteLine("Teste, ob es Tags gibt, die vor einem neuem <app>-Tag noch geöffnet sind.");
var apps = traditions.Descendants("app");
bool any = false;
foreach (var app in apps)
{
var anc = app.Ancestors();
if (anc.Count() > 4)
{
Console.WriteLine("Gefunden: <app> Zeile " + ((IXmlLineInfo)app).LineNumber);
foreach (var a in anc)
{
Console.WriteLine(a.Name);
}
any = true;
}
}
if (any) throw new Exception("Manche Tags sind noch offen zwischen den apps!");
}
static HashSet<string> GetNormalizeNames(XDocument traditions)
{
var appnames = new HashSet<string>();
var apps = traditions.Descendants("app");
foreach (var app in apps)
{
if (app.Value.EndsWith(":"))
{
app.SetValue(app.Value.Replace(":", ""));
}
if (!appnames.Contains(app.Value)) ;
appnames.Add(app.Value);
}
foreach (var name in appnames)
Console.WriteLine("App-Name gefunden: " + name);
return appnames;
}
static Dictionary<string, string> GetAppNumbers(XDocument references, HashSet<string> names)
{
var ret = references.Descendants("appDef").ToDictionary(x => x.Attribute("name").Value, x => x.Attribute("index").Value);
foreach (var r in ret)
{
if (names.Contains(r.Key)) names.Remove(r.Key);
Console.WriteLine("AppDef gefunden für " + r.Key);
}
if (names.Any())
{
foreach (var n in names)
Console.WriteLine("Keine AppDef für " + n + " gefunden.");
throw new Exception("AppDefs nicht vollständig. Bitte ergänzen.");
}
return ret;
}
static List<(XElement, List<XNode>)> GetAppContents(XDocument traditions)
{
var ret = new List<(XElement, List<XNode>)>();
var apps = traditions.Descendants("app");
foreach (var app in apps)
{
var sibs = app.NodesAfterSelf();
var content = new List<XNode>();
foreach (var s in sibs)
{
if (s.NodeType == XmlNodeType.Element && ((XElement)s).Name == "app") break;
content.Add(s);
}
ret.Add((app, content));
}
return ret;
}
static void ReplaceStructure(List<(XElement appNode, List<XNode> childNodes)> nodes, Dictionary<string, string> appNumbers)
{
foreach (var n in nodes)
{
var name = n.appNode.Value;
var number = appNumbers[name];
n.appNode.SetValue(string.Empty);
n.appNode.SetAttributeValue("ref", number);
n.appNode.Add(n.childNodes);
foreach (var node in n.childNodes)
node.Remove();
var children = n.appNode.Nodes();
foreach (var c in children) {
if (c.NodeType == XmlNodeType.Element) {
var e = (XElement)c;
if (e.Name == "line" && e.Attribute("type") != null && e.Attribute("type").Value == "break")
c.Remove();
break;
}
if (!String.IsNullOrWhiteSpace(c.ToString()))
break;
}
children = children.Reverse();
foreach (var c in children) {
if (c.NodeType == XmlNodeType.Element) {
var e = (XElement)c;
if (e.Name == "line" && e.Attribute("type") != null && e.Attribute("type").Value == "break")
c.Remove();
break;
}
if (!String.IsNullOrWhiteSpace(c.ToString()))
break;
}
var siblings = n.appNode.NodesAfterSelf();
foreach (var c in siblings) {
if (c.NodeType == XmlNodeType.Element) {
var e = (XElement)c;
if (e.Name == "line" && e.Attribute("type") != null && e.Attribute("type").Value == "break")
c.Remove();
break;
}
if (!String.IsNullOrWhiteSpace(c.ToString()))
break;
}
siblings = n.appNode.NodesBeforeSelf();
foreach (var c in siblings) {
if (c.NodeType == XmlNodeType.Element) {
var e = (XElement)c;
if (e.Name == "line" && e.Attribute("type") != null && e.Attribute("type").Value == "break")
c.Remove();
break;
}
if (!String.IsNullOrWhiteSpace(c.ToString()))
break;
}
}
}
static void Cleanup(XDocument traditions) {
var tradition = traditions.Descendants("letterTradition").SelectMany(x => x.Descendants());
var notapp = tradition.Where(x => x.Name != "app" && !x.Ancestors("app").Any());
foreach (var e in notapp) {
if (e.Name != "line" || (e.Attribute("type") != null && e.Attribute("type")!.Value != "break"))
Console.WriteLine("Nicht app zugehöriges Element " + e.Name + " Zeile " + ((IXmlLineInfo)e).LineNumber);
}
// notapp.Remove();
var apps = traditions.Descendants("app");
foreach (var a in apps) {
if (a.Value.Last() != '\n')
a.Add("\n");
a.AddAfterSelf("\n");
}
var lt = traditions.Descendants("letterTradition");
foreach (var l in lt)
l.AddAfterSelf("\n\n");
}
static void Save((XDocument tradoc, XDocument refdoc) docs)
{
docs.tradoc.Save("./traditionsnew.xml", SaveOptions.DisableFormatting);
}
var documents = LoadDocuments("./traditions.xml", "./references.xml");
TestOpenTags(documents.Item1);
var names = GetNormalizeNames(documents.Item1);
var appnumbers = GetAppNumbers(documents.Item2, names);
var contents = GetAppContents(documents.Item1);
ReplaceStructure(contents, appnumbers);
Cleanup(documents.Item1);
Save(documents);

View File

@@ -0,0 +1 @@
# 2022-11-25 XML Transformations

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,256 @@
<?xml version="1.0" encoding="utf-8"?>
<opus>
<data>
<definitions>
<structureDefs>
<structureDef index="1" level="1" type="volume" friendlyName="Band {1}" />
<structureDef index="2" level="2" type="letter" friendlyName="Brief {2}" />
<structureDef index="3" level="3" type="letterSection" friendlyName="Abschnitt {3}" />
</structureDefs>
<personDefs>
<personDef index="-1" name="Unbekannt" />
<personDef index="1" name="Johann Georg Hamann" vorname="Johann Georg" nachname="Hamann" />
<personDef index="2" name="Gottlob Jacob Sahme" vorname="Gottlob Jacob" nachname="Sahme" />
<personDef index="3" name="Philipp Belger" vorname="Philipp" nachname="Belger" />
<personDef index="4" name="Ein Studienfreund" nachname="Studienfreund"/>
<personDef index="5" name="Johann Christoph Hamann (Vater)" vorname="Johann Christoph" nachname="Hamann" />
<personDef index="6" name="Maria Magdalena Hamann (Mutter)" vorname="Maria Magdalena" nachname="Hamann" />
<personDef index="7" name="Johann Gottlieb Kreutzfeld" vorname="Johann Gottlieb" nachname="Kreutzfeld" />
<personDef index="8" name="Johann Gotthelf Lindner" vorname="Johann Gotthelf" nachname="Lindner" />
<personDef index="9" name="Daniel Pegelow" vorname="Daniel" nachname="Pegelow" />
<personDef index="10" name="Johann Christoph Hamann (Bruder)" vorname="Johann Christoph" nachname="Hamann" />
<personDef index="11" name="Barbara Helena von Budberg, geb. von Zimmermann" vorname="Barbara Helena von" nachname="Budberg" />
<personDef index="12" name="Marianne Lindner, geb. Courtan" vorname="Marianne" nachname="Lindner" />
<personDef index="13" name="Arnold Corman" vorname="Arnold" nachname="Corman" />
<personDef index="14" name="George Bassa" vorname="George" nachname="Bassa" />
<personDef index="15" name="Johann Ehregott Friedrich Lindner" vorname="Johann Ehregott Friedrich" nachname="Lindner" />
<personDef index="16" name="Johann Christoph Berens" vorname="Johann Christoph" nachname="Berens" />
<personDef index="17" name="Arend Berens" vorname="Arend" nachname="Berens" />
<personDef index="18" name="Johann Christoph Ruprecht" vorname="Johann Christoph" nachname="Ruprecht" />
<personDef index="19" name="Senel" vorname="[unbek. Vorname]" nachname="Senel"/>
<personDef index="20" name="" />
<personDef index="21" name="Gottlob Immanuel Lindner" vorname="Gottlob Immanuel" nachname="Lindner" />
<personDef index="22" name="Peter Christoph Baron von Witten" vorname="Peter Christoph Baron von" nachname="Witten"/>
<personDef index="23" name="Joseph Johann Baron von Witten" vorname="Joseph Johann Baron von" nachname="Witten" />
<personDef index="24" name="" />
<personDef index="25" name="" />
<personDef index="26" name="" />
<personDef index="27" name="" />
<personDef index="28" name="" />
<personDef index="29" name="" />
<personDef index="30" name="" />
<personDef index="31" name="Immanuel Kant" vorname="Immanuel" nachname="Kant" />
<personDef index="32" name="" />
<personDef index="33" name="Georg David Kypke" vorname="Georg David" nachname="Kypke" />
<personDef index="34" name="" />
<personDef index="35" name="Christ Anton Tottien" vorname="Christ Anton" nachname="Tottien" />
<personDef index="36" name="Moses Mendelssohn" vorname="Moses" nachname="Mendelssohn" />
<personDef index="37" name="Friedrich Nicolai" vorname="Friedrich" nachname="Nicolai" />
<personDef index="38" name="Sebastian Friedrich Trescho" vorname="Sebastian Friedrich" nachname="Trescho" />
<personDef index="39" name="Friedrich Carl von Moser" vorname="Friedrich Carl von" nachname="Moser" />
<personDef index="40" name="Die Königlich Preußische Kriegs- und Domänen-Kammer zu Königsberg i. Pr." nachname="Kriegs- und Domänenkammer"/>
<personDef index="41" name="Johann Gottfried Herder" vorname="Johann Gottfried" nachname="Herder" />
<personDef index="42" name="Die Königlich Preußische Regierung zu Königsberg in Preußen" nachname="Regierung" />
<personDef index="43" name="" />
<personDef index="44" name="Christian Gottlieb Arndt" vorname="Christian Gottlieb" nachname="Arndt" />
<personDef index="45" name="Johann Christian Buchholtz" vorname="Johann Christian" nachname="Buchholtz" />
<personDef index="46" name="Das Königliche Pupillen-Kollegium" nachname="Pupillen-Kollegium" />
<personDef index="47" name="Friedrich II. (Preußen)" nachname="Friedrich II."/>
<personDef index="48" name="Kriegsrat Hindersin" nachname="Hindersin"/>
<personDef index="49" name="Johann Friedrich Hartknoch" vorname="Johann Friedrich" nachname="Hartknoch" />
<personDef index="50" name="Johann August Eberhard" vorname="Johann August" nachname="Eberhard" />
<personDef index="51" name="Johann Jakob Kanter" vorname="Johann Jakob" nachname="Kanter"/>
<personDef index="52" name="Der Geheime Ausschuß der G. v. V. Frey Mäurer Loge zu Königsberg in Preußen" nachname="Frey Mäurer Loge"/>
<personDef index="53" name="Jacob Friedrich Hinz" vorname="Jacob Friedrich" nachname="Hinz" />
<personDef index="54" name="Carl Theophilus Guichard" vorname="Carl Theophilus" nachname="Guichard" />
<personDef index="55" name="Johann Joachim Christoph Bode" vorname="Johann Joachim Christoph" nachname="Bode" />
<personDef index="56" name="Accise und Zoll-Direktor Stockmar" nachname="Stockmar"/>
<personDef index="57" name="" />
<personDef index="58" name="" />
<personDef index="59" name="Albertine Hartknoch, geb. Toussaint" vorname="Albertine" nachname="Hartknoch" />
<personDef index="60" name="Johann Friedrich Reichardt" vorname="Johann Friedrich" nachname="Reichardt" />
<personDef index="61" name="Matthias Claudius" vorname="Matthias" nachname="Claudius" />
<personDef index="62" name="Johann August Starck" vorname="Johann August" nachname="Starck" />
<personDef index="63" name="Catharina Dorothea Güldenhorn, geb. Herder" vorname="Catharina Dorothea" nachname="Güldenhorn"/>
<personDef index="64" name="Rebecca Claudius" vorname="Rebecca" nachname="Claudius"/>
<personDef index="65" name="" />
<personDef index="66" name="" />
<personDef index="67" name="Sophie Marianne Courtan, geb. Toussaint" vorname="Sophie Marianne" nachname="Courtan"/>
<personDef index="68" name="Die General-Administration" nachname="General-Administration" />
<personDef index="69" name="Witwe Blom" nachname="Blom" />
<personDef index="70" name="" />
<personDef index="71" name="Dr. Laubmeyer" nachname="Laubmeyer"/>
<personDef index="72" name="Christoph Kaufmann" vorname="Christoph" nachname="Kaufmann" />
<personDef index="73" name="Johann Ehrmann" vorname="Johann" nachname="Ehrmann" />
<personDef index="74" name="" />
<personDef index="75" name="Vmtl. Samuel Lippmann Löwen" vorname="Samuel Lippmann" nachname="Löwen" />
<personDef index="76" name="Johann Caspar Lavater" vorname="Johann Caspar" nachname="Lavater" />
<personDef index="77" name="Elise Kaufmann, geb. Ziegler" vorname="Elise" nachname="Kaufmann"/>
<personDef index="78" name="Caroline Charlotte Amalie Reichsgräfin von Keyserling, geb. von Truchseß-Waldburg" vorname="Caroline Charlotte Amalie Reichsgräfin von" nachname="Keyserling"/>
<personDef index="79" name="" />
<personDef index="80" name="" />
<personDef index="81" name="" />
<personDef index="82" name="" />
<personDef index="83" name="Hans Jacob von Auerswald" vorname="Hans Jacob von" nachname="Auerswald"/>
<personDef index="84" name="" />
<personDef index="85" name="Caroline Stoltz" vorname="Caroline" nachname="Stoltz"/>
<personDef index="86" name="Johann Caspar Häfeli" vorname="Johann Caspar" nachname="Häfeli"/>
<personDef index="87" name="Christian Jakob Kraus" vorname="Christian Jakob" nachname="Kraus" />
<personDef index="88" name="Friedrich Gottlieb Klopstock" vorname="Friedrich Gottlieb" nachname="Klopstock" />
<personDef index="89" name="Caroline Herder, geb. Flachsland" vorname="Caroline" nachname="Herder"/>
<personDef index="90" name="Johann Friedrich Kleuker" vorname="Johann Friedrich" nachname="Kleuker" />
<personDef index="91" name="Heinrich Christian Reichsgraf von Keyserling" vorname="Heinrich Christian Reichsgraf von" nachname="Keyserling"/>
<personDef index="92" name="Johann Heinrich Voß" vorname="Johann Heinrich" nachname="Voß"/>
<personDef index="93" name="August Herder" vorname="August" nachname="Herder"/>
<personDef index="94" name="Johann Georg Müller" vorname="Johann Georg" nachname="Müller" />
<personDef index="95" name="Friedrich Heinrich Jacobi" vorname="Friedrich Heinrich" nachname="Jacobi" />
<personDef index="96" name="" />
<personDef index="97" name="Johann George Scheffner" vorname="Johann George" nachname="Scheffner" />
<personDef index="98" name="Johann Michael Hamann (Sohn)" vorname="Johann Michael" nachname="Hamann" />
<personDef index="99" name="" />
<personDef index="100" name="Dirk Graf van Hogendorp" vorname="Hogendorp" nachname="Dirk Graf van" />
<personDef index="101" name="Samuel Wolff Friedländer" vorname="Samuel Wolff" nachname="Friedländer" />
<personDef index="102" name="" />
<personDef index="103" name="Susanne Elisabeth Scheffner" vorname="Susanne Elisabeth" nachname="Scheffner" />
<personDef index="104" name="Eberhard Gaupp" vorname="Eberhard" nachname="Gaupp" />
<personDef index="105" name="Christian Hill" vorname="Christian" nachname="Hill" />
<personDef index="106" name="Franz Kaspar Bucholtz" vorname="Franz Kaspar" nachname="Bucholtz" />
<personDef index="107" name="Elisabeth Regina Hamann (Tochter)" vorname="Elisabeth Regina" nachname="Hamann" />
<personDef index="108" name="Die Provinzial-Direktion" nachname="Provinzial-Direktion" />
<personDef index="109" name="" />
<personDef index="110" name="Elisa von der Recke" vorname="Elisa von der" nachname="Recke"/>
<personDef index="111" name="Die Königliche General-Accise- und Zoll-Administration" nachname="General-Accise- und Zoll-Administration"/>
<personDef index="112" name="Heinrich Schenk" vorname="Heinrich" nachname="Schenk"/>
<personDef index="113" name="" />
<personDef index="114" name="Thomas Wizenmann" vorname="Thomas" nachname="Wizenmann"/>
<personDef index="115" name="" />
<personDef index="116" name="Gottfried Leberecht Masius" vorname="Gottfried Leberecht" nachname="Masius" />
<personDef index="117" name="" />
<personDef index="118" name="Finanzrat von Köpke" nachname="Köpke" />
<personDef index="119" name="Minister von Werder" nachname="Werder"/>
<personDef index="120" name="Johann Ernst von Druffel" vorname="Johann Ernst von" nachname="Druffel" />
<personDef index="121" name="Finanzbeamter Gomm" nachname="Gomm"/>
<personDef index="122" name="Fürstin Amalia von Gallitzin" vorname="Fürstin Amalia von" nachname="Gallitzin"/>
<personDef index="123" name="" />
<personDef index="124" name="" />
<personDef index="125" name="Johann Gottlieb Steudel" vorname="Johann Gottlieb" nachname="Steudel" />
<personDef index="126" name="" />
<personDef index="127" name="Abraham Jakob Penzel" vorname="Abraham Jakob" nachname="Penzel"/>
<personDef index="129" name="Martinus Maletius" vorname="Martinus" nachname="Maletius"/>
<personDef index="130" name="Vmtl. Theodor Gottlieb Hippel" vorname="Theodor Gottlieb" nachname="Hippel"/>
</personDefs>
<handDefs>
<handDef index="-1" name="Unbekannt" />
<handDef index="1" name="Johann Christoph Hamann (Bruder)" />
<handDef index="2" name="Johann Christoph Hamann (Vater)" />
<handDef index="3" name="Gottlob Immanuel Lindner" />
<handDef index="4" name="Johann Christoph Berens" />
<handDef index="5" name="Georg David Kypke" />
<handDef index="6" name="Moses Mendelssohn" />
<handDef index="7" name="Johann Friedrich Hartknoch" />
<handDef index="8" name="Johann Georg Hamann" />
<handDef index="9" name="Johann Jakob Kanter" />
<handDef index="10" name="Johann Gottlieb Kreutzfeld" />
<handDef index="11" name="Johann Caspar Lavater" />
<handDef index="12" name="Christoph Kaufmann" />
<handDef index="13" name="Elise Kaufmann, geb. Ziegler" />
<handDef index="14" name="Johann Gottfried Herder" />
<handDef index="15" name="Caroline Herder" />
<handDef index="16" name="Johann Ehrmann" />
<handDef index="17" name="Matthias Claudius" />
<handDef index="18" name="Johann Friedrich Kleuker" />
<handDef index="19" name="Friedrich Heinrich Jacobi" />
<handDef index="20" name="Friedrich Nicolai" />
<handDef index="21" name="Daniel Pegelow" />
<handDef index="22" name="Johann Ehrmann oder eine Schreibhilfe Johann Caspar Lavaters" />
<handDef index="23" name="Johann Michael Hamann (Sohn)" />
<handDef index="24" name="Arnold Corman" />
<handDef index="25" name="Franz Kaspar Bucholtz" />
<handDef index="26" name="vermutlich George Bassa" />
<handDef index="27" name="Sophie Marianne Courtan" />
<handDef index="28" name="Christian Jakob Kraus" />
<handDef index="29" name="Helene Jacobi" />
<handDef index="30" name="David Friedländer" />
<handDef index="31" name="August Herder" />
<handDef index="32" name="Heinrich Schenk" />
<handDef index="33" name="Johann Konrad Pfenninger" />
</handDefs>
<locationDefs>
<locationDef index="-1" name="unbekannt" />
<locationDef index="1" name="Berlin" />
<locationDef index="2" name="Königsberg" />
<locationDef index="3" name="Memel" />
<locationDef index="4" name="Mitau" />
<locationDef index="5" name="Kegeln" />
<locationDef index="6" name="Riga" />
<locationDef index="7" name="Grünhof" />
<locationDef index="8" name="Meyhof" />
<locationDef index="9" name="Berlin" />
<locationDef index="10" name="London" />
<locationDef index="11" name="Berenshof" />
<locationDef index="12" name="Trutenau" />
<locationDef index="13" name="Elbing" />
<locationDef index="14" name="Frankfurt am Main" />
<locationDef index="15" name="Lübeck" />
<locationDef index="16" name="Warschau" />
<locationDef index="17" name="St. Petersburg" />
<locationDef index="18" name="Nantes" />
<locationDef index="19" name="Zürich" />
<locationDef index="20" name="Mohrungen" />
<locationDef index="21" name="Schloß Hegi bei Winterthur" />
<locationDef index="22" name="Weimar" />
<locationDef index="23" name="Bückeburg" />
<locationDef index="24" name="Potsdam" />
<locationDef index="25" name="Hamburg" />
<locationDef index="26" name="Darmstadt" />
<locationDef index="27" name="Narva" />
<locationDef index="28" name="Dessau" />
<locationDef index="29" name="Wandsbeck" />
<locationDef index="30" name="Krappitz" />
<locationDef index="31" name="Leipzig" />
<locationDef index="32" name="Drubenalken" />
<locationDef index="33" name="Eutin" />
<locationDef index="34" name="Pempelfort" />
<locationDef index="35" name="Kapstadt" />
<locationDef index="36" name="Richterswil" />
<locationDef index="37" name="Düsseldorf" />
<locationDef index="38" name="Schaffhausen" />
<locationDef index="39" name="Münster" />
<locationDef index="40" name="Osnabrück" />
<locationDef index="41" name="Richmont" />
<locationDef index="42" name="Magdeburg" />
<locationDef index="43" name="Welbergen" />
</locationDefs>
<sourceDefs>
<!-- Quelle für den gesetzten Text bei Emmendationen.
Wird referenziert durch ref="" in <recte>
Nächstes Mal mit ausgeben! -->
<sourceDef index="1" name="Ohne Beleg emendiert" />
<sourceDef index="2" name="BdI, 1940" />
<sourceDef index="3" name="nur BdI Aufl. 1 (1955): Berichtigungen [abgekürzt: BdI1]" /> <!-- Zum Zeitpunkt des Anlegens der Korrekturverzeichnisse zum 1. Band waren bis auf Brief 111 alle autographen Briefe verschollen. -->
<sourceDef index="4" name="nur BdI Aufl. 2 (1988): Berichtigungen [abgekürzt: BdI2]" />
<sourceDef index="5" name="beide: BdI1 und BdI2 Berichtigungen" />
<sourceDef index="6" name="Autograph" />
<sourceDef index="7" name="Apograph" />
<sourceDef index="8" name="BdII, 1940" />
<sourceDef index="9" name="nur BdII Aufl. 1: Berichtigungen [abgekürzt: BdII1]" />
<sourceDef index="10" name="nur BdII Aufl. 2: Berichtigungen [abgekürzt: BdII2]" />
<sourceDef index="11" name="beide: BdII1 und BdII2 Berichtigungen" />
<sourceDef index="12" name="BdIII: Nachtrag zu BdII [aus einer Abschrift Lavaters] betrifft nur BdII 221f" />
</sourceDefs>
<appDefs>
<appDef index="1" name="Veränderte Einsortierung" category="false" />
<appDef index="2" name="Korrigierte Nummerierung" category="false" />
<appDef index="3" name="Korrigierte Datierung" category="false" />
<appDef index="4" name="Provenienz" category="false" />
<appDef index="5" name="Bisherige Drucke" category="false" />
<appDef index="6" name="Digitalisat" category="false" />
<appDef index="7" name="Exzerpte" category="false" />
<appDef index="8" name="Abschriften" category="true" />
<appDef index="9" name="Anhänge" category="true" />
<appDef index="10" name="Entwürfe" category="true" />
</appDefs>
</definitions>
</data>
</opus>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

454
Archive/HaDocument/.gitignore vendored Normal file
View File

@@ -0,0 +1,454 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

View File

@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using HaDocument.Models;
namespace HaDocument.Comparers {
public class CommentComparer : IComparer<Comment> {
public int Compare(Comment first, Comment second) {
if (first.Order != second.Order)
return first.Order.CompareTo(second.Order);
else
return first.Index.CompareTo(second.Index);
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HaDocument.Models;
namespace HaDocument.Comparers
{
public class DefaultComparer : IComparer<Meta>
{
public int Compare(Meta first, Meta second)
{
if (first.Sort != second.Sort)
return System.DateTime.Compare(first.Sort, second.Sort);
else if (first.Order != second.Order)
return first.Order.CompareTo(second.Order);
else
return String.Compare(first.Index, second.Index);
}
}
}

View File

@@ -0,0 +1,13 @@
using System;
using HaDocument.Models;
using System.Collections.Generic;
namespace HaDocument.Comparers {
public class PersonComparer : IComparer<Person> {
public int Compare(Person first, Person second) {
var cmp = String.Compare(first.Surname, second.Surname);
if (cmp == 0) cmp = String.Compare(first.Name, second.Name);
return cmp;
}
}
}

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HaDocument.Models;
namespace HaDocument.Comparers
{
public class ZHComparer : IComparer<Meta>
{
public int Compare(Meta first, Meta second)
{
var firstNumber = 0;
var secondNumber = 0;
Int32.TryParse(first.Index, out firstNumber);
Int32.TryParse(second.Index, out secondNumber);
return firstNumber.CompareTo(secondNumber);
//var firstIndex = from c in first.Meta.Autopsic
// where char.IsDigit(c)
// select c;
//var secondIndex = from c in second.Meta.Autopsic
// where char.IsDigit(c)
// select c;
//int firstNumber = 0;
//int secondNumber = 0;
//Int32.TryParse(String.Join("", firstIndex), out firstNumber);
//Int32.TryParse(String.Join("", secondIndex), out secondNumber);
//if (firstNumber.CompareTo(secondNumber) != 0)
// return firstNumber.CompareTo(secondNumber);
//var firstChar = from c in first.Meta.Autopsic
// where char.IsMeta(c)
// select c;
//var secondChar = from c in first.Meta.Autopsic
// where char.IsMeta(c)
// select c;
//return String.Compare(String.Join("", firstChar), String.Join("", secondChar));
}
}
}

View File

@@ -0,0 +1,55 @@
using HaDocument.Models;
using HaDocument.Interfaces;
using HaDocument.Logic;
using HaDocument.Reactors;
using HaXMLReader.Interfaces;
using HaXMLReader;
namespace HaDocument
{
/// <summary>
/// Provides basic Access to the Letter.
/// Initializes the parsing.
/// Needs an Option Object as specified in IHaDocumentOptions.
/// In case, the options change, the Object must be disposed and recreated.
/// </summary>
public static class Document
{
private static IHaDocumentOptions _settings;
private static IReader _reader = null;
private static IntermediateLibrary _lib = new IntermediateLibrary();
private static ILibrary _library;
public static ILibrary Create(IHaDocumentOptions Settings) {
SettingsValidator.Validate(Settings);
_settings = Settings;
_createReader();
_createReactors();
_reader.Read();
_library = _createLibrary();
return GetLibrary();
}
private static void _createReactors() {
new EditreasonReactor(_reader, _lib, _settings.NormalizeWhitespace);
new HandDefsReactor(_reader, _lib);
new LetterReactor(_reader, _lib, _settings.NormalizeWhitespace);
new LocationDefsReactor(_reader, _lib);
new MarginalReactor(_reader, _lib, _settings.NormalizeWhitespace);
new MetaReactor(_reader, _lib, _settings.AvailableVolumes, _settings.AvailableYearRange);
new PersonDefsReactor(_reader, _lib);
new TraditionsReactor(_reader, _lib, _settings.NormalizeWhitespace);
new CommentReactor(_reader, _lib, _settings.NormalizeWhitespace);
}
private static void _createReader() {
_reader = new FileReader(_settings.HamannXMLFilePath);
}
private static ILibrary _createLibrary()
=> _lib.GetLibrary(_settings);
public static ILibrary GetLibrary()
=> _library;
}
}

View File

@@ -0,0 +1,11 @@
using System;
namespace HaDocument.Exceptions {
public class ObjectBotchedException : Exception {
public ObjectBotchedException() { }
public ObjectBotchedException(string msg) : base (msg) { }
public ObjectBotchedException(string msg, Exception inner) : base (msg, inner) { }
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace HaDocument.Exceptions {
public class ObjectNotFoundException : Exception {
public ObjectNotFoundException() { }
public ObjectNotFoundException(string msg) : base (msg) { }
public ObjectNotFoundException(string msg, Exception inner) : base (msg, inner) { }
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace HaDocument.Exceptions {
public class SettingsInvalidException : Exception {
public SettingsInvalidException() { }
public SettingsInvalidException(string msg) : base (msg) { }
public SettingsInvalidException(string msg, Exception inner) : base (msg, inner) { }
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\HaXMLReader\HaXMLReader.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,7 @@
using System;
namespace HaDocument.Interfaces {
public interface IDocument {
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace HaDocument.Interfaces {
public interface IHaDocumentOptions {
string HamannXMLFilePath { get; set; }
string[] AvailableVolumes { get; set; }
bool NormalizeWhitespace { get; set; }
(int, int) AvailableYearRange { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Immutable;
using HaDocument.Models;
using System.Linq;
namespace HaDocument.Interfaces {
public interface ILibrary {
IHaDocumentOptions Options { get; }
ImmutableDictionary<string, Tradition> Traditions { get; }
ImmutableDictionary<string, Person> Persons { get; }
ImmutableDictionary<string, Meta> Metas { get; }
ImmutableDictionary<string, Marginal> Marginals { get; }
ImmutableDictionary<string, Location> Locations { get; }
ImmutableDictionary<string, Letter> Letters { get; }
ImmutableDictionary<string, Person> HandPersons { get; }
ImmutableDictionary<string, Editreason> Editreasons { get; }
ImmutableDictionary<string, Comment> Comments { get; }
ImmutableDictionary<string, ImmutableList<Backlink>> Backlinks { get; }
ImmutableDictionary<string, ImmutableList<Hand>> Hands { get; }
ImmutableDictionary<string, ImmutableDictionary<string, ImmutableDictionary<string, string>>> Structure { get; }
ImmutableDictionary<string, Lookup<string, Comment>> CommentsByCategoryLetter { get; }
Lookup<string, Comment> CommentsByCategory { get; }
Lookup<string, Marginal> MarginalsByLetter { get; }
Lookup<string, Editreason> EditreasonsByLetter { get; }
ImmutableSortedSet<Meta> MetasByDate { get; }
ILookup<string, Meta> MetasByYear { get; }
ImmutableDictionary<string, Comment> SubCommentsByID { get; }
}
}

View File

@@ -0,0 +1,7 @@
using System;
namespace HaDocument {
interface ITemporaryLibrary {
}
}

View File

@@ -0,0 +1,16 @@
using HaXMLReader.EvArgs;
using System.Linq;
namespace HaDocument {
static class Helpers {
internal static string GetElementString(Tag tag) {
var res = "<" + (tag.EndTag ? "/" : "") + tag.Name.ToLower();
if (!tag.EndTag && tag.Values != null && tag.Values.Any()) {
foreach (var kvp in tag.Values) {
res += " " + kvp.Key.ToLower() + "=\"" + kvp.Value.ToLower() + "\"";
}
}
return res + (tag.IsEmpty ? "/" : "") + ">";
}
}
}

View File

@@ -0,0 +1,10 @@
using System;
using HaDocument.Interfaces;
namespace HaDocument.Logic {
static class SettingsValidator {
internal static void Validate(IHaDocumentOptions settings) {
}
}
}

View File

@@ -0,0 +1,24 @@
namespace HaDocument.Models {
public class Backlink {
public string Index { get; } = "";
public string Letter { get; } = "";
public string Page { get; } = "";
public string Line { get; } = "";
public string MarginalIndex { get; } = "";
public Backlink(
string index,
string letter,
string page,
string line,
string marginalindex
) {
Index = index;
Letter = letter;
Page = page;
Line = line;
MarginalIndex = marginalindex;
}
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
namespace HaDocument.Models {
public class Comment{
public string Entry { get; } = "";
public string Index { get; } = "";
public string Type { get; } = "";
public string Lemma { get; } = "";
public string Parent { get; } = "";
public int Order { get; } = -1;
public ImmutableSortedDictionary<string, Comment> Kommentare { get; }
public Comment(
string entry,
string index,
string type,
string lemma,
int order,
SortedDictionary<string, Comment> subComments,
string parent=""
) {
Entry = entry;
Index = index;
Type = type;
Lemma = lemma;
Order = order;
Parent = parent;
if (subComments != null)
Kommentare = ImmutableSortedDictionary.ToImmutableSortedDictionary(subComments);
else
Kommentare = null;
}
}
}

View File

@@ -0,0 +1,32 @@
namespace HaDocument.Models {
public class Editreason {
public string Index { get; } = "";
public string Element { get; } = "";
public string Letter { get; } = "";
public string StartPage { get; } = "";
public string StartLine { get; } = "";
public string EndPage { get; } = "";
public string EndLine { get; } = "";
public string Reference { get; } = "";
public Editreason(
string index,
string element,
string letter = "",
string startpage = "",
string startline = "",
string endpage = "",
string endline = "",
string reference = ""
) {
Index = index;
Element = element;
Letter = letter;
StartPage = startpage;
StartLine = startline;
EndPage = endpage;
EndLine = endline;
Reference = reference;
}
}
}

View File

@@ -0,0 +1,15 @@
using System;
using HaXMLReader.EvArgs;
using System.Collections.Generic;
namespace HaDocument.Models {
public abstract class HaModel {
protected static List<(Func<Tag, bool>, Action<Tag>)> FieldActions = null;
internal static void AddAction(Func<Tag, bool> If, Action<Tag> Then) {
if (If == null || Then == null) throw new ArgumentNullException();
if (FieldActions == null) FieldActions = new List<(Func<Tag, bool>, Action<Tag>)>();
FieldActions.Add((If, Then));
}
}
}

View File

@@ -0,0 +1,26 @@
namespace HaDocument.Models {
public class Hand : HaModel {
public string Letter { get; } = "";
public string Person { get; } = "";
public string StartPage { get; } = "";
public string StartLine { get; } = "";
public string EndPage { get; } = "";
public string EndLine {get; } = "";
public Hand(
string letter,
string person,
string startpage,
string startline,
string endpage,
string endline
) {
Letter = letter;
Person = person;
StartPage = startpage;
StartLine = startline;
EndPage = endpage;
EndLine = endline;
}
}
}

View File

@@ -0,0 +1,70 @@
using System.Collections.Generic;
using HaDocument.Interfaces;
namespace HaDocument.Models
{
public class IntermediateLibrary
{
public Dictionary<string, Tradition> Traditions;
public Dictionary<string, Person> Persons;
public Dictionary<string, Meta> Metas;
public Dictionary<string, Marginal> Marginals;
public Dictionary<string, Location> Locations;
public Dictionary<string, Letter> Letters;
public Dictionary<string, Person> HandPersons;
public Dictionary<string, Editreason> Editreasons;
public Dictionary<string, Comment> Comments;
public Dictionary<string, List<Backlink>> Backlinks;
public Dictionary<string, List<Hand>> Hands;
// Helper Library for precalculationg the Structure of the Document:
public Dictionary<string, Dictionary<string, HashSet<string>>> LetterPageLines;
public Library GetLibrary(IHaDocumentOptions options)
{
var Structure = new Dictionary<string, Dictionary<string, Dictionary<string, string>>>();
foreach (var letter in LetterPageLines)
{
if (Metas.ContainsKey(letter.Key) &&
Metas[letter.Key].ZH != null)
{
if (!Structure.ContainsKey(Metas[letter.Key].ZH.Volume))
{
Structure.Add(Metas[letter.Key].ZH.Volume, new Dictionary<string, Dictionary<string, string>>());
}
foreach (var page in letter.Value)
{
if (!Structure[Metas[letter.Key].ZH.Volume].ContainsKey(page.Key))
{
Structure[Metas[letter.Key].ZH.Volume].Add(page.Key, new Dictionary<string, string>());
}
foreach (var line in page.Value)
{
if (!Structure[Metas[letter.Key].ZH.Volume][page.Key].ContainsKey(line))
{
Structure[Metas[letter.Key].ZH.Volume][page.Key].Add(line, letter.Key);
}
}
}
}
}
return new Library(
Traditions,
Persons,
Metas,
Marginals,
Locations,
Letters,
HandPersons,
Editreasons,
Comments,
Backlinks,
Hands,
Structure,
options
);
}
}
}

View File

@@ -0,0 +1,14 @@
namespace HaDocument.Models {
public class Letter : HaModel {
public string Index { get; } = "";
public string Element { get; } = "";
public Letter(
string index,
string element
) {
Index = index;
Element = element;
}
}
}

View File

@@ -0,0 +1,150 @@
using System;
using HaDocument.Interfaces;
using System.Collections.Immutable;
using System.Collections.Generic;
using HaDocument.Models;
using HaDocument.Comparers;
using System.Linq;
namespace HaDocument.Models
{
public class Library : ILibrary
{
public IHaDocumentOptions Options { get; }
public ImmutableDictionary<string, Tradition> Traditions { get; }
public ImmutableDictionary<string, Person> Persons { get; }
public ImmutableDictionary<string, Meta> Metas { get; }
public ImmutableDictionary<string, Marginal> Marginals { get; }
public ImmutableDictionary<string, Location> Locations { get; }
public ImmutableDictionary<string, Letter> Letters { get; }
public ImmutableDictionary<string, Person> HandPersons { get; }
public ImmutableDictionary<string, Editreason> Editreasons { get; }
public ImmutableDictionary<string, Comment> Comments { get; }
public ImmutableDictionary<string, ImmutableList<Backlink>> Backlinks { get; }
public ImmutableDictionary<string, ImmutableList<Hand>> Hands { get; }
// Structure for lookups from ZH:
public ImmutableDictionary<string, ImmutableDictionary<string, ImmutableDictionary<string, string>>> Structure { get; }
// Lookups:
// Auswählen von Kommentaren nach (1) Kategorie, (2) Anfangsbuchstaben vom Lemma.
// So: _ = CommentsByCategoryLetter['neuzeit']['A']
public ImmutableDictionary<string, Lookup<string, Comment>> CommentsByCategoryLetter { get; }
public Lookup<string, Comment> CommentsByCategory { get; }
// Auswählen von Subkommentaren nach ID
public ImmutableDictionary<string, Comment> SubCommentsByID { get; }
// Auswählen von Marginalien nach Briefen
public Lookup<string, Marginal> MarginalsByLetter { get; }
// Ausw?hlen von Edits nach Briefen
public Lookup<string, Editreason> EditreasonsByLetter { get; }
// Auswählen von Briefen nach autoptischer Numemr und in zeitlich sortierter Reihenfolge.
public ImmutableSortedSet<Meta> MetasByDate { get; }
// Auswählen von Briefen nach dem Jahr, sortiert nach Datum
public ILookup<string, Meta> MetasByYear { get; }
public Library(
Dictionary<string, Tradition> traditions,
Dictionary<string, Person> persons,
Dictionary<string, Meta> meta,
Dictionary<string, Marginal> marginals,
Dictionary<string, Location> locations,
Dictionary<string, Letter> letters,
Dictionary<string, Person> handPersons,
Dictionary<string, Editreason> editReasons,
Dictionary<string, Comment> comments,
Dictionary<string, List<Backlink>> backlinks,
Dictionary<string, List<Hand>> hands,
Dictionary<string, Dictionary<string, Dictionary<string, string>>> Structure,
IHaDocumentOptions options
)
{
// Dictionaries
Traditions = ImmutableDictionary.ToImmutableDictionary(traditions);
Persons = ImmutableDictionary.ToImmutableDictionary(persons);
Metas = ImmutableDictionary.ToImmutableDictionary(meta);
Marginals = ImmutableDictionary.ToImmutableDictionary(marginals);
Locations = ImmutableDictionary.ToImmutableDictionary(locations);
Letters = ImmutableDictionary.ToImmutableDictionary(letters);
HandPersons = ImmutableDictionary.ToImmutableDictionary(handPersons);
Editreasons = ImmutableDictionary.ToImmutableDictionary(editReasons);
Comments = ImmutableDictionary.ToImmutableDictionary(comments);
var backbuilder = ImmutableDictionary.CreateBuilder<string, ImmutableList<Backlink>>();
foreach (var entry in backlinks)
backbuilder.Add(entry.Key, ImmutableList.ToImmutableList(entry.Value));
Backlinks = backbuilder.ToImmutableDictionary();
var handbuilder = ImmutableDictionary.CreateBuilder<string, ImmutableList<Hand>>();
foreach (var entry in hands)
handbuilder.Add(entry.Key, ImmutableList.ToImmutableList(entry.Value));
Hands = handbuilder.ToImmutableDictionary();
// Lookups
CommentsByCategory = (Lookup<string, Comment>)Comments.Values.ToLookup(x => x.Type);
var CommentsByLetter_builder = ImmutableDictionary.CreateBuilder<string, Lookup<string, Comment>>();
foreach (var ts in CommentsByCategory)
{
CommentsByLetter_builder.Add(ts.Key, (Lookup<string, Comment>)ts.ToLookup(x => x.Index.Substring(0, 1).ToUpper()));
}
CommentsByCategoryLetter = CommentsByLetter_builder.ToImmutableDictionary();
MarginalsByLetter = (Lookup<string, Marginal>)Marginals.Values.ToLookup(x => x.Letter);
EditreasonsByLetter = (Lookup<string, Editreason>)Editreasons.Values.ToLookup(x => x.Letter);
MetasByDate = Metas.Values.ToImmutableSortedSet<Meta>(new DefaultComparer());
MetasByYear = Metas.Values.ToLookup(x => x.Sort.Year.ToString());
var tempbuilder = ImmutableDictionary.CreateBuilder<string, Comment>();
foreach (var comm in Comments)
if (comm.Value.Kommentare != null)
foreach (var subcomm in comm.Value.Kommentare)
if (!tempbuilder.ContainsKey(subcomm.Key))
tempbuilder.Add(subcomm.Key, subcomm.Value);
SubCommentsByID = tempbuilder.ToImmutableDictionary();
var tempstructurebuilder = ImmutableDictionary.CreateBuilder<string, ImmutableDictionary<string, ImmutableDictionary<string, string>>>();
foreach (var volume in Structure)
{
if (volume.Value != null)
{
var tempvolbuilder = ImmutableDictionary.CreateBuilder<string, ImmutableDictionary<string, string>>();
foreach (var page in volume.Value)
{
if (page.Value != null)
{
tempvolbuilder.Add(page.Key, page.Value.ToImmutableDictionary());
}
}
if (tempvolbuilder.Any())
{
tempstructurebuilder.Add(volume.Key, tempvolbuilder.ToImmutableDictionary());
}
}
}
this.Structure = tempstructurebuilder.ToImmutableDictionary();
Options = options;
}
// public List<Meta> MetasByDate() {
// var ret = Metas.OrderBy(x => x.Value, new DefaultComparer()).ToLookup(x => x.Value.Autopsic, x => x.Value);
// ret.Sort(new DefaultComparer());
// return ret;
// }
public ImmutableList<Meta> MetasByZH()
{
return Metas.Values.ToImmutableList().Sort(new Comparers.ZHComparer());
}
public List<Person> PersonByAlphabet()
{
var ret = Persons.Values.ToList();
ret.Sort(new PersonComparer());
return ret;
}
}
}

View File

@@ -0,0 +1,14 @@
namespace HaDocument.Models {
public class Location {
public string Index { get; } = "";
public string Name { get; } = "";
public Location(
string index,
string name
) {
Index = index;
Name = name;
}
}
}

View File

@@ -0,0 +1,23 @@
namespace HaDocument.Models {
public class Marginal {
public string Index { get; } = "";
public string Letter { get; } = "";
public string Page { get; } = "";
public string Line { get; } = "";
public string Element { get; } = "";
public Marginal(
string index,
string letter,
string page,
string line,
string elemnt
) {
Index = index;
Letter = letter;
Page = page;
Line = line;
Element = elemnt;
}
}
}

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using HaXMLReader.EvArgs;
namespace HaDocument.Models {
public class Meta {
public string Index { get; } = "";
public string Autopsic { get; } = "";
public string Date { get; } = "";
public DateTime Sort { get; } = new DateTime(1700, 1, 1);
public int Order { get; } = -1;
public string Location { get; } = "";
public List<string> Senders { get; } = null;
public List<string> Receivers { get; } = null;
public OptionalBool hasOriginal { get; } = OptionalBool.None;
public OptionalBool isProofread { get; } = OptionalBool.None;
public OptionalBool isDraft { get; } = OptionalBool.None;
public ZHInfo ZH { get; } = null;
public Meta(
string index,
string autopsic,
string date,
DateTime sort,
int order,
OptionalBool hasOriginal,
OptionalBool isProofread,
OptionalBool isDraft,
string location,
List<string> senders,
List<string> receivers,
ZHInfo ZH
) {
Index = index;
Autopsic = autopsic;
Date = date;
Sort = sort;
Order = order;
Location = location;
Senders = senders;
Receivers = receivers;
this.hasOriginal = hasOriginal;
this.isProofread = isProofread;
this.isDraft = isDraft;
this.ZH = ZH;
}
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace HaDocument.Models
{
public enum OptionalBool
{
True,
False,
None
}
}

View File

@@ -0,0 +1,20 @@
namespace HaDocument.Models {
public class Person {
public string Index { get; } = "";
public string Name { get; } = "";
public string Prename { get; } = "";
public string Surname { get; } = "";
public Person(
string index,
string name,
string prename,
string surname
) {
Index = index;
Name = name;
Prename = prename;
Surname = surname;
}
}
}

View File

@@ -0,0 +1,14 @@
namespace HaDocument.Models {
public class Tradition {
public string Index { get; } = "";
public string Element { get; } = "";
public Tradition(
string index,
string element
) {
Index = index;
Element = element;
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace HaDocument.Models
{
public class ZHInfo
{
public bool alternativeLineNumbering { get; } = false;
public bool dateChanged { get; } = false;
public string Volume { get; } = "";
public string Page { get; } = "";
public ZHInfo(bool alternativeLineNumbering, bool dateChanged, string Volume, string Page) {
this.alternativeLineNumbering = alternativeLineNumbering;
this.dateChanged = dateChanged;
this.Volume = Volume;
this.Page = Page;
}
}
}

View File

@@ -0,0 +1,178 @@
using HaXMLReader.Interfaces;
using HaXMLReader.EvArgs;
using HaDocument.Models;
using System.Collections.Generic;
using System;
using HaDocument.Comparers;
namespace HaDocument.Reactors {
class CommentReactor : Reactor {
Dictionary<string, Comment> CreatedInstances;
private bool _normalizeWhitespace = false;
// State
private string Type = "";
private string Index = "";
private string Lemma = "";
private string Entry = "";
private int Order = -1;
private SortedDictionary<string, Comment> Subcomments;
private bool subsection = false;
private string subsectionIndex = "";
private string subsectionLemma = "";
private string subsectionEntry = "";
private int subsectionOrder = -1;
internal CommentReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base(reader, lib) {
_normalizeWhitespace = normalizeWhitespace;
_lib.Comments = _lib.Comments ?? new Dictionary<string, Comment>();
CreatedInstances = _lib.Comments;
reader.OpenTag += Listen;
}
protected override void Listen(object _, Tag tag) {
if (
!tag.IsEmpty &&
!tag.EndTag &&
tag.Name == "kommcat" &&
!string.IsNullOrWhiteSpace(tag["value"])
) {
Type = tag["value"];
Activate(_reader, tag);
}
else if (
tag.EndTag &&
tag.Name == "kommcat"
) {
ResetType();
Deactivate();
}
}
protected override void Activate(IReader _, Tag tag) {
_reader.Tag += OnTag;
}
private void OnTag(object _, Tag tag) {
if (
!tag.IsEmpty &&
!tag.EndTag &&
tag.Name == "kommentar" &&
!string.IsNullOrWhiteSpace(tag["id"])
) {
Index = tag["id"];
Order = String.IsNullOrWhiteSpace(tag["sort"]) ? 0 : Int32.Parse(tag["sort"]);
}
else if (
tag.EndTag &&
tag.Name == "kommentar"
) {
AddComment();
}
else if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "lemma"
) {
_ = new ElementStringBinder(_reader, tag, AddLemma, _normalizeWhitespace);
}
else if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "eintrag"
) {
_ = new ElementStringBinder(_reader, tag, AddEntry, _normalizeWhitespace);
}
else if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "subsection"
) {
if (!String.IsNullOrWhiteSpace(tag["id"])) subsectionIndex = tag["id"];
if (!String.IsNullOrWhiteSpace(tag["sort"])) subsectionOrder = Int32.Parse(tag["sort"]);
if (Subcomments ==null) Subcomments = new SortedDictionary<string, Comment>();
subsection = true;
}
else if (
tag.EndTag &&
tag.Name == "subsection"
) {
subsection = false;
AddSubsection();
}
}
private void Deactivate() {
_reader.Tag -= OnTag;
}
private void AddLemma(string str) {
if (String.IsNullOrEmpty(str)) return;
if (subsection) subsectionLemma = str;
else Lemma = str;
}
private void AddEntry(string str) {
if (String.IsNullOrWhiteSpace(str)) str = "";
if (subsection) subsectionEntry = str;
else Entry = str;
}
private void AddSubsection() {
if (String.IsNullOrWhiteSpace(subsectionIndex)) return;
if (String.IsNullOrWhiteSpace(subsectionLemma)) return;
if (!Subcomments.ContainsKey(subsectionIndex))
{
Subcomments.Add(subsectionIndex, new Comment(
subsectionEntry,
subsectionIndex,
Type,
subsectionLemma,
subsectionOrder,
null,
Index
));
}
ResetSubsection();
}
private void AddComment() {
if (String.IsNullOrWhiteSpace(Index)) return;
if (String.IsNullOrWhiteSpace(Lemma)) return;
if (CreatedInstances.ContainsKey(Index)) return;
CreatedInstances.Add(Index, new Comment(
Entry,
Index,
Type,
Lemma,
Order,
Subcomments
));
Reset();
}
protected override void Reset() {
Index = "";
Lemma = "";
Entry = "";
Order = -1;
Subcomments = null;
ResetSubsection();
}
private void ResetSubsection() {
subsection = false;
subsectionEntry = "";
subsectionIndex = "";
subsectionLemma = "";
subsectionOrder = -1;
}
private void ResetType() {
Type = "";
}
}
}

View File

@@ -0,0 +1,154 @@
using HaDocument.Models;
using System.Collections.Generic;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using System;
namespace HaDocument.Reactors {
class EditreasonReactor : Reactor {
internal Dictionary<string, Editreason> CreatedInstances;
private Dictionary<string, string[]> _intermediateReasons = new Dictionary<string, string[]>();
private bool _normalizeWhitespace = false;
// State
private string Index = "";
private string letter = "";
private string page = "";
private string line = "";
private Stack<string> index;
private ElementStringBinder _element = null;
internal EditreasonReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base (reader, lib) {
CreatedInstances = lib.Editreasons;
index = new Stack<string>();
_normalizeWhitespace = normalizeWhitespace;
lib.Editreasons = new Dictionary<string, Editreason>();
CreatedInstances = lib.Editreasons;
reader.Tag += Listen;
reader.ReadingStop += Scaffold;
}
protected void Scaffold(object _, EventArgs __) {
foreach (var entry in _intermediateReasons) {
if (
!String.IsNullOrWhiteSpace(entry.Value[0]) &&
!String.IsNullOrWhiteSpace(entry.Value[1]) &&
!String.IsNullOrWhiteSpace(entry.Value[2]) &&
!String.IsNullOrWhiteSpace(entry.Value[3])
) {
CreatedInstances.Add(
entry.Key,
new Editreason(
entry.Key,
entry.Value[0],
entry.Value[1],
entry.Value[2],
entry.Value[3],
entry.Value[5],
entry.Value[6],
entry.Value[4]
)
);
}
}
}
protected override void Listen(object sender, Tag tag) {
if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "editreason" &&
!String.IsNullOrWhiteSpace(tag["index"])
) {
Activate(_reader, tag);
}
else if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "letterText"
) {
letter = tag["index"];
}
else if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "letterTradition"
) {
letter = tag["ref"];
}
else if (
!tag.EndTag &&
tag.IsEmpty &&
tag.Name == "page"
) {
page = tag["index"];
}
else if (
!tag.EndTag &&
tag.IsEmpty &&
tag.Name == "line"
) {
line = tag["index"];
}
else if (
!tag.EndTag &&
tag.Name == "edit" &&
!String.IsNullOrWhiteSpace(tag["ref"])
) {
if (!_intermediateReasons.ContainsKey(tag["ref"])) {
_intermediateReasons.Add(tag["ref"], new string[7]);
}
_intermediateReasons[tag["ref"]][1] = letter;
_intermediateReasons[tag["ref"]][2] = page;
_intermediateReasons[tag["ref"]][3] = line;
if (!tag.IsEmpty) {
index.Push(tag["ref"]);
new ElementStringBinder(_reader, tag, AddReference);
}
}
}
protected override void Activate(IReader reader, Tag tag) {
if (!_active && reader != null && tag != null) {
_active = true;
_reader = reader;
Index = tag["index"];
_element = new ElementStringBinder(reader, tag, Add, _normalizeWhitespace);
}
}
private void Add(string element) {
if (String.IsNullOrWhiteSpace(element)) return;
if (!_intermediateReasons.ContainsKey(Index)) {
_intermediateReasons.Add(Index, new string[7]);
}
_intermediateReasons[Index][0] = element;
Reset();
}
private void AddReference(string element) {
if (String.IsNullOrWhiteSpace(element)) return;
var ci = index.Pop();
if (!_intermediateReasons.ContainsKey(ci)) {
_intermediateReasons.Add(ci, new string[7]);
}
_intermediateReasons[ci][4] = element;
_intermediateReasons[ci][5] = page;
_intermediateReasons[ci][6] = line;
}
protected override void Reset() {
Index = "";
_active = false;
_element = null;
}
protected void Deactivate() {
_element.Unsubscribe();
Reset();
}
}
}

View File

@@ -0,0 +1,99 @@
using System;
using HaDocument.Models;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using System.Text;
using System.Xml;
using System.Collections.Generic;
namespace HaDocument.Reactors {
class ElementStringBinder {
private StringBuilder _stringBuilder;
private XmlWriter _txtwriter;
private Stack<Tag> _stack;
private IReader _reader;
private Action<string> _callback;
private bool _normalizeWhitespace = false;
internal ElementStringBinder(IReader reader, Tag start, Action<string> callback) {
_reader = reader;
_callback = callback;
_stack = new Stack<Tag>();
_stringBuilder = new StringBuilder();
_txtwriter = XmlWriter.Create(_stringBuilder, new XmlWriterSettings() {
CheckCharacters = false,
ConformanceLevel = ConformanceLevel.Fragment,
Encoding = Encoding.UTF8,
OmitXmlDeclaration = true,
NewLineHandling = NewLineHandling.None
});
_stack.Push(start);
_writeTag(start);
Subscribe();
}
internal ElementStringBinder(IReader reader, Tag start, Action<string> callback, bool normalizeWhitespace) : this(reader, start, callback) {
_normalizeWhitespace = normalizeWhitespace;
}
internal void Subscribe() {
_reader.Tag += OnTag;
_reader.Text += OnText;
_reader.Whitespace += OnWhiteSpace;
}
internal void Unsubscribe() {
_reader.Tag -= OnTag;
_reader.Text -= OnText;
_reader.Whitespace -= OnWhiteSpace;
}
internal string GetElementText() {
_txtwriter.Flush();
_txtwriter.Dispose();
Unsubscribe();
var ret = _stringBuilder.ToString();
_stringBuilder = new StringBuilder();
return ret;
}
private void _writeTag(Tag tag) {
var writer = _txtwriter;
if (tag.EndTag) {
writer.WriteEndElement();
return;
}
writer.WriteStartElement(tag.Name);
if (tag.Values != null && tag.Values.Count > 0)
foreach (var kv in tag.Values)
writer.WriteAttributeString(kv.Key, kv.Value);
if ( tag.IsEmpty )
writer.WriteEndElement();
}
private void OnTag(object _, Tag tag) {
_writeTag(tag);
if (!tag.IsEmpty && tag.EndTag) _stack.Pop();
else if (!tag.IsEmpty) _stack.Push(tag);
if (_stack.Count == 0 ) _callback(GetElementText());
}
private void OnText(object _, Text text) {
if (_normalizeWhitespace) {
var neu = text.Value.Replace('\n', ' ').Replace("\t", "").Replace("\r", "");
_txtwriter.WriteString(neu);
}
else
_txtwriter.WriteString(text.Value);
}
private void OnWhiteSpace(object _, Whitespace ws) {
if (_normalizeWhitespace)
_txtwriter.WriteWhitespace(" ");
else
_txtwriter.WriteWhitespace(ws.Value);
}
}
}

View File

@@ -0,0 +1,55 @@
using System;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using HaDocument.Models;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace HaDocument.Reactors {
class HandDefsReactor : Reactor {
internal Dictionary<string, Person> CreatedInstances;
// State
private string Index;
private string Name;
internal HandDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
lib.HandPersons = new Dictionary<string, Person>();
CreatedInstances = lib.HandPersons;
reader.Tag += Listen;
}
protected override void Listen(object sender, Tag tag) {
if (
!tag.EndTag &&
tag.IsEmpty &&
tag.Name == "handDef" &&
!String.IsNullOrWhiteSpace(tag["index"]) &&
!String.IsNullOrWhiteSpace(tag["name"])
) {
Activate(_reader, tag);
}
}
protected override void Activate(IReader reader, Tag tag) {
if (!_active && reader != null && tag != null) {
Reset();
_active = true;
Index = tag["index"];
Name = tag["name"];
Add();
_active = false;
}
}
protected override void Reset() {
Index = "";
Name = "";
}
protected void Add() {
CreatedInstances.Add(Index, new Person(Index, Name, "", ""));
}
}
}

View File

@@ -0,0 +1,151 @@
using System;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using HaDocument.Models;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Linq;
namespace HaDocument.Reactors
{
class LetterReactor : Reactor
{
internal Dictionary<string, Letter> CreatedInstances;
internal Dictionary<string, List<Hand>> CreatedHands;
internal Dictionary<string, Dictionary<string, HashSet<string>>> CreatedStructure;
// State
private string Index = "";
private ElementStringBinder _element = null;
private bool _normalizeWhitespace = false;
private string _page = "";
private string _line = "";
private List<Hand> _hands;
private string _person = "";
private string _handstartpg = "";
private string _handstartln = "";
internal LetterReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base(reader, lib)
{
_normalizeWhitespace = normalizeWhitespace;
lib.Letters = new Dictionary<string, Letter>();
if (lib.Hands == null)
lib.Hands = new Dictionary<string, List<Hand>>();
if (lib.LetterPageLines == null)
lib.LetterPageLines = new Dictionary<string, Dictionary<string, HashSet<string>>>();
CreatedHands = lib.Hands;
CreatedInstances = lib.Letters;
CreatedStructure = lib.LetterPageLines;
reader.OpenTag += Listen;
reader.SingleTag += Listen;
reader.CloseTag += Listen;
}
protected override void Listen(object sender, Tag tag)
{
if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "letterText" &&
!String.IsNullOrWhiteSpace(tag["index"])
)
{
Activate(_reader, tag);
if (!CreatedStructure.ContainsKey(tag["index"]))
this.CreatedStructure.Add(tag["index"], new Dictionary<string, HashSet<string>>());
}
else if (
!tag.EndTag &&
_active &&
tag.Name == "line" &&
!String.IsNullOrWhiteSpace(tag["index"])
)
{
_line = tag["index"];
if (!CreatedStructure[Index][_page].Contains(_line))
{
CreatedStructure[Index][_page].Add(_line);
}
}
else if (
!tag.EndTag &&
_active &&
tag.Name == "page" &&
!String.IsNullOrWhiteSpace(tag["index"])
)
{
_page = tag["index"];
if (!CreatedStructure[Index].ContainsKey(_page))
CreatedStructure[Index].Add(_page, new HashSet<string>());
}
else if (
_active &&
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "hand" &&
!String.IsNullOrWhiteSpace(tag["ref"])
)
{
_person = tag["ref"];
_handstartln = _line;
_handstartpg = _page;
}
else if (
_active &&
tag.EndTag &&
tag.Name == "hand"
)
{
if (_hands == null)
_hands = new List<Hand>();
_hands.Add(new Hand(Index, _person, _handstartpg, _handstartln, _page, _line));
}
}
protected override void Activate(IReader reader, Tag tag)
{
if (!_active && reader != null && tag != null)
{
_active = true;
_reader = reader;
Index = tag["index"];
_element = new ElementStringBinder(reader, tag, Add, _normalizeWhitespace);
}
}
private void Add(string text)
{
if (String.IsNullOrWhiteSpace(text)) return;
var letter = new Letter(
Index,
text
);
CreatedInstances.TryAdd(Index, letter);
if (_hands != null)
{
if (!CreatedHands.ContainsKey(Index))
CreatedHands.Add(Index, _hands);
else
CreatedHands[Index].AddRange(_hands);
}
Reset();
}
protected override void Reset()
{
Index = "";
_active = false;
_element = null;
_hands = null;
}
protected void Deactivate()
{
_element.Unsubscribe();
Reset();
}
}
}

View File

@@ -0,0 +1,56 @@
using System;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using HaDocument.Models;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace HaDocument.Reactors {
class LocationDefsReactor : Reactor {
internal Dictionary<string, Location> CreatedInstances;
// State
private string Index;
private string Name;
internal LocationDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
lib.Locations = new Dictionary<string, Location>();
CreatedInstances = lib.Locations;
reader.Tag += Listen;
}
protected override void Listen(object sender, Tag tag) {
if (
!tag.EndTag &&
tag.IsEmpty &&
tag.Name == "locationDef" &&
!String.IsNullOrWhiteSpace(tag["index"]) &&
!String.IsNullOrWhiteSpace(tag["name"])
) {
Activate(_reader, tag);
}
}
protected override void Activate(IReader reader, Tag tag) {
if (!_active && reader != null && tag != null) {
Reset();
_active = true;
Index = tag["index"];
Name = tag["name"];
Add();
_active = false;
}
}
protected override void Reset() {
Index = "";
Name = "";
}
protected void Add() {
CreatedInstances.Add(Index, new Location(Index, Name));
}
}
}

View File

@@ -0,0 +1,100 @@
using HaDocument.Models;
using System.Collections.Generic;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using System;
namespace HaDocument.Reactors {
class MarginalReactor : Reactor {
internal Dictionary<string, Marginal> CreatedInstances;
internal Dictionary<string, List<Backlink>> CreatedBacklinks;
private bool _normalizeWhitespace = false;
// State
private string Index = "";
private string Letter = "";
private string Page = "";
private string Line = "";
private ElementStringBinder _element = null;
internal MarginalReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base(reader, lib) {
_normalizeWhitespace = normalizeWhitespace;
lib.Marginals = new Dictionary<string, Marginal>();
lib.Backlinks = new Dictionary<string, List<Backlink>>();
CreatedBacklinks = lib.Backlinks;
CreatedInstances = lib.Marginals;
reader.OpenTag += Listen;
}
protected override void Listen(object sender, Tag tag) {
if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "marginal" &&
!String.IsNullOrEmpty(tag["index"]) &&
!String.IsNullOrWhiteSpace(tag["letter"]) &&
!String.IsNullOrWhiteSpace(tag["page"]) &&
!String.IsNullOrWhiteSpace(tag["line"])
) {
Activate(_reader, tag);
}
}
protected override void Activate(IReader reader, Tag tag) {
if (!_active && reader != null && tag != null) {
_active = true;
_reader = reader;
Index = tag["index"];
Letter = tag["letter"];
Page = tag["page"];
Line = tag["line"];
_element = new ElementStringBinder(_reader, tag, Add, _normalizeWhitespace);
reader.Tag += OnTag;
}
}
private void OnTag(object _, Tag tag) {
if(
!tag.EndTag &&
tag.Name =="link"
) {
var id = "";
if (tag.Values.ContainsKey("subref"))
id = tag["subref"];
else if (tag.Values.ContainsKey("ref"))
id = tag["ref"];
if (!String.IsNullOrWhiteSpace(id)) {
if (!CreatedBacklinks.ContainsKey(id))
CreatedBacklinks.Add(id, new List<Backlink>());
CreatedBacklinks[id].Add(new Backlink(id, Letter, Page, Line, Index));
}
}
}
private void Add(string element) {
if (String.IsNullOrWhiteSpace(element)) return;
var marg = new Marginal(
Index,
Letter,
Page,
Line,
element
);
CreatedInstances.TryAdd(Index, marg);
Reset();
}
protected override void Reset() {
Index = "";
_active = false;
_element = null;
_reader.Tag -= OnTag;
}
public void Deactivate() {
_element.Unsubscribe();
Reset();
}
}
}

View File

@@ -0,0 +1,196 @@
using System;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using HaDocument.Models;
using System.Collections.Generic;
using System.Linq;
namespace HaDocument.Reactors {
class MetaReactor : Reactor {
internal Dictionary<string, Meta> CreatedInstances { get; }
private string[] _availableVolumes;
private (int, int) _availableYearRange;
// State
private string Index { get; set; } = "";
private string Autopsic { get; set; } = "";
private string Volume { get; set; } = "";
private string Page { get; set; } = "";
private string Date { get; set; } = "";
private DateTime Sort { get; set; } = new DateTime(1700, 1, 1);
private int Order { get; set; } = -1;
private bool AltLineNumbering { get; set; } = false;
private bool inZH { get; set; } = false;
private OptionalBool hasOriginal { get; set; } = OptionalBool.None;
private OptionalBool isProofread { get; set; } = OptionalBool.None;
private OptionalBool isDraft { get; set; } = OptionalBool.None;
private bool dateChanged {get; set; } = false;
private string Location { get; set; } = "";
private List<string> Senders { get; set; } = null;
private List<string> Receivers { get; set; } = null;
internal MetaReactor(IReader reader, IntermediateLibrary lib, string[] availableVolumes, (int, int) availableYearRange) : base(reader, lib) {
_availableVolumes = availableVolumes;
_availableYearRange = availableYearRange;
lib.Metas = new Dictionary<string, Meta>();
CreatedInstances = lib.Metas;
reader.OpenTag += Listen;
}
protected override void Listen(object sender, Tag tag) {
if (
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name =="letterDesc" &&
!String.IsNullOrWhiteSpace(tag["ref"])
) {
Activate(_reader, tag);
}
}
protected override void Activate(IReader reader, Tag tag) {
if (!_active && reader != null && tag != null) {
Reset();
_active = true;
Index = tag["ref"];
reader.Tag += OnTag;
_reader = reader;
}
}
public void Deactivate() {
if (_active) {
Abort();
Add();
}
}
public void Abort() {
if (_active) {
_active = false;
_reader.Tag -= OnTag;
}
}
private void OnTag(object _, Tag tag) {
switch (tag.Name)
{
case "autopsic":
Autopsic = tag["value"];
if (String.IsNullOrWhiteSpace(Autopsic)) Abort();
break;
case "begin":
Page = tag["page"];
Volume = tag["vol"];
break;
case "date":
Date = tag["value"];
break;
case "location":
Location = tag["ref"];
break;
case "sender":
if (!String.IsNullOrWhiteSpace(tag["ref"])) Senders.Add(tag["ref"]);
break;
case "receiver":
if (!String.IsNullOrWhiteSpace(tag["ref"])) Receivers.Add(tag["ref"]);
break;
case "sort":
DateTime res;
System.DateTime.TryParse(tag["value"], out res);
Sort = res;
int res2 = 0;
Int32.TryParse(tag["order"], out res2);
Order = res2;
break;
case "hasOriginal":
var val = tag["value"];
if (val.ToLower() == "true")
hasOriginal = OptionalBool.True;
else if (val.ToLower() == "false")
hasOriginal = OptionalBool.False;
else
hasOriginal = OptionalBool.None;
break;
case "isProofread":
var val2 = tag["value"];
if (val2.ToLower() == "true")
isProofread = OptionalBool.True;
else if (val2.ToLower() == "false")
isProofread = OptionalBool.False;
else
isProofread = OptionalBool.None;
break;
case "isDraft":
var val3 = tag["value"];
if (val3.ToLower() == "true")
isDraft = OptionalBool.True;
else if (val3.ToLower() == "false")
isDraft = OptionalBool.False;
else
isDraft = OptionalBool.None;
break;
case "ZHInfo":
if (!tag.EndTag) {
inZH = tag["inzh"] == "false" ? false : true;
}
break;
case "dateChanged":
dateChanged = tag["value"].ToLower() == "true" ? true : false;
break;
case "alternativeLineNumbering":
AltLineNumbering = tag["value"].ToLower() == "true" ? true : false;
break;
case "letterDesc":
if (tag.EndTag) Deactivate();
break;
}
}
private void Add() {
if (
_availableVolumes.Contains(Volume) ||
(Sort.Year >= _availableYearRange.Item1 && Sort.Year <= _availableYearRange.Item2) ||
(_availableVolumes == null && _availableYearRange.Item1 == 0 && _availableYearRange.Item2 == 0)
) {
var ZHInfo = !inZH ? null : new ZHInfo(AltLineNumbering, dateChanged, Volume, Page);
var meta = new Meta(
Index,
Autopsic,
Date,
Sort,
Order,
hasOriginal,
isProofread,
isDraft,
Location,
Senders,
Receivers,
ZHInfo
);
CreatedInstances.TryAdd(meta.Index, meta);
}
}
protected override void Reset() {
inZH = true;
hasOriginal = OptionalBool.None;
isProofread = OptionalBool.None;
isDraft = OptionalBool.None;
dateChanged = false;
Index = "";
Autopsic = "";
Volume = "";
Page = "";
Date = "";
DateTime Sort = new DateTime(1700, 1, 1);
Order = -1;
AltLineNumbering = false;
Location = "";
Senders = new List<string>();
Receivers = new List<string>();
}
}
}

View File

@@ -0,0 +1,60 @@
using System;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using HaDocument.Models;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace HaDocument.Reactors {
class PersonDefsReactor : Reactor {
internal Dictionary<string, Person> CreatedInstances;
// State
private string Index;
private string Name;
private string Prename = "";
private string Surname = "";
internal PersonDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
lib.Persons = new Dictionary<string, Person>();
CreatedInstances = lib.Persons;
reader.Tag += Listen;
}
protected override void Listen(object sender, Tag tag) {
if (!tag.EndTag &&
tag.IsEmpty &&
tag.Name == "personDef" &&
!String.IsNullOrWhiteSpace(tag["index"]) &&
!String.IsNullOrWhiteSpace(tag["name"])
) {
Activate(_reader, tag);
}
}
protected override void Activate(IReader reader, Tag tag) {
if (!_active && reader != null && tag != null) {
Reset();
_active = true;
Index = tag["index"];
Name = tag["name"];
Prename = tag["vorname"];
Surname = tag["nachname"];
Add();
_active = false;
}
}
protected override void Reset() {
Index = "";
Name = "";
Prename = "";
Surname = "";
}
public void Add() {
CreatedInstances.Add(Index, new Person(Index, Name, Prename, Surname));
}
}
}

View File

@@ -0,0 +1,20 @@
using HaDocument.Models;
using HaXMLReader.Interfaces;
using HaXMLReader.EvArgs;
namespace HaDocument.Reactors {
abstract class Reactor {
protected IReader _reader;
protected IntermediateLibrary _lib;
protected bool _active = false;
internal Reactor(IReader reader, IntermediateLibrary lib) {
_reader = reader;
_lib = lib;
}
protected abstract void Listen(object sender, Tag tag);
protected abstract void Activate(IReader reader, Tag tag);
protected abstract void Reset();
}
}

View File

@@ -0,0 +1,156 @@
using HaDocument.Models;
using System.Collections.Generic;
using HaXMLReader.EvArgs;
using HaXMLReader.Interfaces;
using System;
namespace HaDocument.Reactors
{
class TraditionsReactor : Reactor
{
internal Dictionary<string, Tradition> CreatedInstances;
internal Dictionary<string, Dictionary<string, HashSet<string>>> CreatedStructure;
internal Dictionary<string, List<Hand>> CreatedHands;
private bool _normalizeWhitespace = false;
// State
private string Index = "";
private string _page = "";
private string _line = "";
private List<Hand> _hands;
private string _person = "";
private string _handstartpg = "";
private string _handstartln = "";
private ElementStringBinder _element = null;
internal TraditionsReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base(reader, lib)
{
_normalizeWhitespace = normalizeWhitespace;
_lib.Traditions = new Dictionary<string, Tradition>();
if (lib.LetterPageLines == null)
lib.LetterPageLines = new Dictionary<string, Dictionary<string, HashSet<string>>>();
if (lib.Hands == null)
lib.Hands = new Dictionary<string, List<Hand>>();
CreatedHands = lib.Hands;
CreatedInstances = _lib.Traditions;
CreatedStructure = lib.LetterPageLines;
reader.Tag += Listen;
}
protected override void Listen(object sender, Tag tag)
{
if (!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "letterTradition" &&
!String.IsNullOrWhiteSpace(tag["ref"])
)
{
Activate(_reader, tag);
}
else if (
!tag.EndTag &&
_active &&
tag.Name == "ZHText"
)
{
if (!CreatedStructure.ContainsKey(tag["index"]))
this.CreatedStructure.Add(tag["index"], new Dictionary<string, HashSet<string>>());
}
else if (
!tag.EndTag &&
_active &&
tag.Name == "line" &&
!String.IsNullOrWhiteSpace(tag["index"])
)
{
_line = tag["index"];
if (!CreatedStructure[Index][_page].Contains(_line))
{
CreatedStructure[Index][_page].Add(_line);
}
}
else if (
!tag.EndTag &&
_active &&
tag.Name == "page" &&
!String.IsNullOrWhiteSpace(tag["index"])
)
{
_page = tag["index"];
if (!CreatedStructure[Index].ContainsKey(_page))
{
CreatedStructure[Index].Add(_page, new HashSet<string>());
}
}
else if (
_active &&
!tag.EndTag &&
!tag.IsEmpty &&
tag.Name == "hand" &&
!String.IsNullOrWhiteSpace(tag["ref"])
)
{
_person = tag["ref"];
_handstartln = _line;
_handstartpg = _page;
}
else if (
_active &&
tag.EndTag &&
tag.Name == "hand"
)
{
if (_hands == null)
_hands = new List<Hand>();
_hands.Add(new Hand(Index, _person, _handstartpg, _handstartln, _page, _line));
}
}
protected override void Activate(IReader reader, Tag tag)
{
if (!_active && reader != null && tag != null)
{
_active = true;
Index = tag["ref"];
_element = new ElementStringBinder(reader, tag, Add, _normalizeWhitespace);
}
}
private void Add(string element)
{
if (String.IsNullOrWhiteSpace(element)) return;
var reason = new Tradition(
Index,
element);
CreatedInstances.TryAdd(Index, reason);
if (_hands != null)
{
if (!CreatedHands.ContainsKey(Index))
CreatedHands.Add(Index, _hands);
else
CreatedHands[Index].AddRange(_hands);
}
Reset();
}
protected override void Reset()
{
Index = "";
_page = "";
_line = "";
_active = false;
_element = null;
_hands = null;
}
protected void Deactivate()
{
_element.Unsubscribe();
Reset();
}
}
}

454
Archive/HaInformator/.gitignore vendored Normal file
View File

@@ -0,0 +1,454 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -0,0 +1,172 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
namespace HaInformator
{
public class AttrValSelection
{
private static ListBox _attrLView;
private static ListBox _valLView;
private static GroupBox _gBox;
private static ContextMenuSelection _cMenuSelection;
private static SelectionState _state;
private static AttributeTree _currAttributeTree;
public AttrValSelection(ListBox attrLView,
ListBox valLview,
GroupBox gBox,
ContextMenuSelection contextMenuSelection)
{
_attrLView = attrLView;
_valLView = valLview;
_gBox = gBox;
_cMenuSelection = contextMenuSelection;
_attrLView.MouseDown += new MouseEventHandler(_attrLView_Select);
_valLView.MouseDown += new MouseEventHandler(_valLView_Select);
_cMenuSelection.aNewBtn_Click =_aAddAttributeBtn_Click;
_cMenuSelection.aEditBtn_Click = _aEditBtn_Click;
_cMenuSelection.aDeleteBtn_Click = _aDeleteBtn_Click;
_cMenuSelection.vEditBtn_Click = _vEditBtn_Click;
}
private void _aAddAttributeBtn_Click(object sender, EventArgs e)
{
AddAttribute();
}
public void AddAttribute()
{
var str = "name";
var value = "wert";
if (_cMenuSelection.ShowDoubleInputDialog(ref str, ref value) == DialogResult.OK)
_state.AddAttribute(str, value);
Load(_state);
}
private void _aEditBtn_Click(object sender, EventArgs e)
{
EditAttribute();
}
private void EditAttribute()
{
var str = (String)_attrLView.SelectedItem;
if (_cMenuSelection.ShowInputDialog(ref str) == DialogResult.OK)
_state.EditAttribute((String)_attrLView.SelectedItem, str);
Load(_state);
}
private void _vEditBtn_Click(object sender, EventArgs e)
{
EditValue();
}
private void EditValue()
{
var str = (String)_valLView.SelectedItem;
if (_cMenuSelection.ShowInputDialog(ref str) == DialogResult.OK)
_state.EditValue((String)_attrLView.SelectedItem, (String)_valLView.SelectedItem, str);
Load(_state);
}
private void _aDeleteBtn_Click(object sender, EventArgs e)
{
RemoveAttribute();
}
private void RemoveAttribute()
{
_state.RemoveAttribute((string)_attrLView.SelectedItem);
Load(_state);
}
private void _attrLView_Select(object sender, MouseEventArgs e)
{
var node = _attrLView.IndexFromPoint(new System.Drawing.Point(e.X, e.Y));
if (node == -1)
{
_valLView.Items.Clear();
return;
}
else
_attrLView.SelectedIndex = node;
_update_valLView();
if (e.Button == MouseButtons.Right)
_attrLView.ContextMenuStrip = _cMenuSelection.Open(cMenuState.aView);
}
private void _valLView_Select(object sender, MouseEventArgs e)
{
var node = _valLView.IndexFromPoint(new System.Drawing.Point(e.X, e.Y));
if (node == null || node == -1)
{
return;
}
else
_valLView.SelectedIndex = node;
if (e.Button == MouseButtons.Right && _valLView.Items.Count > 0)
_valLView.ContextMenuStrip = _cMenuSelection.Open(cMenuState.vView);
}
public void Load(SelectionState state, string description = "")
{
_state = state;
_currAttributeTree = _state.GetAttributeTree();
if (!String.IsNullOrWhiteSpace(description))
_gBox.Text = description;
_draw();
}
private void _draw()
{
_update_attrLView();
_update_valLView();
}
private void _update_attrLView()
{
_attrLView.Items.Clear();
if (_currAttributeTree != null && _currAttributeTree.Any())
_attrLView.Items.AddRange(_currAttributeTree.Keys());
if (_attrLView.Items.Count > 0)
{
_attrLView.Enabled = true;
_attrLView.SelectedIndex = 0;
}
else
_attrLView.Enabled = false;
_attrLView.Update();
}
private void _update_valLView()
{
_valLView.Items.Clear();
if (_currAttributeTree != null && _attrLView.Items.Count > 0)
_valLView.Items.AddRange(_currAttributeTree.GetValue((String)_attrLView.SelectedItem).Keys.ToArray());
if (_valLView.Items.Count > 0)
{
_valLView.Enabled = true;
}
else
_valLView.Enabled = false;
_valLView.Update();
}
}
}

View File

@@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace HaInformator
{
public class AttributeTree
{
private Dictionary<string, Dictionary<string, HashSet<XAttribute>>> _Attributes;
public void AddAttribute(XAttribute attribute)
{
if (_Attributes == null)
_Attributes = new Dictionary<string, Dictionary<string, HashSet<XAttribute>>>();
if (!_Attributes.ContainsKey(attribute.Name.ToString()))
_Attributes.Add(attribute.Name.ToString(), new Dictionary<string, HashSet<XAttribute>>());
if (!_Attributes[attribute.Name.ToString()].ContainsKey(attribute.Value))
_Attributes[attribute.Name.ToString()].Add(attribute.Value, new HashSet<XAttribute>());
if (!_Attributes[attribute.Name.ToString()][attribute.Value].Contains(attribute))
_Attributes[attribute.Name.ToString()][attribute.Value].Add(attribute);
}
public Dictionary<string, Dictionary<string, HashSet<XAttribute>>> GetData()
=> _Attributes;
public void AddAttribute(AttributeTree attributes)
{
if (attributes == null || attributes.GetData() == null)
return;
foreach (var aname in attributes.GetData())
foreach (var aval in aname.Value)
foreach (var aindiv in aval.Value)
AddAttribute(aindiv);
}
public void RemoveAttribute(string name)
{
if (_Attributes == null ||
!_Attributes.ContainsKey(name))
return;
foreach (var val in _Attributes[name])
foreach (var attr in val.Value)
attr.Remove();
_Attributes.Remove(name);
}
public void EditValue(string attr, string source, string target)
{
if (_Attributes == null ||
!_Attributes.ContainsKey(attr) ||
!_Attributes[attr].ContainsKey(source) ||
source == target)
return;
foreach (var a in _Attributes[attr][source])
a.Value = target;
}
public string[] Keys()
=> _Attributes.Keys.ToArray();
public bool Any()
{
if (_Attributes == null || !_Attributes.Any())
return false;
return true;
}
public Dictionary<string, HashSet<XAttribute>> GetValue(string name)
{
if (_Attributes == null || !_Attributes.ContainsKey(name))
return null;
return _Attributes[name];
}
}
}

View File

@@ -0,0 +1,292 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
namespace HaInformator
{
public enum cMenuState
{
None,
tView,
lView,
aView,
vView
}
public class ContextMenuSelection
{
private static Dictionary<cMenuState, List<ToolStripItem>> _groups;
public Action<object, EventArgs> tNewBtn_Click
{
set
{
_cMenu.Items["tNewBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> tEditBtn_Click
{
set
{
_cMenu.Items["tEditBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> tAddAttributeBtn_Click
{
set
{
_cMenu.Items["tAddAttributeBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> tDeleteBtn_Click
{
set
{
_cMenu.Items["tDeleteBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> tDeleteNodeKeepContentBtn_Click
{
set
{
_cMenu.Items["tDeleteNodeKeepContentBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> tSaveBtn_Click
{
set
{
_cMenu.Items["tSaveBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> lEditBtn_Click
{
set
{
_cMenu.Items["lEditBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> lAddAttributeBtn_Click
{
set
{
_cMenu.Items["lAddAttributeBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> lDeleteBtn_Click
{
set
{
_cMenu.Items["lDeleteBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> lDeleteNodeKeepContentBtn_Click
{
set
{
_cMenu.Items["lDeleteNodeKeepContentBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> aNewBtn_Click
{
set
{
_cMenu.Items["aNewBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> aEditBtn_Click
{
set
{
_cMenu.Items["aEditBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> aDeleteBtn_Click
{
set
{
_cMenu.Items["aDeleteBtn"].Click += new EventHandler(value);
}
}
public Action<object, EventArgs> vEditBtn_Click
{
set
{
_cMenu.Items["vEditBtn"].Click += new EventHandler(value);
}
}
private static ContextMenuStrip _cMenu;
private static cMenuState _currState;
public ContextMenuSelection(ContextMenuStrip cMenu)
{
_cMenu = cMenu;
_createGroups();
}
private void _createGroups()
{
_groups = new Dictionary<cMenuState, List<ToolStripItem>>(5);
_groups.Add(
cMenuState.tView,
new List<ToolStripItem>()
{
_cMenu.Items["tHeader"],
_cMenu.Items["tNewBtn"], //
_cMenu.Items["tEditBtn"], //
_cMenu.Items["tAddAttributeBtn"], //
_cMenu.Items["tDeleteBtn"], //
// _cMenu.Items["tDeleteNodeKeepContentBtn"],
_cMenu.Items["tSaveBtn"]
}
);
_groups.Add(
cMenuState.lView,
new List<ToolStripItem>()
{
_cMenu.Items["lheader"],
_cMenu.Items["lEditBtn"], //
_cMenu.Items["lAddAttributeBtn"], //
_cMenu.Items["lDeleteBtn"], //
// _cMenu.Items["lDeleteNodeKeepContentBtn"] //
}
);
_groups.Add(
cMenuState.aView,
new List<ToolStripItem>()
{
_cMenu.Items["aheader"],
_cMenu.Items["aNewBtn"], //
_cMenu.Items["aEditBtn"], //
_cMenu.Items["aDeleteBtn"] //
}
);
_groups.Add(
cMenuState.vView,
new List<ToolStripItem>()
{
_cMenu.Items["vHeader"],
_cMenu.Items["vEditBtn"] //
}
);
}
public ContextMenuStrip Open(cMenuState state)
{
foreach (var i in _cMenu.Items)
{
var it = (ToolStripItem)i;
if (_groups[state].Contains(i))
it.Enabled = true;
else
it.Enabled = false;
}
return _cMenu;
}
public DialogResult ShowInputDialog(ref string input, string title = "")
{
System.Drawing.Size size = new System.Drawing.Size(200, 70);
Form inputBox = new Form();
inputBox.Text = title;
inputBox.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
inputBox.ClientSize = size;
System.Windows.Forms.TextBox textBox = new TextBox();
textBox.Size = new System.Drawing.Size(size.Width - 10, 23);
textBox.Location = new System.Drawing.Point(5, 5);
textBox.Text = input;
inputBox.Controls.Add(textBox);
Button okButton = new Button();
okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
okButton.Name = "okButton";
okButton.Size = new System.Drawing.Size(75, 23);
okButton.Text = "&OK";
okButton.Location = new System.Drawing.Point(size.Width - 80 - 80, 39);
inputBox.Controls.Add(okButton);
Button cancelButton = new Button();
cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
cancelButton.Name = "cancelButton";
cancelButton.Size = new System.Drawing.Size(75, 23);
cancelButton.Text = "&Cancel";
cancelButton.Location = new System.Drawing.Point(size.Width - 80, 39);
inputBox.Controls.Add(cancelButton);
inputBox.AcceptButton = okButton;
inputBox.CancelButton = cancelButton;
DialogResult result = inputBox.ShowDialog();
input = textBox.Text;
return result;
}
public DialogResult ShowDoubleInputDialog(ref string input, ref string value, string title = "")
{
System.Drawing.Size size = new System.Drawing.Size(200, 95);
Form inputBox = new Form();
inputBox.Text = title;
inputBox.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
inputBox.ClientSize = size;
System.Windows.Forms.TextBox textBox = new TextBox();
textBox.Size = new System.Drawing.Size(size.Width - 10, 23);
textBox.Location = new System.Drawing.Point(5, 5);
textBox.Text = input;
inputBox.Controls.Add(textBox);
System.Windows.Forms.TextBox textBox2 = new TextBox();
textBox2.Size = new System.Drawing.Size(size.Width - 10, 23);
textBox2.Location = new System.Drawing.Point(5, 33);
textBox2.Text = input;
inputBox.Controls.Add(textBox2);
Button okButton = new Button();
okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
okButton.Name = "okButton";
okButton.Size = new System.Drawing.Size(75, 23);
okButton.Text = "&OK";
okButton.Location = new System.Drawing.Point(size.Width - 80 - 80, 58);
inputBox.Controls.Add(okButton);
Button cancelButton = new Button();
cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
cancelButton.Name = "cancelButton";
cancelButton.Size = new System.Drawing.Size(75, 23);
cancelButton.Text = "&Cancel";
cancelButton.Location = new System.Drawing.Point(size.Width - 80, 58);
inputBox.Controls.Add(cancelButton);
inputBox.AcceptButton = okButton;
inputBox.CancelButton = cancelButton;
DialogResult result = inputBox.ShowDialog();
input = textBox.Text;
value = textBox2.Text;
return result;
}
public DialogResult ShowSaveFileDialog(ref string path)
{
SaveFileDialog sFileD = new SaveFileDialog();
sFileD.DefaultExt = "xml";
sFileD.Filter = "XML-Datei|*.xml";
var res = sFileD.ShowDialog();
path = sFileD.FileName;
return res;
}
}
}

View File

@@ -0,0 +1,180 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HaInformator
{
public class ElementSelection
{
private static TreeView _tView;
private static TreeNodeCollection _trees;
private static ListBox _lView;
private static AttrValSelection _attrValSelection;
private static ContextMenuSelection _cMenuSelection;
private static FlatCollection _flats; // Liste aller Elemente
private SelectionState _state; // Ausgewählte BaumElemente
public ElementSelection(TreeView tView,
ListBox lView,
AttrValSelection selection,
ContextMenuSelection cMenuSelection)
{
_tView = tView;
_lView = lView;
_trees = tView.Nodes;
_attrValSelection = selection;
_cMenuSelection = cMenuSelection;
_tView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this._tView_Select);
_lView.MouseDown += new MouseEventHandler(this._lView_Select);
_cMenuSelection.tNewBtn_Click = _tNewBtn_Click;
_cMenuSelection.tEditBtn_Click = _tEditBtn_Click;
_cMenuSelection.tAddAttributeBtn_Click = _tlAddAttributeBtn_Click;
_cMenuSelection.tDeleteBtn_Click = _tlDeleteBtn_Click;
_cMenuSelection.tSaveBtn_Click = _tSaveBtn_Click;
_cMenuSelection.lEditBtn_Click = _lEditBtn_Click;
_cMenuSelection.lAddAttributeBtn_Click = _tlAddAttributeBtn_Click;
_cMenuSelection.lDeleteBtn_Click = _tlDeleteBtn_Click;
}
private void _tSaveBtn_Click(object sender, EventArgs e)
{
string filepath = "";
if (_cMenuSelection.ShowSaveFileDialog(ref filepath) == DialogResult.OK)
_state.SaveTree(filepath);
}
private void _tEditBtn_Click(object sender, EventArgs e)
{
_ = _EditBtnClick();
_tView_Select((Tree)_tView.SelectedNode);
}
private void _lEditBtn_Click(object sender, EventArgs e)
{
var ret = _EditBtnClick();
_lView_Select(ret);
}
private string _EditBtnClick()
{
_tView.LabelEdit = true;
var str = _state.Name;
if (_cMenuSelection.ShowInputDialog(ref str, "Tag <" + _state.Name + "> bearbeiten") == DialogResult.OK)
_state.ChangeName(str);
_tView.LabelEdit = false;
_lView_Draw();
return str;
}
private void _tlAddAttributeBtn_Click(object sender, EventArgs e)
{
_AddAttributeBtn_Click();
}
private void _AddAttributeBtn_Click()
{
_tView.LabelEdit = true;
_attrValSelection.AddAttribute();
_tView.LabelEdit = false;
}
private void _tlDeleteBtn_Click(object sender, EventArgs e)
{
_tView.LabelEdit = true;
_state.RemoveElement();
_tView.LabelEdit = false;
_lView_Draw();
}
private void _tNewBtn_Click(object sender, EventArgs e)
{
_tView.LabelEdit = true;
var str = "";
if (_cMenuSelection.ShowInputDialog(ref str, "Neuen Tag unter <" + _state.Name + "> einfügen" ) == DialogResult.OK)
_state.AddElement(str, "");
_tView.LabelEdit = false;
_lView_Draw();
}
private void _lView_Draw()
{
_lView.Items.Clear();
_flats = new FlatCollection(_trees);
if (_flats.Keys() != null)
_lView.Items.AddRange(_flats.Keys());
}
private void _tView_Select(object sender, TreeNodeMouseClickEventArgs e)
{
_tView.SelectedNode = e.Node;
_tView_Select((Tree)e.Node);
if (e.Button == MouseButtons.Right)
e.Node.ContextMenuStrip = _cMenuSelection.Open(cMenuState.tView);
}
private void _lView_Select(object sender, MouseEventArgs e)
{
var node = _lView.IndexFromPoint(new Point(e.X, e.Y));
if (node == -1)
return;
//if (node != _lView.SelectedIndex)
_lView_Select((String)_lView.Items[node]);
if (e.Button == MouseButtons.Right)
_lView.ContextMenuStrip = _cMenuSelection.Open(cMenuState.lView);
}
private void _tView_Select(Tree tree)
{
_lView.ClearSelected();
if (_state != null)
_state.Unmark();
var desc = "Arribute von " + _tView.SelectedNode.Text.ToUpper() + "-Tags in " + _tView.SelectedNode.FullPath;
_state = new SelectionState(tree);
_selectNode(desc);
}
private void _lView_Select(string sItem)
{
_lView.SelectedItem = sItem;
_tView.CollapseAll();
if (_state != null)
_state.Unmark();
_tView.BeginUpdate();
_state = new SelectionState(_flats.GetTrees(sItem));
_tView.EndUpdate();
_selectNode("Atrribute aller " + sItem + "-Tags");
_state.Mark();
}
public void Load(Tree tree)
{
_state = null;
_trees.Add(tree);
_lView_Draw();
}
private void _selectNode(string desc)
{
_attrValSelection.Load(_state, desc);
}
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HaInformator
{
public class FlatCollection
{
private Dictionary<string, HashSet<Tree>> _FlatCollection;
public FlatCollection(Tree tree)
{
_addToCollection(tree);
}
public FlatCollection(TreeNodeCollection coll)
{
foreach (var t in coll) _addToCollection((Tree)t);
}
private void _addToCollection(Tree tree)
{
if (_FlatCollection == null)
_FlatCollection = new Dictionary<string, HashSet<Tree>>();
if (!_FlatCollection.ContainsKey(tree.Name))
_FlatCollection.Add(tree.Name, new HashSet<Tree>());
if (!_FlatCollection[tree.Name].Contains(tree))
_FlatCollection[tree.Name].Add(tree);
foreach (var t in tree.Nodes)
_addToCollection((Tree)t);
}
public string[] Keys()
{
if (_FlatCollection == null)
return null;
return _FlatCollection.Keys.ToArray();
}
public HashSet<Tree> GetTrees(string key)
{
if (!_FlatCollection.ContainsKey(key))
return null;
else
return _FlatCollection[key];
}
}
}

569
Archive/HaInformator/Form1.Designer.cs generated Normal file
View File

@@ -0,0 +1,569 @@
namespace HaInformator
{
partial class HaProgram
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HaProgram));
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.saveLogDialog = new System.Windows.Forms.SaveFileDialog();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.ArribValDesc = new System.Windows.Forms.GroupBox();
this.AttrList = new System.Windows.Forms.ListBox();
this.ValList = new System.Windows.Forms.ListBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.NodeList = new System.Windows.Forms.ListBox();
this.NodeTree = new System.Windows.Forms.TreeView();
this.GoBtn = new System.Windows.Forms.Button();
this.SaveLogBtn = new System.Windows.Forms.Button();
this.LogBox = new System.Windows.Forms.TextBox();
this.InFileBtn = new System.Windows.Forms.Button();
this.InFilepath = new System.Windows.Forms.TextBox();
this.Description = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.footerStatusText = new System.Windows.Forms.ToolStripStatusLabel();
this.cMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tHeader = new System.Windows.Forms.ToolStripTextBox();
this.tNewBtn = new System.Windows.Forms.ToolStripMenuItem();
this.tEditBtn = new System.Windows.Forms.ToolStripMenuItem();
this.tAddAttributeBtn = new System.Windows.Forms.ToolStripMenuItem();
this.tDeleteBtn = new System.Windows.Forms.ToolStripMenuItem();
this.tDeleteNodeKeepContentBtn = new System.Windows.Forms.ToolStripMenuItem();
this.tSaveBtn = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.lHeader = new System.Windows.Forms.ToolStripTextBox();
this.lEditBtn = new System.Windows.Forms.ToolStripMenuItem();
this.lAddAttributeBtn = new System.Windows.Forms.ToolStripMenuItem();
this.lDeleteBtn = new System.Windows.Forms.ToolStripMenuItem();
this.lDeleteNodeKeepContentBtn = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.aHeader = new System.Windows.Forms.ToolStripTextBox();
this.aNewBtn = new System.Windows.Forms.ToolStripMenuItem();
this.aEditBtn = new System.Windows.Forms.ToolStripMenuItem();
this.aDeleteBtn = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.vHeader = new System.Windows.Forms.ToolStripTextBox();
this.vEditBtn = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox1.SuspendLayout();
this.ArribValDesc.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.cMenu.SuspendLayout();
this.SuspendLayout();
//
// openFileDialog
//
this.openFileDialog.DefaultExt = "xml";
this.openFileDialog.FileName = "openFile";
this.openFileDialog.Filter = "XML-Dateien|*.xml";
//
// saveLogDialog
//
this.saveLogDialog.DefaultExt = "log";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.ArribValDesc);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.NodeList);
this.groupBox1.Controls.Add(this.NodeTree);
this.groupBox1.Location = new System.Drawing.Point(15, 306);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Size = new System.Drawing.Size(1283, 658);
this.groupBox1.TabIndex = 10;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Analyse und Bearbeitung";
//
// ArribValDesc
//
this.ArribValDesc.Controls.Add(this.AttrList);
this.ArribValDesc.Controls.Add(this.ValList);
this.ArribValDesc.Location = new System.Drawing.Point(675, 18);
this.ArribValDesc.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ArribValDesc.Name = "ArribValDesc";
this.ArribValDesc.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ArribValDesc.Size = new System.Drawing.Size(596, 631);
this.ArribValDesc.TabIndex = 8;
this.ArribValDesc.TabStop = false;
this.ArribValDesc.Text = "Attribute und Werte";
//
// AttrList
//
this.AttrList.Enabled = false;
this.AttrList.FormattingEnabled = true;
this.AttrList.ItemHeight = 16;
this.AttrList.Location = new System.Drawing.Point(8, 52);
this.AttrList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.AttrList.Name = "AttrList";
this.AttrList.Size = new System.Drawing.Size(579, 148);
this.AttrList.Sorted = true;
this.AttrList.TabIndex = 1;
//
// ValList
//
this.ValList.Enabled = false;
this.ValList.FormattingEnabled = true;
this.ValList.ItemHeight = 16;
this.ValList.Location = new System.Drawing.Point(8, 203);
this.ValList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ValList.Name = "ValList";
this.ValList.Size = new System.Drawing.Size(579, 420);
this.ValList.Sorted = true;
this.ValList.TabIndex = 2;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(357, 18);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(136, 17);
this.label2.TabIndex = 5;
this.label2.Text = "Tags - Listenansicht";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(4, 20);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(134, 17);
this.label1.TabIndex = 4;
this.label1.Text = "Tags - Baumansicht";
//
// NodeList
//
this.NodeList.FormattingEnabled = true;
this.NodeList.ItemHeight = 16;
this.NodeList.Location = new System.Drawing.Point(361, 39);
this.NodeList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.NodeList.Name = "NodeList";
this.NodeList.Size = new System.Drawing.Size(304, 612);
this.NodeList.Sorted = true;
this.NodeList.TabIndex = 3;
//
// NodeTree
//
this.NodeTree.FullRowSelect = true;
this.NodeTree.Indent = 24;
this.NodeTree.Location = new System.Drawing.Point(8, 38);
this.NodeTree.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.NodeTree.Name = "NodeTree";
this.NodeTree.Size = new System.Drawing.Size(344, 611);
this.NodeTree.TabIndex = 0;
//
// GoBtn
//
this.GoBtn.Dock = System.Windows.Forms.DockStyle.Left;
this.GoBtn.Location = new System.Drawing.Point(1095, 270);
this.GoBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.GoBtn.Name = "GoBtn";
this.GoBtn.Size = new System.Drawing.Size(203, 28);
this.GoBtn.TabIndex = 8;
this.GoBtn.Text = "Go";
this.GoBtn.UseVisualStyleBackColor = true;
this.GoBtn.Click += new System.EventHandler(this.GoBtn_Click);
//
// SaveLogBtn
//
this.SaveLogBtn.Enabled = false;
this.SaveLogBtn.Location = new System.Drawing.Point(871, 270);
this.SaveLogBtn.Margin = new System.Windows.Forms.Padding(860, 4, 4, 4);
this.SaveLogBtn.Name = "SaveLogBtn";
this.SaveLogBtn.Size = new System.Drawing.Size(216, 28);
this.SaveLogBtn.TabIndex = 7;
this.SaveLogBtn.Text = "Log speichern...";
this.SaveLogBtn.UseVisualStyleBackColor = true;
this.SaveLogBtn.Click += new System.EventHandler(this.SaveLogBtn_Click);
//
// LogBox
//
this.LogBox.AcceptsReturn = true;
this.LogBox.AcceptsTab = true;
this.LogBox.BackColor = System.Drawing.SystemColors.MenuText;
this.LogBox.Font = new System.Drawing.Font("Lucida Console", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.LogBox.ForeColor = System.Drawing.SystemColors.Window;
this.LogBox.Location = new System.Drawing.Point(15, 67);
this.LogBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LogBox.MaxLength = 1000000;
this.LogBox.Multiline = true;
this.LogBox.Name = "LogBox";
this.LogBox.Size = new System.Drawing.Size(1281, 195);
this.LogBox.TabIndex = 6;
this.LogBox.Text = "Log";
this.LogBox.TextChanged += new System.EventHandler(this.LogBox_TextChanged);
//
// InFileBtn
//
this.InFileBtn.Location = new System.Drawing.Point(1146, 31);
this.InFileBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.InFileBtn.Name = "InFileBtn";
this.InFileBtn.Size = new System.Drawing.Size(149, 28);
this.InFileBtn.TabIndex = 2;
this.InFileBtn.Text = "Durchsuchen...";
this.InFileBtn.UseVisualStyleBackColor = true;
this.InFileBtn.Click += new System.EventHandler(this.InFileBtn_Click);
//
// InFilepath
//
this.InFilepath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.InFilepath.Dock = System.Windows.Forms.DockStyle.Bottom;
this.InFilepath.Location = new System.Drawing.Point(15, 37);
this.InFilepath.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.InFilepath.Name = "InFilepath";
this.InFilepath.ReadOnly = true;
this.InFilepath.Size = new System.Drawing.Size(1123, 22);
this.InFilepath.TabIndex = 1;
this.InFilepath.Text = "XML-Datei";
//
// Description
//
this.Description.AutoSize = true;
this.Description.Location = new System.Drawing.Point(15, 10);
this.Description.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.Description.MinimumSize = new System.Drawing.Size(1283, 0);
this.Description.Name = "Description";
this.Description.Size = new System.Drawing.Size(1283, 17);
this.Description.TabIndex = 9;
this.Description.Text = "Beschreibung";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoSize = true;
this.flowLayoutPanel1.Controls.Add(this.Description);
this.flowLayoutPanel1.Controls.Add(this.InFilepath);
this.flowLayoutPanel1.Controls.Add(this.InFileBtn);
this.flowLayoutPanel1.Controls.Add(this.LogBox);
this.flowLayoutPanel1.Controls.Add(this.SaveLogBtn);
this.flowLayoutPanel1.Controls.Add(this.GoBtn);
this.flowLayoutPanel1.Controls.Add(this.groupBox1);
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel1.MaximumSize = new System.Drawing.Size(1360, 966);
this.flowLayoutPanel1.MinimumSize = new System.Drawing.Size(1333, 966);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(11, 10, 11, 10);
this.flowLayoutPanel1.Size = new System.Drawing.Size(1333, 966);
this.flowLayoutPanel1.TabIndex = 0;
//
// statusStrip1
//
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.footerStatusText});
this.statusStrip1.Location = new System.Drawing.Point(0, 956);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
this.statusStrip1.Size = new System.Drawing.Size(1309, 26);
this.statusStrip1.SizingGrip = false;
this.statusStrip1.TabIndex = 1;
this.statusStrip1.Text = "statusStrip1";
//
// footerStatusText
//
this.footerStatusText.Name = "footerStatusText";
this.footerStatusText.Size = new System.Drawing.Size(48, 20);
this.footerStatusText.Text = "Bereit";
//
// cMenu
//
this.cMenu.BackColor = System.Drawing.SystemColors.Control;
this.cMenu.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tHeader,
this.tNewBtn,
this.tEditBtn,
this.tAddAttributeBtn,
this.tDeleteBtn,
this.tDeleteNodeKeepContentBtn,
this.tSaveBtn,
this.toolStripSeparator1,
this.lHeader,
this.lEditBtn,
this.lAddAttributeBtn,
this.lDeleteBtn,
this.lDeleteNodeKeepContentBtn,
this.toolStripSeparator2,
this.aHeader,
this.aNewBtn,
this.aEditBtn,
this.aDeleteBtn,
this.toolStripSeparator3,
this.vHeader,
this.vEditBtn});
this.cMenu.Name = "cMenu";
this.cMenu.ShowImageMargin = false;
this.cMenu.ShowItemToolTips = false;
this.cMenu.Size = new System.Drawing.Size(261, 450);
//
// tHeader
//
this.tHeader.BackColor = System.Drawing.SystemColors.Control;
this.tHeader.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tHeader.Enabled = false;
this.tHeader.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.tHeader.ForeColor = System.Drawing.SystemColors.ControlText;
this.tHeader.Margin = new System.Windows.Forms.Padding(3, 2, 2, 1);
this.tHeader.Name = "tHeader";
this.tHeader.ReadOnly = true;
this.tHeader.Size = new System.Drawing.Size(190, 20);
this.tHeader.Text = "Aktionen im Baum";
//
// tNewBtn
//
this.tNewBtn.Enabled = false;
this.tNewBtn.Name = "tNewBtn";
this.tNewBtn.Size = new System.Drawing.Size(260, 24);
this.tNewBtn.Text = "Neu...";
//
// tEditBtn
//
this.tEditBtn.Enabled = false;
this.tEditBtn.Name = "tEditBtn";
this.tEditBtn.Size = new System.Drawing.Size(260, 24);
this.tEditBtn.Text = "Bearbeiten...";
//
// tAddAttributeBtn
//
this.tAddAttributeBtn.Enabled = false;
this.tAddAttributeBtn.Name = "tAddAttributeBtn";
this.tAddAttributeBtn.Size = new System.Drawing.Size(260, 24);
this.tAddAttributeBtn.Text = "Attribut hinzufügen...";
//
// tDeleteBtn
//
this.tDeleteBtn.Enabled = false;
this.tDeleteBtn.Name = "tDeleteBtn";
this.tDeleteBtn.Size = new System.Drawing.Size(260, 24);
this.tDeleteBtn.Text = "Knoten löschen";
//
// tDeleteNodeKeepContentBtn
//
this.tDeleteNodeKeepContentBtn.Enabled = false;
this.tDeleteNodeKeepContentBtn.Name = "tDeleteNodeKeepContentBtn";
this.tDeleteNodeKeepContentBtn.Size = new System.Drawing.Size(260, 24);
this.tDeleteNodeKeepContentBtn.Text = "Knoten löschen, Inhalt behalten";
//
// tSaveBtn
//
this.tSaveBtn.Enabled = false;
this.tSaveBtn.Name = "tSaveBtn";
this.tSaveBtn.Size = new System.Drawing.Size(260, 24);
this.tSaveBtn.Text = "Knoten als Datei speichern...";
this.tSaveBtn.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(257, 6);
//
// lHeader
//
this.lHeader.BackColor = System.Drawing.SystemColors.Control;
this.lHeader.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.lHeader.Enabled = false;
this.lHeader.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.lHeader.ForeColor = System.Drawing.SystemColors.ControlText;
this.lHeader.Margin = new System.Windows.Forms.Padding(3, 2, 2, 1);
this.lHeader.Name = "lHeader";
this.lHeader.ReadOnly = true;
this.lHeader.Size = new System.Drawing.Size(190, 20);
this.lHeader.Text = "Aktionen in der Liste";
//
// lEditBtn
//
this.lEditBtn.Enabled = false;
this.lEditBtn.Name = "lEditBtn";
this.lEditBtn.Size = new System.Drawing.Size(260, 24);
this.lEditBtn.Text = "Bearbeiten...";
//
// lAddAttributeBtn
//
this.lAddAttributeBtn.Enabled = false;
this.lAddAttributeBtn.Name = "lAddAttributeBtn";
this.lAddAttributeBtn.Size = new System.Drawing.Size(260, 24);
this.lAddAttributeBtn.Text = "Attribut hinzufügen...";
//
// lDeleteBtn
//
this.lDeleteBtn.Enabled = false;
this.lDeleteBtn.Name = "lDeleteBtn";
this.lDeleteBtn.Size = new System.Drawing.Size(260, 24);
this.lDeleteBtn.Text = "Knoten löschen";
//
// lDeleteNodeKeepContentBtn
//
this.lDeleteNodeKeepContentBtn.Enabled = false;
this.lDeleteNodeKeepContentBtn.Name = "lDeleteNodeKeepContentBtn";
this.lDeleteNodeKeepContentBtn.Size = new System.Drawing.Size(260, 24);
this.lDeleteNodeKeepContentBtn.Text = "Knoten löschen, Inhalt behalten";
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(257, 6);
//
// aHeader
//
this.aHeader.BackColor = System.Drawing.SystemColors.Control;
this.aHeader.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.aHeader.Enabled = false;
this.aHeader.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.aHeader.ForeColor = System.Drawing.SystemColors.ControlText;
this.aHeader.Margin = new System.Windows.Forms.Padding(3, 2, 2, 1);
this.aHeader.Name = "aHeader";
this.aHeader.ReadOnly = true;
this.aHeader.Size = new System.Drawing.Size(190, 20);
this.aHeader.Text = "Aktionen in der Attributsliste";
//
// aNewBtn
//
this.aNewBtn.Enabled = false;
this.aNewBtn.Name = "aNewBtn";
this.aNewBtn.Size = new System.Drawing.Size(260, 24);
this.aNewBtn.Text = "Neu...";
//
// aEditBtn
//
this.aEditBtn.Enabled = false;
this.aEditBtn.Name = "aEditBtn";
this.aEditBtn.Size = new System.Drawing.Size(260, 24);
this.aEditBtn.Text = "Bearbeiten...";
//
// aDeleteBtn
//
this.aDeleteBtn.Enabled = false;
this.aDeleteBtn.Name = "aDeleteBtn";
this.aDeleteBtn.Size = new System.Drawing.Size(260, 24);
this.aDeleteBtn.Text = "Löschen";
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(257, 6);
//
// vHeader
//
this.vHeader.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.vHeader.BackColor = System.Drawing.SystemColors.Control;
this.vHeader.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.vHeader.Enabled = false;
this.vHeader.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.vHeader.ForeColor = System.Drawing.SystemColors.ControlText;
this.vHeader.Margin = new System.Windows.Forms.Padding(3, 2, 2, 1);
this.vHeader.Name = "vHeader";
this.vHeader.ReadOnly = true;
this.vHeader.Size = new System.Drawing.Size(190, 20);
this.vHeader.Text = "Aktionen in der Werteliste";
//
// vEditBtn
//
this.vEditBtn.Enabled = false;
this.vEditBtn.Name = "vEditBtn";
this.vEditBtn.Size = new System.Drawing.Size(260, 24);
this.vEditBtn.Text = "Bearbeiten...";
//
// HaProgram
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1309, 982);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(1327, 1029);
this.MinimumSize = new System.Drawing.Size(1327, 1029);
this.Name = "HaProgram";
this.Text = "HaProgram";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ArribValDesc.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.cMenu.ResumeLayout(false);
this.cMenu.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.SaveFileDialog saveLogDialog;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ListBox ValList;
private System.Windows.Forms.ListBox AttrList;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox NodeList;
private System.Windows.Forms.TreeView NodeTree;
private System.Windows.Forms.Button GoBtn;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label Description;
private System.Windows.Forms.TextBox InFilepath;
private System.Windows.Forms.Button InFileBtn;
private System.Windows.Forms.TextBox LogBox;
private System.Windows.Forms.Button SaveLogBtn;
private System.Windows.Forms.GroupBox ArribValDesc;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel footerStatusText;
private System.Windows.Forms.ContextMenuStrip cMenu;
private System.Windows.Forms.ToolStripTextBox tHeader;
private System.Windows.Forms.ToolStripMenuItem tNewBtn;
private System.Windows.Forms.ToolStripMenuItem tEditBtn;
private System.Windows.Forms.ToolStripMenuItem tAddAttributeBtn;
private System.Windows.Forms.ToolStripMenuItem tDeleteBtn;
private System.Windows.Forms.ToolStripMenuItem tDeleteNodeKeepContentBtn;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripTextBox lHeader;
private System.Windows.Forms.ToolStripMenuItem lEditBtn;
private System.Windows.Forms.ToolStripMenuItem lAddAttributeBtn;
private System.Windows.Forms.ToolStripMenuItem lDeleteBtn;
private System.Windows.Forms.ToolStripMenuItem lDeleteNodeKeepContentBtn;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripTextBox aHeader;
private System.Windows.Forms.ToolStripMenuItem aNewBtn;
private System.Windows.Forms.ToolStripMenuItem aEditBtn;
private System.Windows.Forms.ToolStripMenuItem aDeleteBtn;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripTextBox vHeader;
private System.Windows.Forms.ToolStripMenuItem vEditBtn;
private System.Windows.Forms.ToolStripMenuItem tSaveBtn;
}
}

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
namespace HaInformator
{
public partial class HaProgram : Form
{
private static Informate _informate;
public HaProgram()
{
InitializeComponent();
_informate = new Informate(new Logger(LogBox),
NodeTree,
NodeList,
AttrList,
ValList,
ArribValDesc,
cMenu);
Description.Text = _informate.Description;
}
private void InFileBtn_Click(object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() == DialogResult.OK)
InFilepath.Text = openFileDialog.FileName;
}
private void GoBtn_Click(object sender, EventArgs e)
{
GoBtn.Enabled = false;
if (_informate.Act(InFilepath.Text) == HaControl.HaControlResult.OK)
{
}
GoBtn.Enabled = true;
}
private void SaveLogBtn_Click(object sender, EventArgs e)
{
}
private void LogBox_TextChanged(object sender, EventArgs e)
{
}
}
}

View File

@@ -0,0 +1,665 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="saveLogDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>279, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>410, 17</value>
</metadata>
<metadata name="cMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>526, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAZGQAAAEAGACYewAAFgAAACgAAABkAAAAyAAAAAEAGAAAAAAAAAAAAEgAAABIAAAAAAAAAAAA
AAD/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///5+fz///7///7///7///7///7///7///7///7+/v3l5fb+/v7/////////////////////////////
///////////////////////////////////+/v739/z19vv///7///7///7///7///7///7///7///7/
//7///7///7///7v7/n+//7/////////////////////////////////////////////////////////
///////+/v7+/v7+/v7+///+///+///+///+///+///+///+///+///+///+///+///+//7///7///7/
//7///7///7///7+/v7+///+/v7+/v79/v7+/v////7/////////////////////////////////////
//8QELISErQSErQSErQSErQSErQSErQSErQSErQSErMPDrL9/f3+////////////////////////////
///////////////////////////////////8/P1kZM0PD7ISErQSErQSErQSErQSErQSErQSErQSErQS
ErQSErQSErQSErRzc9L+/v3/////////////////////////////////////////////////////////
///////r6/cSErQxML09PME9PME9PME9PME9PME9PME9PME9PME9PME9PME9PME9PME7PMATErQSErQS
ErQSErQSErQSErQrK7o9PMFFRcNnZ82QkdrAwOns7fn/////////////////////////////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAyMr7/////////////////////////////////
///////////////////////////////+/f2SktwIB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLBnZ878/P7/////////////////////////////////////////////////////////////
///////19foWFrQICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAMDLI+PsGJidjj5PX+/v7/////////////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7BLSsX/////////////////////////////////
///////////////////////+///+/v3BwOoNDbEHCLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAHCLBGRsT29/z/////////////////////////////////////////////////////////////////
///////8/f0pKboICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLANDbJmZs7e3/P9/v3/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7BeXsz/////////////////////////////////
/////////////////////////v7i4/QeHrcICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAH
CLBGR8Tz8/r/////////////////////////////////////////////////////////////////////
///////+/v5ISMQICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICK8HB7AICLAHB7AIB7AICLAICLAICLAICLAICLAICLAICLAICLAVFbSgoN/8/P7/////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7CFhdf/////////////////////////////////
///////////////////////39/w8O8AICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAs
LLvn6Pf/////////////////////////////////////////////////////////////////////////
//////////9gX8wHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAGB7BAQMKbmt7IyOzk5Pfk5Pfk
5Pfk5Pfj4/XKyu2wr+R/f9Y/P8EJCLEICLAICLAICLAICLAICLAICLAICLAICLAHB7BwcND7+/3/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHCLCFhdf/////////////////////////////////
///////////////////8/f1kZc0ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLArK7vi
4/T+/v3/////////////////////////////////////////////////////////////////////////
//////////9xctIICLAICLAICLAICLAICLAICLAICLAICLAICLAICLBRUcf7+/3/////////////////
///////////////////////+/v3CwuosLLsICLAICLAICLAICLAICLAICLAICLAICLAHB7BWVsj8/Pz/
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHCLCpqeP/////////////////////////////////
///////////////9/f2VlNwHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAZGbXMze3+
/v7+////////////////////////////////////////////////////////////////////////////
//////////95edQIB7EICLAICLAICLAICLAICLAICLAICLAICLAICLC/v+n+/v7/////////////////
///////////////////////+//////7o6fccHLcICLAICLAICLAICLAICLAICLAICLAICLAHB7B/ftX9
/f0ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7Cvr+X/////////////////////////////////
//////////////7BwusPELIICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAYGbbMze3+/v3/
////////////////////////////////////////////////////////////////////////////////
//////////+bnN4HB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDo6Pb///7/////////////////
//////////////////////////////////+VldwICLAICLAICLAICLAICLAICLAICLAICLAIB7AJCbC6
vOkICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7Cvr+X/////////////////////////////////
///////+//7j4/UeHbcICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAMDbGwsOT9/v7/////
////////////////////////////////////////////////////////////////////////////////
//////////+cnN8IB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////////////09foODrIICLAICLAICLAICLAICLAICLAICLAICLAICLAz
M70ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLDS0e//////////////////////////////////
///////4+PxBQcIICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7Gur+T+/v7/////////
////////////////////////////////////////////////////////////////////////////////
//////////+cnN8IB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////////////9/f02Nb4ICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fL/////////////////////////////////
///+/v+IiNkICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAHCLBqac/9/f3+/v7/////////
////////////////////////////////////////////////////////////////////////////////
//////////+wsOYHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////////////+/v5ZWsoICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP/////////////////////////////////
//+3t+gICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAHCLBpac78/P3/////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
//////////////////////////////////////9aWsoICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////////////////X
2PEcHLYICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7BHR8T19vv/////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
//////////////////////////////////////9aWsoICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////////+/v7z9Poz
Mr0HCLAICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7BEQ8P09fr+////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
//////////////////////////////////////9aWsoICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP//////////////////////v78/P5ZWckH
B7EICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7AuLrzk5fX+/v7/////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////////////+/v5PT8YICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////9/v2Pj9sHB7AI
CLAICLAICLAICLAICLAICLAICLAICLAICLAHB7AqK7vk5PX/////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////////////9/f0sLbsICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP///////////////////+9vOkNDbEICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAbGrbOzu//////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////////////r6/YICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////e3/MfILgICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAYGLXPz+//////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
//////////////////////////////////+rq+MHCLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////+//739/w3N74HCLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAODrKxseb/////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////////+/v5SUscICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////9/v5ZWcoHB7AICLAICLAICLAI
CLAICLAICLAICLAICLAICLAJCLCvr+T/////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////////+/v7LzO4MDLEIB7AICLAICLAICLAICLAICLAICLAICLAICLAIB7Ba
WsoICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////9/f2CgtYHB7AICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLCNjdn9/fz/////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////+/v3z8/o4OL8ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLEgILfk
5vYICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP9/v6io+AICbAHCLAICLAICLAICLAICLAI
CLAICLAICLAICLAHCLCHh9f9/v7+//7/////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////9/v3s7PdERcMICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7EQEbPFxev+
//4ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DY2fK3t+cQEbMICLAICLAICLAICLAICLAICLAI
CLAICLAICLAHCLBnZs38/P3+/v3/////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////+//7+/v729vugoN8gILgICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAhILjJyuz+/v7/
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAcHLYHB7AIB7AICLAICLAICLAICLAICLAICLAI
CLAICLAIB7FeXsv8/f3//v7/////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLB5etSEhdiEhdiEhdiEhdiEhdiE
hdiEhdh5eNNISMQREbMHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAICLBWVsnm5vb+/v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAHB7BKSsX19fr/////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7AnJ7quruT9/fz/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAcHLcHB68ICLAICLAICLAICLAICLAICLAICLAI
CLAzNL319fv+/v7/////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7BFRcOlpuH4+fz///7+//7/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7DW1/GtreUZGbUICLAICLAICLAICLAICLAICLAI
CLAKCrGlpeL+//7/////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAHCLAHCLAHCLAHCLAHCLAHCLAH
CLAICLAHCLAICLAICLAICLAICLAICLAICLAICLAODrKsreT8/f3+/v3+/v7/////////////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////Nze4ZGbYICLAICLAICLAICLAICLAI
CLAICLAKC7G9vun/////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLBoaM9yctJyctJyctJyctJyctJy
ctJeXss1Nb8NDbIICLAICLAICLAICLAICLAICLAHB7AMDLGAgNb29/r+/v7/////////////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////Z2vItLLsICLAICLAICLAICLAI
CLAICLAHCLAUE7TExOv+/v7/////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////k5fZ0dNIJCbAICLAICLAICLAICLAICLAICLAICLBBQMLq6vf+/v3/////////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////k5PYtLbwICLAICLAICLAI
CLAICLAICLAHB7AUFLTExev+/v7/////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////+///+/v6MjdkICLAICLAICLAICLAICLAICLAICLAICLA3N7/r6vb+/v3/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////j4/UtLbsICLAICLAI
CLAICLAICLAICLAHB7ATFLTExev//v7/////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////7/P03N78ICLAICLAICLAICLAICLAICLAICLAICLBISMT4+fz/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////j4/UtLLwICLAI
CLAICLAICLAICLAICLAHB7AVFLSzteb/////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
//////////////////////+Ki9kHB7AICLAICLAICLAICLAICLAICLAICLAICLCHiNj/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////////k5PUqLLsI
CLAICLAICLAICLAICLAICLAICLALC7GkpOH+/v7/////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////CwusHCK8ICLAICLAICLAICLAICLAICLAICLAICLAVFbXo6ff+//7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////////////Ozu8Z
GbYICLAICLAICLAICLAICLAICLAICLALC7GlpeH+/v7/////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////j5PYIB7AICLAICLAICLAICLAICLAICLAICLAICLAICLCKidn+/v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////////////////N
ze4TE7MICLAICLAICLAICLAICLAICLAICLAKCrGPkNv/////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////x8vsIB7AICLAICLAICLAICLAICLAICLAICLAICLAICLBNTcX+/v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////////////////9
/v2vsOQNDbEICLAICLAICLAICLAICLAICLAICLAICLB9fdX/////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////GxewHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////x8vsIB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAqK7v+/v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7DZ2fP////////////////////////////////+
///+/v6np+EHB7AICLAICLAICLAICLAICLAICLAICLAICK9naM74+Pv+/v3/////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////+wsOUICLAICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////x8foHCLAICLAICLAICLAICLAICLAICLAICLAICLAICLApKbv+/v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAICLDY2fL/////////////////////////////////
///+/v7+/v6RktsJCLAICLAICLAICLAICLAICLAICLAICLAICLBSUsf4+fv+/v7/////////////////
////////////////////////////////////////////////////////////////////////////////
//////////+bnN8HB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////////IyO0HB7AICLAICLAICLAICLAICLAICLAICLAICLAICLBERMP//v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7CwsOX/////////////////////////////////
/////////v79/f1xcdEHCLAICLAICLAICLAICLAICLAICLAICLAICLA+PsHq6/f//v7/////////////
////////////////////////////////////////////////////////////////////////////////
//////////+cnN8IB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
//////////////////////+goeEIB7AICLAICLAICLAICLAICLAICLAICLAICLAICLB7e9X+/v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7Cvr+X/////////////////////////////////
///////////////7/P1XV8kIB7AICLAICLAICLAICLAICLAICLAICLAICLA2Nb/f3/P+/v7/////////
////////////////////////////////////////////////////////////////////////////////
//////////+cnN8IB7AICLAICLAICLAICLAICLAICLAICLAICLAICLDp6fj/////////////////////
///////////////////9/f1cXMoHCLAICLAICLAICLAICLAICLAICLAICLAICLAJCbHV1vD+/v7/////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHCLCur+T/////////////////////////////////
//////////////////709PpERcMHB7AICLAICLAICLAICLAICLAICLAICLAICLAgILfX1/H9/v7/////
////////////////////////////////////////////////////////////////////////////////
//////////97e9UICLAICLAICLAICLAICLAICLAICLAICLAICLAICLDU1vD///7/////////////////
///////////////////a2/IODbIICLAICLAICLAICLAICLAICLAICLAICLAICLBcXMr+//7/////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7CJidn/////////////////////////////////
///////////////////+/v7k5PYvLrwHCLAICLAICLAICLAICLAICLAICLAICLAHCLAcHLe8vOj+/v7/
////////////////////////////////////////////////////////////////////////////////
//////////9xctIICLAICLAICLAICLAICLAICLAICLAICLAICLAICLCJidj+/v3+/v7/////////////
///////+//7//v7y8/pERMMICLAICLAICLAICLAICLAICLAICLAICLAICLAeHrfj5PT/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7CFhtj/////////////////////////////////
///////////////////////+//7Z2fEaGrYHB7AICLAICLAICLAICLAICLAICLAICLAICLARErOrq+P+
////////////////////////////////////////////////////////////////////////////////
//////////9hYcwHB7AICLAICLAICLAICLAICLAICLAICLAICLAICLAQD7ONjdni4vX6+v3/////////
///////s7PigoN8oKLoHB7AICLAICLAICLAICLAICLAICLAICLAICLAQELLCwur9/f3/////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAIB7BgYM3/////////////////////////////////
///////////////////////////////Ky+0ODrIICLAICLAICLAICLAICLAICLAICLAICLAICLAKCbGT
k9v8/f3/////////////////////////////////////////////////////////////////////////
//////////9JScUICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAZGbYhIbkhIbkh
IbkhIbkNDbIICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAZGbW2t+f9/v3/////////////////
//8ICLAICLAICLAICLAICLAICLAICLAICLAICLAHB7BNTMb/////////////////////////////////
///////////////////////////////+//6ysuYMDLEICLAICLAICLAICLAICLAICLAICLAICLAHCLAH
B7B1ddL8/f3/////////////////////////////////////////////////////////////////////
///////+//4rK7sICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAICLAICLAICLAICLAHCLAJCbFKSsXd3fT//v//////////////////////
//8ICLAHCLAHCLAHCLAHCLAHCLAHCLAHCLAICLAHCLAwMb3+/v7/////////////////////////////
///////////////////////////////////+/v+OjtsICLAHCLAHCLAHCLAHCLAHCLAHCLAHCLAHCLAG
B7EHB7BWVsn3+P3/////////////////////////////////////////////////////////////////
///////6+/waGrYICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAI
CLAICLAICLAICLAICLAICLAIB7EICLAHB7ASErRfX8zDxez9/v7/////////////////////////////
//8rKrsyMr4xMr4xMr4xMr4xMr4xMr4xMr4wML0JCLAKCrD9/fz+////////////////////////////
///////////////////////////////////////+//9ras8HB6AGB5MGB5MGB5MGB5MGB5MGB5MGB5MG
B5MGB5MGB5NBQbTz8/v/////////////////////////////////////////////////////////////
///////q6/cICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAICLAJCbAJCbAICLAICLAICLAI
CLAICLAICLAJCbAJCbAuLrxQUMd6etS9vunx8fn+/v//////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////Ly8sGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYTExP/////////////////////////////////////////////////////////////////
///////z9PUSES4GBg4GBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgbe3t7////g4fTU1fHU1fHU
1fHU1fHU1fD19Pr/////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////09PQGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgY2Njb/////////////////////////////////////////////////////////////////
///////+/v4qKioGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYQEBD29vb////+/v7/////////
///////+/v//////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////5+fkWFhYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgZZWVn/////////////////////////////////////////////////////////////////
///////+/v5HR0cGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYcHBz/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////8nJycGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgZtbW3/////////////////////////////////////////////////////////////////
//////////9iYmIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZAQED+/v7/////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////9ISEgGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgaLi4v/////////////////////////////////////////////////////////////////
//////////9xcXEGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZMTEz/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////9RUVEGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgaPj4//////////////////////////////////////////////////////////////////
//////////+Li4sGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZqamr/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////9jY2MGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBga0tLT/////////////////////////////////////////////////////////////////
//////////+bm5sGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZqamr/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////97e3sGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBga1tbX/////////////////////////////////////////////////////////////////
//////////+bm5sGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaRkZH/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////97e3sGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBga3t7f/////////////////////////////////////////////////////////////////
//////////+6uroGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaVlZX/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////97e3sGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaVlZX/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////98fHwGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaVlZX/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+kpKQGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgajo6P/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////FxcUGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgZCQkJLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL
S0tLS0tLS0s7OzsGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBga6urrW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW
1tbW1tbW1talpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+lpaUGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga/v7//////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////+UlJQGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBga0tLT/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////97e3sGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaVlZX/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////97e3sGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbf39//////////////////////////////////////////////////////////////////
///////////GxsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaVlZX/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////97e3sGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgbPz8//////////////////////////////////////////////////////////////////
//////////+vr68GBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaVlZX/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////97e3sGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBga1tbX/////////////////////////////////////////////////////////////////
//////////+bm5sGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgaVlZX/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////9XV1cGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBga1tbX/////////////////////////////////////////////////////////////////
//////////+bm5sGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZ4eHj/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////9RUVEGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgaoqKj/////////////////////////////////////////////////////////////////
//////////+Hh4cGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZqamr/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////9KSkoGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgaKior/////////////////////////////////////////////////////////////////
//////////9xcXEGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZqamr/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////8nJycGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgaFhYX/////////////////////////////////////////////////////////////////
//////////9ra2sGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgZBQUH/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////8/PwdHR0GBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgZhYWH/////////////////////////////////////////////////////////////////
///////+/v5HR0cGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgY0NDT/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////19fUGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgZHR0f/////////////////////////////////////////////////////////////////
///////+/v40NDQGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYWFhb/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////U1NQGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYG
BgYGBgYGBgYrKyv/////////////////////////////////////////////////////////////////
///////8/PwbGxsGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYHBwfm5ub/////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////X19dDQ0NoaGhubm5ubm5ubm5ubm5ubm5ubm5u
bm5sbGxDQ0NISEj/////////////////////////////////////////////////////////////////
///////z8/NHR0dbW1tubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5GRkZDQ0Pd3d3/////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////+/v7/////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</value>
</data>
</root>

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HaInformator
{
public abstract class HaControl
{
public enum HaControlResult
{
OK,
Error
}
public string Description { get; internal set; }
public Logger Logger { get; internal set; }
public abstract HaControlResult Act(string fiepath);
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C2A1F633-88B0-4078-BB5C-9A6A3E0743C1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>HaInformator</RootNamespace>
<AssemblyName>HaInformator</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AttributeTree.cs" />
<Compile Include="AttrValSelection.cs" />
<Compile Include="ContextMenuSelection.cs" />
<Compile Include="SelectionState.cs" />
<Compile Include="ElementSelection.cs" />
<Compile Include="FlatCollection.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="HaControl.cs" />
<Compile Include="Informate.cs" />
<Compile Include="Logger.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tree.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\DataSources\Tree.datasource" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 und x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Serialization;
namespace HaInformator
{
public class Informate : HaControl
{
private ElementSelection _elementSelection;
private AttrValSelection _attrValSelection;
private ContextMenuSelection _cMenuSelection;
private XDocument _doc;
public Informate(Logger logger,
TreeView tView,
ListBox lView,
ListBox attrLView,
ListBox valLView,
GroupBox gbox,
ContextMenuStrip cMenu)
{
this.Description = "Tool zur Darstellung aller Nodes, ihrer Attribute und Werte";
_cMenuSelection = new ContextMenuSelection(cMenu);
_attrValSelection = new AttrValSelection(attrLView, valLView, gbox, _cMenuSelection);
_elementSelection = new ElementSelection(tView, lView, _attrValSelection, _cMenuSelection);
}
public override HaControlResult Act(string filepath)
{
try
{
_doc = XDocument.Load(filepath, LoadOptions.PreserveWhitespace);
_elementSelection.Load(new Tree(_doc));
return HaControlResult.OK;
}
catch (Exception e)
{
Logger.Log(e.Message);
return HaControlResult.Error;
}
}
}
}

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HaInformator
{
public sealed class Logger
{
private static StringBuilder _sb;
private static string _filepath = System.IO.Path.GetTempFileName();
private static TextBox _textbox;
public Logger() {
_sb = new StringBuilder();
}
public Logger(TextBox box)
{
_textbox = box;
_sb = new StringBuilder();
}
public static void AddTextBox(TextBox box)
{
_textbox = box;
}
public static void Log(string _msg)
{
_sb.Append(_msg);
_textbox.AppendText(_msg);
}
public static void Save(string filepath)
{
try
{
_filepath = filepath;
File.WriteAllText(_filepath, _sb.ToString());
}
catch (Exception e)
{
File.WriteAllText(System.IO.Path.GetTempFileName(), _sb.ToString() + "\n" + e.Message);
}
}
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HaInformator
{
static class Program
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new HaProgram());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("HaInformator")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HaInformator")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("1d46195c-a991-4a6d-bf22-dc2315c23293")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="Tree" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>HaInformator.Tree, HaInformator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion: 4.0.30319.42000
//
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
// der Code neu generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace HaInformator.Properties
{
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HaInformator.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace HaInformator.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,153 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HaInformator
{
public class SelectionState
{
public string Name { get; private set; }
private HashSet<Tree> _sTrees;
private Stack<Tree> _mTrees;
public SelectionState() { }
public SelectionState(Tree tree)
{
_sTrees = new HashSet<Tree>() { tree };
this.Name = tree != null ? tree.Name : "";
}
public SelectionState(HashSet<Tree> tree)
{
_sTrees = tree;
this.Name = tree != null && tree.Any() ? tree.First().Name : "";
}
public AttributeTree GetAttributeTree()
{
if (_sTrees == null)
return null;
AttributeTree res = null;
foreach (var t in _sTrees)
{
if (t.Attributes != null)
{
if (res == null)
res = new AttributeTree();
res.AddAttribute(t.Attributes);
}
}
return res;
}
public void Mark()
{
if (_sTrees == null)
return;
foreach (var t in _sTrees)
{
if (_mTrees == null)
_mTrees = new Stack<Tree>();
_mTrees.Push(t);
t.ForeColor = System.Drawing.SystemColors.HighlightText;
t.BackColor = System.Drawing.SystemColors.Highlight;
if (t.Parent != null)
_expandNodeAndParents(t);
}
}
public void Unmark()
{
if (_mTrees == null)
return;
while (_mTrees.Any())
{
var t = _mTrees.Pop();
t.ForeColor = Color.Black;
t.BackColor = Color.Transparent;
}
}
private void _expandNodeAndParents(Tree node)
{
if (_mTrees == null || node == null)
return;
node.Expand();
if (node.Parent == null)
return;
else
_expandNodeAndParents((Tree)node.Parent);
}
public void ChangeName(string name)
{
if (_sTrees == null || String.IsNullOrWhiteSpace(name))
return;
foreach (var t in _sTrees) t.SetName(name);
this.Name = name;
}
public void AddElement(string name, string value = "")
{
if (_sTrees == null || String.IsNullOrWhiteSpace(name))
return;
foreach (var t in _sTrees) t.AddElement(name, value);
}
public void RemoveElement()
{
if (_sTrees == null)
return;
foreach (var t in _sTrees) t.RemoveElement();
}
public void AddAttribute(string name, string value = "")
{
if (_sTrees == null || String.IsNullOrWhiteSpace(name))
return;
foreach (var t in _sTrees) t.AddAttribute(name, value);
}
public void SaveTree(string filepath)
{
if (_sTrees == null || _sTrees.Count == 0 || String.IsNullOrWhiteSpace(filepath))
return;
foreach (var t in _sTrees)
t.SaveFile(filepath);
}
public void EditAttribute(string source, string target)
{
if (_sTrees == null ||
_sTrees.Count == 0 ||
String.IsNullOrWhiteSpace(source) ||
String.IsNullOrWhiteSpace(target))
return;
foreach (var t in _sTrees) t.EditAttribute(source, target);
}
public void RemoveAttribute(string target)
{
if (_sTrees == null ||
_sTrees.Count == 0 ||
String.IsNullOrWhiteSpace(target))
return;
foreach (var t in _sTrees) t.Attributes.RemoveAttribute(target);
}
public void EditValue(string attr, string source, string target)
{
if (_sTrees == null ||
_sTrees.Count == 0 ||
String.IsNullOrWhiteSpace(source))
return;
foreach (var t in _sTrees) t.Attributes.EditValue(attr, source, target);
}
}
}

View File

@@ -0,0 +1,174 @@
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Drawing.Text;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
namespace HaInformator
{
public class Tree : TreeNode
{
public AttributeTree Attributes;
public List<XElement> Elements = new List<XElement>();
public Tree(XDocument doc) : this(doc.Root)
{
}
public Tree(XElement element)
{
this.BeginEdit();
this.Name = element.Name.ToString();
this.Text = this.Name;
this.Elements.Add(element);
if (element.HasAttributes)
{
if (Attributes == null)
Attributes = new AttributeTree();
foreach (var a in element.Attributes())
Attributes.AddAttribute(a);
}
if (element.HasElements)
foreach (var e in element.Elements())
_addSubTree(new Tree(e));
this.EndEdit(false);
}
internal void _addSubTree(Tree tree)
{
if (this.Nodes.ContainsKey(tree.Name))
_mergeTreeIntoThis(tree);
else
this.Nodes.Add(tree);
}
internal void _mergeTreeIntoThis(Tree tree)
{
var act = (Tree)Nodes[tree.Name];
act.Elements.AddRange(tree.Elements);
if (tree.Attributes != null)
{
if (act.Attributes == null)
act.Attributes = new AttributeTree();
act.Attributes.AddAttribute(tree.Attributes);
}
foreach (var node in tree.Nodes)
act._addSubTree((Tree)node);
}
public void SetName(string name)
{
this.BeginEdit();
foreach (var elem in Elements)
elem.Name = name;
if (Parent == null || !Parent.Nodes.ContainsKey(name))
{
this.Name = name;
this.Text = name;
this.EndEdit(false);
return;
}
else
{
this.Name = name;
this.Text = name;
var p = (Tree)Parent;
this.Remove();
p._addSubTree(this);
this.EndEdit(false);
}
}
public void AddElement(string name, string value)
{
this.BeginEdit();
foreach (var elem in Elements)
{
var e = new XElement(name);
if (!String.IsNullOrWhiteSpace(value))
e.Value = value;
elem.Add(e);
_addSubTree(new Tree(e));
}
this.EndEdit(false);
return;
}
public void RemoveElement()
{
this.BeginEdit();
foreach (var elem in Elements)
elem.Remove();
this.Remove();
this.EndEdit(false);
}
public void AddAttribute(string name, string value)
{
this.BeginEdit();
foreach (var elem in Elements)
{
var a = new XAttribute(name, value);
if (!String.IsNullOrWhiteSpace(value))
a.Value = value;
if (!elem.Attributes().Where(x => x.Name == name).Any())
elem.Add(a);
if (Attributes == null)
Attributes = new AttributeTree();
Attributes.AddAttribute(a);
}
// Why was this here?
//if (Parent == null)
// return;
//var p = (Tree)Parent;
//this.Remove();
//p._addSubTree(this);
this.EndEdit(false);
}
public void EditAttribute(string source, string target)
{
if (source == target)
return;
foreach (var elem in Elements)
if (elem.HasAttributes)
if (elem.Attributes(source).Any())
foreach (var a in elem.Attributes(source))
{
var attr = new XAttribute(target, a.Value);
elem.Add(attr);
a.Remove();
Attributes.AddAttribute(attr);
}
Attributes.RemoveAttribute(source);
}
public void SaveFile(string filepath)
{
foreach (var elem in Elements)
{
var sb = new System.IO.FileStream(filepath, System.IO.FileMode.Create);
var set = new XmlWriterSettings()
{
Indent = true,
IndentChars = " ",
NewLineChars = "\r\n",
NewLineHandling = NewLineHandling.Replace
};
using (var writer = XmlWriter.Create(sb, set))
{
elem.Save(writer);
}
sb.Close();
}
}
}
}

View File

@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "5.0.4",
"commands": [
"dotnet-ef"
]
}
}
}

454
Archive/HaLive/.gitignore vendored Normal file
View File

@@ -0,0 +1,454 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

35
Archive/HaLive/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/HaLive.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

42
Archive/HaLive/.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/HaLive.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/HaLive.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/HaLive.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}

View File

@@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace HaLive
{
public struct Attribute
{
public string Name;
public string Value;
}
public static class HTMLHelpers
{
public static string[] MonthNames = { "", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember" };
private static Dictionary<char, int> RomanMap = new Dictionary<char, int>()
{
{'I', 1},
{'V', 5},
{'X', 10},
{'L', 50},
{'C', 100},
{'D', 500},
{'M', 1000}
};
public static int RomanToInteger(string roman)
{
var ro = roman.ToUpper();
int number = 0;
for (int i = 0; i < roman.Length; i++)
{
if (RomanMap.ContainsKey(ro[i]) && (i + 1 >= ro.Length || RomanMap.ContainsKey(ro[i + 1])))
{
if (i + 1 < ro.Length && RomanMap[ro[i]] < RomanMap[ro[i + 1]])
{
number -= RomanMap[ro[i]];
}
else
{
number += RomanMap[ro[i]];
}
}
else return 0;
}
return number;
}
public static int RomanOrNumberToInt(string number)
{
var a = 0;
if (Int32.TryParse(number, out a)) return a;
else return RomanToInteger(number);
}
public static string ToRoman(int number)
{
if ((number < 0) || (number > 3999)) return string.Empty;
if (number < 1) return string.Empty;
if (number >= 1000) return "M" + ToRoman(number - 1000);
if (number >= 900) return "CM" + ToRoman(number - 900);
if (number >= 500) return "D" + ToRoman(number - 500);
if (number >= 400) return "CD" + ToRoman(number - 400);
if (number >= 100) return "C" + ToRoman(number - 100);
if (number >= 90) return "XC" + ToRoman(number - 90);
if (number >= 50) return "L" + ToRoman(number - 50);
if (number >= 40) return "XL" + ToRoman(number - 40);
if (number >= 10) return "X" + ToRoman(number - 10);
if (number >= 9) return "IX" + ToRoman(number - 9);
if (number >= 5) return "V" + ToRoman(number - 5);
if (number >= 4) return "IV" + ToRoman(number - 4);
if (number >= 1) return "I" + ToRoman(number - 1);
return string.Empty;
}
public static string CreateElement(string elementname, string classes = "", string ids = "")
{
string res = "<" + elementname;
if (!String.IsNullOrWhiteSpace(classes))
if (elementname == "button")
res += CreateAttribute(new HaLive.Attribute() { Name = "type", Value = classes });
else
res += CreateAttribute(new HaLive.Attribute() { Name = "class", Value = classes });
if (!String.IsNullOrWhiteSpace(ids))
if (elementname == "a")
res += CreateAttribute(new HaLive.Attribute() { Name = "href", Value = ids });
else
res += CreateAttribute(new HaLive.Attribute() { Name = "id", Value = ids });
return res + ">";
}
public static string CreateCustomElement(string elementname, params HaLive.Attribute[] attributes)
{
string res = "<" + elementname;
if (!(attributes.Length == 0))
{
foreach (var attrib in attributes)
{
res += CreateAttribute(attrib);
}
}
return res + ">";
}
public static string CreateEndElement(string elementname)
=> "</" + elementname + ">";
public static string CreateAttribute(HaLive.Attribute attr)
=> " " + attr.Name + "=\"" + attr.Value + "\" ";
public static string CreateEmptyElement(string elementname, string classes = "", string ids = "")
{
string res = "<" + elementname;
if (!String.IsNullOrWhiteSpace(classes))
res += CreateAttribute(new HaLive.Attribute() { Name = "class", Value = classes });
if (!String.IsNullOrWhiteSpace(ids))
res += CreateAttribute(new HaLive.Attribute() { Name = "id", Value = ids });
return res + "></" + elementname + ">";
}
public static string GetEnumerationString(List<string> strlist)
{
var res = "";
foreach (var str in strlist)
{
if (str != strlist.First())
if (str == strlist.Last())
res += " und " + str;
else
res += ", " + str;
else
res += str;
}
return res;
}
}
}

View File

@@ -0,0 +1,123 @@
using HaDocument.Interfaces;
using HaDocument.Models;
using System;
using System.Text;
using HaXMLReader.Interfaces;
using HaXMLReader.EvArgs;
using HaXMLReader;
using System.Collections.Generic;
namespace HaLive {
public class LinkBuilder {
private ILibrary _lib;
private IReader _reader;
private StringBuilder _sb;
private bool _followlinksinchildren;
private bool _followlinksinthis;
public LinkBuilder(ILibrary lib, IReader reader, StringBuilder stringBuilder, bool followlinksinchildren = true, bool followlinksinthis = true) {
if (lib == null || reader == null || stringBuilder == null) throw new ArgumentNullException();
_lib = lib;
_reader = reader;
_sb = stringBuilder;
_followlinksinchildren = followlinksinchildren;
_followlinksinthis = followlinksinthis;
reader.Tag += OnTag;
}
private void OnTag(object _, Tag tag) {
if (tag.Name == "wwwlink" || tag.Name == "intlink" || tag.Name == "link") {
if (tag.EndTag && _followlinksinthis) {
_sb.Append(HTMLHelpers.CreateEndElement("a"));
}
else {
if (tag.Name == "wwwlink" && tag.Values.ContainsKey("address") && _followlinksinthis)
_sb.Append(HTMLHelpers.CreateCustomElement("a",
new HaLive.Attribute() { Name = "class", Value = "hlink wwwlink invlink" },
new HaLive.Attribute() { Name = "href", Value = tag["address"]},
new HaLive.Attribute() { Name = "target", Value = "_blank"},
new HaLive.Attribute() { Name = "rel", Value = "noopener noreferrer"}));
if (tag.Name == "intlink" && tag.Values.ContainsKey("letter") && _lib.Metas.ContainsKey(tag["letter"])) {
var letter = _lib.Metas[tag["letter"]];
_sb.Append(HTMLHelpers.CreateElement("a", "hlink intlink invlink", "/Briefe/" + letter.Autopsic + "#" + tag["page"] + "-" + tag["line"]));
if (!tag.Values.ContainsKey("linktext") || tag.Values["linktext"] == "true") {
var linkstring = "";
var ZHstring = "";
var pglnstring= "";
linkstring += "HKB&nbsp;" + letter.Autopsic;
if (tag.Values.ContainsKey("page")) {
pglnstring += tag["page"];
if (tag.Values.ContainsKey("line")) {
pglnstring += "/" + tag["line"];
}
if (letter.ZH != null)
ZHstring += HTMLHelpers.ToRoman(Int32.Parse(letter.ZH.Volume)) + "&nbsp;";
linkstring += "&nbsp;(&#8239;";
linkstring += ZHstring;
linkstring += pglnstring;
linkstring += "&#8239;)";
}
_sb.Append(linkstring);
}
}
if (tag.Name == "link" && tag.Values != null) {
Comment comment = null;
if (tag.Values.ContainsKey("subref") && _lib.SubCommentsByID.ContainsKey(tag["subref"]))
comment = _lib.SubCommentsByID[tag["subref"]];
else if (tag.Values.ContainsKey("ref"))
if (_lib.Comments.ContainsKey(tag["ref"]))
comment = _lib.Comments[tag["ref"]];
else if (_lib.SubCommentsByID.ContainsKey(tag["ref"]))
comment = _lib.SubCommentsByID[tag["ref"]];
if (comment != null) {
var linkloc = String.IsNullOrWhiteSpace(comment.Parent) ? comment.Index : comment.Parent;
if (_followlinksinthis)
if (comment.Type == "neuzeit")
_sb.Append(HTMLHelpers.CreateElement("a", "hlink link invlink", "/Supplementa/Register/" + linkloc[0] + "#" + comment.Index));
else if (comment.Type == "bibel")
_sb.Append(HTMLHelpers.CreateElement("a", "hlink link invlink", "/Supplementa/Bibelstellen/" + linkloc[0] + linkloc[1] + "#" + comment.Index));
else if (comment.Type == "forschung")
_sb.Append(HTMLHelpers.CreateElement("a", "hlink link invlink", "/Supplementa/Forschung/" + linkloc[0] + "#" + comment.Index));
_sb.Append(GetLemmaString(tag, comment));
}
}
if (tag.IsEmpty && _followlinksinthis) _sb.Append(HTMLHelpers.CreateEndElement("a"));
}
}
}
private string GetLemmaString(Tag tag, Comment comment) {
if (!tag.Values.ContainsKey("linktext") || tag.Values["linktext"] == "true") {
var sb = new StringBuilder();
var subreader = new UTF8StringReader(comment.Lemma);
new LinkBuilder(_lib, subreader, sb, _followlinksinchildren, _followlinksinchildren);
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> OTag_Funcs = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "lemma", (strbd, x) => strbd.Append(HTMLHelpers.CreateElement("div", "reference")) ),
( x => x.Name == "titel", (strbd, x) => strbd.Append(HTMLHelpers.CreateElement("span", "title")) )
};
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> CTag_Funcs = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "lemma", (strbd, x) => strbd.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "titel", (strbd, x) => strbd.Append(HTMLHelpers.CreateEndElement("span")) )
};
List<(Func<Text, bool>, Action<StringBuilder, Text>)> Text_Funcs = new List<(Func<Text, bool>, Action<StringBuilder, Text>)>() {
( x => true, (strbd, txt) => strbd.Append(txt.Value))
};
new StandardSubscriber(subreader, sb, OTag_Funcs, null, CTag_Funcs, Text_Funcs, null);
subreader.Read();
return sb.ToString();
}
return "";
}
public void Dispose() {
if (_reader != null)
_reader.Tag -= OnTag;
}
~LinkBuilder() {
Dispose();
}
}
}

View File

@@ -0,0 +1,77 @@
using HaDocument.Models;
using HaDocument.Interfaces;
using HaDocument.Comparers;
using HaXMLReader.Interfaces;
using HaLive.Models;
using HaXMLReader.EvArgs;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using System.Linq;
using System;
namespace HaLive {
internal class DocumentSearch {
internal DocumentSearchResult _searchResult { get; }
private IReader _reader { get; }
private string _search { get; }
internal DocumentSearch(DocumentSearchResult res, IReader reader, string search) {
_searchResult = res;
_reader = reader;
_search = search;
_pg = "";
}
internal DocumentSearchResult Act() {
_reader.Text += OnText;
_reader.SingleTag += OnSTag;
_reader.Read();
return _searchResult;
}
internal void OnText(object _, Text text) {
if (text.Value.ToLower().Contains(_search.ToLower())) {
_searchResult.Results.Add(new DocumentResult(text.Value, _pg, _ln));
}
}
private string _pg;
private string _ln;
internal void OnSTag(object _, Tag tag) {
if (tag.Name == "page")
_pg = tag["index"];
else if (tag.Name == "line")
_ln = tag["index"];
}
}
internal class RegisterSearch {
internal Comment _searchResult { get; }
private IReader _reader { get; }
private string _search { get; }
private bool found;
internal RegisterSearch(Comment res, IReader reader, string search) {
_searchResult = res;
_reader = reader;
_search = search;
found = false;
}
internal bool Act() {
_reader.Text += OnText;
_reader.Read();
return found;
}
internal void OnText(object _, Text text) {
if (text.Value.ToLower().Contains(_search.ToLower())) {
found = true;
}
}
}
}

View File

@@ -0,0 +1,102 @@
using HaXMLReader.Interfaces;
using HaXMLReader.EvArgs;
using System.Text;
using System.Collections.Generic;
using System;
namespace HaLive {
public class StandardSubscriber {
private IReader _in;
private StringBuilder _target;
private List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> _OTag_Funcs;
private List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> _STag_Funcs;
private List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> _CTag_Funcs;
private List<(Func<Text, bool>, Action<StringBuilder, Text>)> _Text_Funcs;
private List<(Func<Whitespace, bool>, Action<StringBuilder, Whitespace>)> _WS_Funcs;
private bool _deleteLeadingWS;
private bool _deleteTrailingWS;
public StandardSubscriber(
IReader input,
StringBuilder target,
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> OTag_Funcs = null,
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> STag_Funcs = null,
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> CTag_Funcs = null,
List<(Func<Text, bool>, Action<StringBuilder, Text>)> Text_Funcs = null,
List<(Func<Whitespace, bool>, Action<StringBuilder, Whitespace>)> WS_Funcs = null,
bool deleteLeadingWS = false,
bool deleteTrailingWS = false
) {
if (input == null || target == null) throw new ArgumentNullException();
_in = input;
_target = target;
_deleteLeadingWS = deleteLeadingWS;
_deleteTrailingWS = deleteTrailingWS;
_OTag_Funcs = OTag_Funcs;
_STag_Funcs = STag_Funcs;
_CTag_Funcs = CTag_Funcs;
_Text_Funcs = Text_Funcs;
_WS_Funcs = WS_Funcs;
if (_OTag_Funcs != null)
_in.OpenTag += OnOTag;
if (_STag_Funcs != null)
_in.SingleTag += OnSTag;
if (_CTag_Funcs != null)
_in.CloseTag += OnCTag;
if (_Text_Funcs != null)
_in.Text += OnText;
if (_WS_Funcs != null)
_in.Whitespace += OnWS;
}
void OnOTag(object _, Tag tag) {
foreach(var entry in _OTag_Funcs)
if (entry.Item1(tag)) entry.Item2(_target, tag);
}
void OnText(object _, Text text) {
if (_deleteLeadingWS) text.Value = text.Value.TrimStart();
if (_deleteTrailingWS) text.Value = text.Value.TrimEnd();
foreach(var entry in _Text_Funcs)
if (entry.Item1(text)) entry.Item2(_target, text);
}
void OnSTag(object _, Tag tag) {
foreach(var entry in _STag_Funcs)
if (entry.Item1(tag)) entry.Item2(_target, tag);
}
void OnCTag (object _, Tag tag) {
foreach (var entry in _CTag_Funcs)
if (entry.Item1(tag)) entry.Item2(_target, tag);
}
void OnWS (object _, Whitespace ws) {
foreach (var entry in _WS_Funcs) {
if (entry.Item1(ws)) entry.Item2(_target, ws);
}
}
internal void Dispose() {
if (_in != null) {
if (_OTag_Funcs != null)
_in.OpenTag -= OnOTag;
if (_STag_Funcs != null)
_in.SingleTag -= OnSTag;
if (_CTag_Funcs != null)
_in.CloseTag -= OnCTag;
if (_Text_Funcs != null)
_in.Text -= OnText;
if (_WS_Funcs != null)
_in.Whitespace -= OnWS;
}
}
~StandardSubscriber() {
Dispose();
}
}
}

View File

@@ -0,0 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RazorCompileOnBuild>false</RazorCompileOnBuild>
<RazorCompileOnPublish>false</RazorCompileOnPublish>
<UserSecretsId>291b4748-5f17-4dbc-8b79-f8aba08bd32b</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<None Remove="Hamann.xml" />
</ItemGroup>
<ItemGroup>
<Content Include="Hamann.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
<Folder Include="wwwroot\pdf\" />
</ItemGroup>
<ItemGroup>
<!-- extends watching group to include *.xml files -->
<Watch Include="**\*.xml" Exclude="obj\**\*;bin\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HaXMLReader\HaXMLReader.csproj" />
<ProjectReference Include="..\HaDocument\HaDocument.csproj" />
</ItemGroup>
</Project>

221642
Archive/HaLive/Hamann.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace HaLive.Models
{
public abstract class MenuItem
{
public string FriendlyName { get; set; }
public string DefaultRoute { get; set; }
public bool Active { get; set; } = false;
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace HaLive.Models
{
public class MenuPageItem : MenuItem
{
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace HaLive.Models
{
public class MenuSubMenuItem : MenuItem
{
public List<MenuPageItem> menuPages { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
using HaDocument.Models;
using HaDocument.Comparers;
using HaDocument.Interfaces;
using System.Collections.Generic;
namespace HaLive.Models {
public class DocumentSearchResult {
public Meta MetaData { get; }
public List<DocumentResult> Results { get; }
public DocumentSearchResult(Meta meta) {
MetaData = meta;
Results = new List<DocumentResult>(4);
}
}
public class DocumentResult {
public string PreviewString { get; }
public string Page { get; }
public string Line { get; }
public DocumentResult(string previewstring, string page, string line) {
PreviewString = previewstring;
Page = page;
Line = line;
}
}
public class LetterComparer : IComparer<DocumentSearchResult>
{
public int Compare(DocumentSearchResult first, DocumentSearchResult second)
{
var cmp = new DefaultComparer();
return cmp.Compare(first.MetaData, second.MetaData);
}
}
}

View File

@@ -0,0 +1,661 @@
@page "{id?}"
@using System.Linq;
@using System.Threading.Tasks;
@using System.Collections.Generic;
@using System.Threading;
@using System.Linq;
@using System.Xml.Linq;
@using System.IO;
@model HaLive.Pages.BriefeModel
@inject IReaderService readerService
@inject ILibrary lib
@{
// Acquire data
ViewData["Title"] = "Brief";
var meta = lib.Metas.Where(x => x.Value.Autopsic == Model.id).First().Value;
var id = meta.Index;
var letter = lib.Letters[id];
var marginals = lib.MarginalsByLetter.Contains(id) ? lib.MarginalsByLetter[id] : null;
var tradition = lib.Traditions.ContainsKey(id) ? lib.Traditions[id] : null;
var editreasons = lib.EditreasonsByLetter.Contains(id) ? lib.EditreasonsByLetter[id].OrderBy(x => HTMLHelpers.RomanOrNumberToInt(x.StartPage)).ThenBy(x => HTMLHelpers.RomanOrNumberToInt(x.StartLine)) : null;
var senders = HTMLHelpers.GetEnumerationString(meta.Senders.Select(x => lib.Persons[x].Name).ToList());
var receivers = HTMLHelpers.GetEnumerationString(meta.Receivers.Select(x => lib.Persons[x].Name).ToList());
var next = meta == lib.MetasByDate.Last() ? null : lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) + 1);
var prev = meta == lib.MetasByDate.First() ? null : lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) - 1);
var hands = lib.Hands.ContainsKey(id) ? lib.Hands[id] : null;
var filename = "HKB_" + meta.Autopsic + ".pdf";
// State
var currline = "-1";
var currpage = "";
var oldpage = "";
var commid = 1;
var active_firstedit = true;
var active_trad = false;
var active_skipwhitespace = true;
var active_del = false;
List<string> handstrings = new List<string>();
// Parsing-Combinations
var sb_lettertext = new StringBuilder(); // Hauptext
var sb_linecount = new StringBuilder(); // Linke Spalte (Zeilenzählung)
var sb_marginals = new StringBuilder(); // Rechte Spalte (Kommentare)
var sb_tradition = new StringBuilder(); // Überlieferung
var sb_trad_zhtext = new StringBuilder(); // Überlieferung, ZHText
var sb_trad_left = new StringBuilder(); // Überlieferung ZHText linke Spalte (zeilenzählung)
var sb_trad_right = new StringBuilder(); // Überlieferung ZHText rechte Spalte (Kommentare)
var sb_edits = new StringBuilder(); // Edits
var rd_lettertext = readerService.RequestStringReader(letter.Element); // Liest den Brieftext
var rd_tradition = tradition != null && !String.IsNullOrWhiteSpace(tradition.Element) ? readerService.RequestStringReader(tradition.Element) : null; // Liest die Überlieferung
// Initialize State
if (meta.ZH != null) {
currpage = meta.ZH.Page;
}
if (hands != null) {
foreach (var hand in hands.OrderBy(x => x.StartPage.Length).ThenBy(x => x.StartPage).ThenBy(x => x.StartLine.Length).ThenBy(x => x.StartLine)) {
var currstring = hand.StartPage + "/" + hand.StartLine;
if (hand.StartPage != hand.EndPage) {
currstring += "" + hand.EndPage + "/" + hand.EndLine;
}
else {
if (hand.StartLine != hand.EndLine) {
currstring += "" + hand.EndLine;
}
}
if (lib.HandPersons.Where(x => x.Key == hand.Person).Any()) {
currstring += " " + lib.HandPersons.Where(x => x.Key == hand.Person).FirstOrDefault().Value.Name;
handstrings.Add(currstring);
}
}
}
// Parsing Rules
// General rules (for the lettertext column, also for parsing the marginals, awa tradtions and editreasons)
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> OTag_Funcs = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "align" && x["pos"] == "center", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "align center")) ),
( x => x.Name == "align" && x["pos"] == "right", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "align right")) ),
( x => x.Name == "added", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "added")) ),
( x => x.Name == "sal", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "sal")) ),
( x => x.Name == "aq", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "aq")) ),
( x => x.Name == "super", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "super")) ),
( x => x.Name == "del", (sb, tag) => {
sb.Append(HTMLHelpers.CreateElement("span", "del"));
active_del = true;
} ),
( x => x.Name == "nr", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "nr")) ),
( x => x.Name == "note", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "note")) ),
( x => x.Name == "ul", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "ul")) ),
( x => x.Name == "anchor" && !String.IsNullOrWhiteSpace(x["ref"]), (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "anchor")) ),
( x => x.Name == "fn" && !String.IsNullOrWhiteSpace(x["index"]), (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "footnote")) ),
( x => x.Name == "dul", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "dul")) ),
( x => x.Name == "ful", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "ful")) ),
( x => x.Name == "up", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "up")) ),
( x => x.Name == "sub", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("sub")) ),
( x => x.Name == "tul", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "tul")) ),
( x => x.Name == "header", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "header")) ),
( x => x.Name == "lemma", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "lemma")) ),
( x => x.Name == "eintrag", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "entry")) ),
( x => x.Name == "titel", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "title")) ),
( x => x.Name == "bzg", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "bzg")) ),
( x => x.Name == "zh", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("span", "zh")) ),
( x => x.Name == "emph", (sb, tag) => { sb.Append(HTMLHelpers.CreateElement("em")); } ),
( x => x.Name == "app", (sb, tag) => { sb.Append(HTMLHelpers.CreateElement("span", "app")); } ),
( x => x.Name == "subsection", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "subcomment", tag["id"])) ),
( x => x.Name == "kommentar", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "comment", tag["id"])) ),
( x => x.Name == "editreason", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "editreason")) ),
( x => x.Name == "subsection", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "letter")) ),
( x => x.Name == "letterTradition", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "tradition")) ),
( x => x.Name == "marginal", (sb, tag) => {
sb.Append(HTMLHelpers.CreateElement("div", "marginal"));
active_skipwhitespace = !active_skipwhitespace;
}),
( x => x.Name == "hand", (sb, tag) => {
sb.Append(HTMLHelpers.CreateElement("span", "hand"));
} ),
( x => x.Name == "tabs", (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "htable")) ),
( x => x.Name == "tab" && !String.IsNullOrWhiteSpace(x["value"]), (sb, tag) => sb.Append(HTMLHelpers.CreateElement("div", "htab htab-" + tag["value"])))
};
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> CTag_Funcs = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "align", (sb, tag) => {
sb.Append(HTMLHelpers.CreateEndElement("div"));
} ),
( x => x.Name == "added", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "sal", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "aq", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "super", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "del", (sb, tag) => {
sb.Append(HTMLHelpers.CreateEndElement("span"));
active_del = false;
} ),
( x => x.Name == "nr", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "note", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "ul", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "anchor", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "fn", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "dul", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "up", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "ful", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "sub", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("sub")) ),
( x => x.Name == "tul", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "header", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "lemma", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "eintrag", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "titel", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "bzg", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "zh", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "emph", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("em")) ),
( x => x.Name == "app", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("span")) ),
( x => x.Name == "subsection", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "kommentar", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "editreason", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "subsection", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "letterTradition", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "marginal", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "tabs", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "tab", (sb, tag) => sb.Append(HTMLHelpers.CreateEndElement("div")) ),
( x => x.Name == "hand", (sb, tag) => {
sb.Append(HTMLHelpers.CreateEndElement("span"));
} )
};
List<(Func<Text, bool>, Action<StringBuilder, Text>)> Text_Funcs = new List<(Func<Text, bool>, Action<StringBuilder, Text>)>() {
( x => true, ( sb, txt ) => {
if (active_del)
sb.Append(txt.Value.Replace("", "<span class=\"diagdel\"></span>"));
else
sb.Append(txt.Value);
} )
};
List<(Func<Text, bool>, Action<StringBuilder, Text>)> Text_Funcs_Tagging = new List<(Func<Text, bool>, Action<StringBuilder, Text>)>() {
( x => true, ( sb, txt ) => {
sb.Append(HTMLHelpers.CreateElement("span", "ntext"));
sb.Append(txt.Value);
sb.Append(HTMLHelpers.CreateEndElement("span"));
} )
};
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> STag_Funcs = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "line", (sb, tag) => {
if(currline != "-1") sb.Append(HTMLHelpers.CreateElement("br", "ZHBreak"));
if(tag["type"] == "line") sb.Append(HTMLHelpers.CreateElement("hr", "lineline"));
} ),
( x => x.Name == "line" && !String.IsNullOrWhiteSpace(x["tab"]), (sb, tag) => {
sb.Append(HTMLHelpers.CreateElement("span", "tab-" + tag["tab"]));
sb.Append(HTMLHelpers.CreateEndElement("span"));
} )
};
List<(Func<Whitespace, bool>, Action<StringBuilder, Whitespace>)> Whitespace_Funcs = new List<(Func<Whitespace, bool>, Action<StringBuilder, Whitespace>)>() {
( x => true, ( sb, txt ) => {
if (active_skipwhitespace)
sb.Append(txt.Value);
else
active_skipwhitespace = !active_skipwhitespace;
})
};
// Rules for the left sidebar
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> STag_Funcs_LEFT = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "line", (sb, tag) => {
if(currline != "-1") {
if (currpage == oldpage)
sb.Append(HTMLHelpers.CreateElement("br", "", currpage + "-" + currline));
else {
sb.Append(HTMLHelpers.CreateElement("br", "", oldpage + "-" + currline));
oldpage = currpage;
}
}
else {
sb.Append(HTMLHelpers.CreateElement("span", "zhpage firstpage", currpage + "-" + tag["index"]));
sb.Append("S." + "&nbsp;");
sb.Append(HTMLHelpers.CreateEndElement("span"));
if (tag["index"] != "1")
sb.Append(currpage + "&thinsp;/&thinsp;" + tag["index"]);
else
sb.Append(currpage);
oldpage = currpage;
}
}
),
( x => x.Name == "line", (sb, tag) => { if(currline != "-1" && Int32.TryParse(tag["index"], out var _) && Int32.Parse(tag["index"]) % 5 == 0) { sb.Append(tag["index"]); } } ),
( x => x.Name == "line" && x["index"] == "1" && currline != "-1", (sb, tag) => {
sb.Append(HTMLHelpers.CreateElement("span", "zhpage", ""));
sb.Append("S. " + currpage);
sb.Append(HTMLHelpers.CreateEndElement("span"));
}),
( x => x.Name == "line", (sb, tag) => { currline = tag["index"]; } ),
( x => x.Name == "page", (sb, tag) => { currpage = tag["index"]; } )
};
// Rules for the right sidebar
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> STag_Funcs_RIGHT = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "line", (sb, tag) => {
if(currline != "-1" && marginals != null) {
var margs = marginals.Where(x => x.Page == currpage && x.Line == currline);
if (margs != null && margs.Any())
{
margs = margs.OrderBy(x => Int32.Parse(x.Index));
sb.Append(HTMLHelpers.CreateElement("div", "commBox", commid.ToString()));
sb.Append(HTMLHelpers.CreateElement("div", "commselector"));
sb.Append(HTMLHelpers.CreateElement("button", "button"));
sb.Append(HTMLHelpers.CreateEndElement("button"));
sb.Append(HTMLHelpers.CreateEndElement("div"));
sb.Append(HTMLHelpers.CreateElement("div", "comment"));
foreach (var marginal in margs)
{
var rd = readerService.RequestStringReader(marginal.Element);
new StandardSubscriber(rd, sb, OTag_Funcs, null, CTag_Funcs, Text_Funcs_Tagging, Whitespace_Funcs);
new LinkBuilder(lib, rd, sb, false);
rd.Read();
}
sb.Append(HTMLHelpers.CreateEndElement("div"));
sb.Append(HTMLHelpers.CreateEndElement("div"));
sb.Append(HTMLHelpers.CreateElement("br"));
}
else
{
sb.Append(HTMLHelpers.CreateElement("br", "emptyline"));
}
}
commid++;
}
)};
// Rules for traditions
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> OTag_Funcs_Trad = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "app", (sb, tag) => { if (!active_firstedit) { sb.Append(HTMLHelpers.CreateElement("br")); } else { active_firstedit = false; } } ),
( x => x.Name == "ZHText", (sb, tag) => {
sb_tradition.Append(HTMLHelpers.CreateElement("div", "row zhtext"));
sb_tradition.Append(HTMLHelpers.CreateElement("div", "trad-text col order-2 letterbox"));
sb_trad_left = new StringBuilder();
sb_trad_right = new StringBuilder();
currline = "-1";
currpage = "";
active_trad = true;
sb_trad_left.Append(HTMLHelpers.CreateElement("div", "trad-linecount countbox nnumber d-none d-lg-block order-1"));
sb_trad_right.Append(HTMLHelpers.CreateElement("div", "commentColumn trad-comm col-4 d-none d-lg-block order-3"));
sb_trad_right.Append(HTMLHelpers.CreateElement("br", "emptyline"));
new StandardSubscriber(rd_tradition, sb_trad_left, null, STag_Funcs_LEFT);
new StandardSubscriber(rd_tradition, sb_trad_right, null, STag_Funcs_RIGHT);
} )
};
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> CTag_Funcs_Trad = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "ZHText", (sb, tag) => {
sb_tradition.Append(HTMLHelpers.CreateEndElement("div"));
sb_trad_left.Append(HTMLHelpers.CreateEndElement("div"));
sb_trad_right.Append(HTMLHelpers.CreateEndElement("div"));
sb_tradition.Append(sb_trad_left.ToString());
sb_tradition.Append(sb_trad_right.ToString());
sb_tradition.Append(HTMLHelpers.CreateEndElement("div"));
active_trad = false;
} )
};
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> STags_Funcs_TRAD = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "line", (sb, tag) => { if(currline != "-1" || !active_trad) sb.Append(HTMLHelpers.CreateElement("br", "ZHBreak")); } ),
( x => x.Name == "line" && !String.IsNullOrWhiteSpace(x["tab"]), (sb, tag) => {
sb.Append(HTMLHelpers.CreateElement("span", "tab-" + tag["tab"]));
sb.Append(HTMLHelpers.CreateEndElement("span"));
} )
};
// Rules for Edits:
List<(Func<Tag, bool>, Action<StringBuilder, Tag>)> STags_Funcs_EDIT = new List<(Func<Tag, bool>, Action<StringBuilder, Tag>)>() {
( x => x.Name == "line", (sb, tag) => sb.Append("&emsp;") )
};
// Functionms for Parsing:
string HandleEdit(Editreason edit) {
sb_edits.Append(HTMLHelpers.CreateElement("div", "edit"));
sb_edits.Append(HTMLHelpers.CreateElement("span", "pageline"));
var currstring = edit.StartPage + "/" + edit.StartLine;
if (edit.StartPage != edit.EndPage) {
currstring += "" + edit.EndPage + "/" + edit.EndLine;
}
else {
if (edit.StartLine != edit.EndLine) {
currstring += "" + edit.EndLine;
}
}
sb_edits.Append(currstring + "&emsp;");
sb_edits.Append(HTMLHelpers.CreateEndElement("span"));
if (!String.IsNullOrWhiteSpace(edit.Reference)) {
var sb2 = new StringBuilder();
sb2.Append(HTMLHelpers.CreateElement("span", "reference"));
var rd = readerService.RequestStringReader(edit.Reference);
new StandardSubscriber(rd, sb2, OTag_Funcs, null, CTag_Funcs, Text_Funcs, Whitespace_Funcs);
rd.Read();
sb2.Append(HTMLHelpers.CreateEndElement("span"));
if ((edit.StartPage != edit.EndPage || edit.StartLine != edit.EndLine) && XElement.Parse(sb2.ToString()).Value.ToString().Length >= 60)
{
var text = XElement.Parse(sb2.ToString()).Value.ToString();
text = text.ToString().Split(' ').Take(1).First() + " [&#x2026;] " + text.ToString().Split(' ').TakeLast(1).First();
sb_edits.Append(HTMLHelpers.CreateElement("span", "reference"));
sb_edits.Append(text);
sb_edits.Append(HTMLHelpers.CreateEndElement("span"));
}
else
sb_edits.Append(sb2);
@* MIT FORMATIERUNGEN: if (edit.StartPage != edit.EndPage || edit.StartLine != edit.EndLine)
{
var text1 = XElement.Parse(sb2.ToString());
var text2 = new XElement(text1);
if (!String.IsNullOrWhiteSpace(text1.Value)) {
text1.DescendantNodes().Where(x => x.NodeType == System.Xml.XmlNodeType.Text && !String.IsNullOrWhiteSpace(x.ToString())).Skip(1).Remove();
text2.DescendantNodes().Where(x => x.NodeType == System.Xml.XmlNodeType.Text && !String.IsNullOrWhiteSpace(x.ToString())).SkipLast(1).Remove();
var element1 = text1.DescendantNodes().Where(x => x.NodeType == System.Xml.XmlNodeType.Text && !String.IsNullOrWhiteSpace(x.ToString())).Any() ?
text1.DescendantNodes().Where(x => x.NodeType == System.Xml.XmlNodeType.Text && !String.IsNullOrWhiteSpace(x.ToString())).First().Parent :
null;
var element2 = text2.DescendantNodes().Where(x => x.NodeType == System.Xml.XmlNodeType.Text && !String.IsNullOrWhiteSpace(x.ToString())).Any() ?
text2.DescendantNodes().Where(x => x.NodeType == System.Xml.XmlNodeType.Text && !String.IsNullOrWhiteSpace(x.ToString())).Last().Parent :
null;
element1.Value = element1.Value.ToString().Split(' ').Take(1).First();
element2.Value = element2.Value.ToString().Split(' ').TakeLast(1).First();
text1.DescendantNodes().Where(x =>
(x.NodeType == System.Xml.XmlNodeType.Element && String.IsNullOrWhiteSpace(((XElement)x).Value.ToString())) ||
(x.NodeType == System.Xml.XmlNodeType.Text && String.IsNullOrWhiteSpace(x.ToString())) ||
(x.NodeType == System.Xml.XmlNodeType.Whitespace)
).Remove();
text2.DescendantNodes().Where(x =>
(x.NodeType == System.Xml.XmlNodeType.Element && String.IsNullOrWhiteSpace(((XElement)x).Value.ToString())) ||
(x.NodeType == System.Xml.XmlNodeType.Text && String.IsNullOrWhiteSpace(x.ToString())) ||
(x.NodeType == System.Xml.XmlNodeType.Whitespace)
).Remove();
sb_edits.Append(text1.ToString().Trim());
sb_edits.Append(" [&#x2026;] ");
sb_edits.Append(text2.ToString().Trim());
}
}
else
sb_edits.Append(sb2); *@
}
if (!String.IsNullOrWhiteSpace(edit.Element)) {
sb_edits.Append("&emsp;");
sb_edits.Append(HTMLHelpers.CreateElement("span", "corrections"));
var rd = readerService.RequestStringReader(edit.Element);
new StandardSubscriber(rd, sb_edits, OTag_Funcs, STags_Funcs_EDIT, CTag_Funcs, Text_Funcs, Whitespace_Funcs);
rd.Read();
sb_edits.Append(HTMLHelpers.CreateEndElement("span"));
}
sb_edits.Append(HTMLHelpers.CreateEndElement("div"));
return sb_edits.ToString();
}
// Actual parsing
if (letter.Element != null && !String.IsNullOrWhiteSpace(letter.Element) && rd_lettertext != null) {
new StandardSubscriber(rd_lettertext, sb_lettertext, OTag_Funcs, STag_Funcs, CTag_Funcs, Text_Funcs, Whitespace_Funcs);
new StandardSubscriber(rd_lettertext, sb_linecount, null, STag_Funcs_LEFT);
if (marginals != null && marginals.Any()) {
new StandardSubscriber(rd_lettertext, sb_marginals, null, STag_Funcs_RIGHT);
}
rd_lettertext.Read();
}
if (tradition != null && !String.IsNullOrWhiteSpace(tradition.Element) && rd_tradition != null) {
new StandardSubscriber(rd_tradition, sb_tradition, OTag_Funcs_Trad, null, CTag_Funcs_Trad, null, null);
new StandardSubscriber(rd_tradition, sb_tradition, OTag_Funcs, STags_Funcs_TRAD, CTag_Funcs, Text_Funcs, Whitespace_Funcs);
new LinkBuilder(lib, rd_tradition, sb_tradition);
rd_tradition.Read();
}
if (editreasons != null && editreasons.Any()) {
foreach (var edit in editreasons) {
HandleEdit(edit);
}
}
}
<div class="mainhead no-gutters row"> <!-- + sticky-top if sticky -->
<div class="col">
<div class="widehead letterbar">
<div class="flexcol">
@if (System.IO.File.Exists("./wwwroot/pdf/" + filename))
{
<div style="align-self: flex-end" class="printbutton">
<span class="label">
<a class="hlink" href="/pdf/@filename">
PDF&nbsp;<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" class="bi bi-arrow-down-circle" viewBox="0 0 14 18">
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/>
</svg>
</a>
</span>
</div>
}
else
{
<div style="align-self: flex-end" class="printbutton disabled"></div>
}
<div class="lettercard flexrow">
<div class="nnumber letcount">
@meta.Autopsic
</div>
@if(!String.IsNullOrWhiteSpace(sb_lettertext.ToString()))
{
<div class="letdesc">
<span class="date">
@meta.Date
</span>&nbsp;
@if (meta.ZH != null) {
<span>
<span class="nnumber autopsic">&thinsp;
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-book" viewBox="0 0 16 18">
<path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"/>
</svg>
ZH @HTMLHelpers.ToRoman(Int32.Parse(meta.ZH.Volume)) @meta.ZH.Page
</span>&nbsp;
</span>
}
else
{
<span>
<span class="nnumber autopsic-new">
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" class="bi bi-asterisk" viewBox="0 0 16 20">
<path d="M8 0a1 1 0 0 1 1 1v5.268l4.562-2.634a1 1 0 1 1 1 1.732L10 8l4.562 2.634a1 1 0 1 1-1 1.732L9 9.732V15a1 1 0 1 1-2 0V9.732l-4.562 2.634a1 1 0 1 1-1-1.732L6 8 1.438 5.366a1 1 0 0 1 1-1.732L7 6.268V1a1 1 0 0 1 1-1z"/>
</svg>
Neu
</span>&nbsp;
</span>
}
@if(meta.hasOriginal == OptionalBool.True)
{
<span>
<span class="nnumber autopsic hv" data-bs-toggle="tooltip" data-bs-placement="top" title="Original vorhanden">
&thinsp;Orig
</span>&nbsp;
</span>
}
else
{
<span>
<span class="nnumber autopsic hv" data-bs-toggle="tooltip" data-bs-placement="top" title="Original verschollen">
&thinsp;<span class="cross">Orig</span>
</span>&nbsp;
</span>
}
@if (meta.ZH != null && meta.ZH.dateChanged)
{
<span>
<span class="nnumber autopsic hv" data-bs-toggle="tooltip" data-bs-placement="top" title="Der Brief wurde gegenüber der Ausgabe ZH neu datiert">
&thinsp;neu datiert
</span>&nbsp;
</span>
}
@if(meta.isProofread == OptionalBool.True)
{
<span>
<span class="nnumber autopsic hv" data-bs-toggle="tooltip" data-bs-placement="top" title="Textkritisch geprüft">
&thinsp;geprüft
</span>&nbsp;
</span>
}
else
{
<span>
<span class="nnumber autopsic hv" data-bs-toggle="tooltip" data-bs-placement="top" title="Nicht textkritisch geprüft">
&thinsp;<span class="cross">geprüft</span>
</span>&nbsp;
</span>
}
@if (lib.MarginalsByLetter.Contains(meta.Index))
{
<span>
<span class="nnumber autopsic hv" data-bs-toggle="tooltip" data-bs-placement="top" title="Mit Stellenkommentar">
&thinsp;Komm
</span>&nbsp;
</span>
}
<br>
<span class="title">
@if (meta.Senders.Intersect(meta.Receivers).Any())
{
@for (int i = 0; i < meta.Senders.Count; i++)
{
@Html.Raw(lib.Persons[meta.Senders.ElementAt(i)].Name);
@if(meta.isDraft == OptionalBool.True)
{
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Entwurf">&nbsp;&#8603;&nbsp;</span>
}
else
{
<span>&nbsp;&#8594;&nbsp;</span>
}
@Html.Raw(lib.Persons[meta.Receivers.ElementAt(i)].Name);
<br>
}
}
else
{
@HTMLHelpers.GetEnumerationString(meta.Senders.Select(x => lib.Persons[x].Name).ToList())
@if(meta.isDraft == OptionalBool.True)
{
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Entwurf">&nbsp;&#8603;&nbsp;</span>
}
else
{
<span>&nbsp;&#8594;&nbsp;</span>
}
@HTMLHelpers.GetEnumerationString(meta.Receivers.Select(x => lib.Persons[x].Name).ToList())
}
</div>
}
else
{
<span>&nbsp;</span>
}
</span>
</div>
<div class="metas" style="align-self: flex-end">
@if(prev != null)
{
<a class="hlink invlink" href="/Briefe/@prev.Autopsic" >@prev.Autopsic &#x25C0;</a>
}
HKB
@if(next != null)
{
<a class="hlink invlink" href="/Briefe/@next.Autopsic">&#x25B6; @next.Autopsic</a>
}
</div>
</div>
</div>
</div>
</div>
@if(!String.IsNullOrWhiteSpace(sb_lettertext.ToString()))
{
<div class="row no-gutters">
<div class="col">
<div class="flexrow h-100">
<div class="countbox nnumber d-none d-lg-block">
@Html.Raw(sb_linecount.ToString())
<br>
</div>
<div class="letterbox">
@Html.Raw(sb_lettertext.ToString())
</div>
</div>
</div>
@if(marginals != null && marginals.Any())
{
<div class="col-4 d-none d-lg-block">
<div class="commentColumn">
@Html.Raw(sb_marginals.ToString())
</div>
</div>
} else
{
<div class="col-4 NoCommentColumn"></div>
}
</div>
}
@* <div class="row no-gutters dividerrow">
</div> *@
<div class="row no-gutters additions">
<div class="flexol additionbox">
@if(rd_tradition != null && !String.IsNullOrWhiteSpace(tradition.Element))
{
<div class="traditions">
@Html.Raw(sb_tradition.ToString())
</div>
}
@if (hands != null)
{
<div class="hands">
<br>
<span class="app">Zusätze fremder Hand</span>
@foreach (var hand in handstrings)
{
<br>
@Html.Raw(hand)
}
</div>
}
@if (editreasons != null)
{
<div class="edits">
<br>
<span class="app">Textkritische Anmerkungen <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 20" data-bs-toggle="tooltip" data-bs-placement="right" title="Der Brieftext wurde anhand der überlieferten Quellen (vgl. Provenienz) kritisch geprüft. Notwendige Korrekturen gegenüber dem in ZH gedruckten Text wurden vorgenommen und sind vollständig annotiert. Die in den beiden Auflagen von ZH angehängten Korrekturvorschläge werden vollständig aufgelistet, werden aber nur dann im Text realisiert, sofern diese anhand überlieferter Quellen verifiziert werden konnten.">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
</svg></span>
@* <div class="disclaimer">Der Brieftext wurde anhand der überlieferten Quellen (vgl. Provenienz) kritisch geprüft. Notwendige Korrekturen gegenüber dem in ZH gedruckten Text wurden vorgenommen und sind vollständig annotiert. Die in den beiden Auflagen von ZH angehängten Korrekturvorschläge werden vollständig aufgelistet, werden aber nur dann im Text realisiert, sofern diese anhand überlieferter Quellen verifiziert werden konnten.</div> *@
@Html.Raw(sb_edits)
</div>
}
</div>
</div>
@section Scripts {
<script src="~/js/new.js" asp-append-version="true"></script>
<script>
function offsetAnchor() {
if (location.hash.length !== 0) {
window.scrollTo(window.scrollX, window.scrollY - 280);
}
}
$(document).on('click', 'a[href^="#"]', function(event) {
window.setTimeout(function() {
offsetAnchor();
}, 0);
});
window.setTimeout(offsetAnchor, 0);
$( "#" + window.location.hash.substr(1) ).before("<div class=\"selected\">☛</div>");
</script>
<script>
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
</script>
}

View File

@@ -0,0 +1,36 @@
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using HaDocument.Interfaces;
using HaDocument.Models;
using System;
namespace HaLive.Pages
{
public class BriefeModel : PageModel
{
internal ILibrary _lib;
[BindProperty(SupportsGet = true)]
public string id { get; set; }
public BriefeModel(ILibrary lib) {
_lib = lib;
}
public IActionResult OnGet()
{
if (String.IsNullOrWhiteSpace(id)) {
return RedirectPermanent("/Briefe/1");
}
var res = _lib.Metas.Where(x => x.Value.Autopsic == id);
if (!res.Any() || !_lib.Metas.ContainsKey(res.First().Key)) {
Response.StatusCode = 404;
return RedirectToPage("/Error");
}
_lib.Metas.Where(x => x.Value.Autopsic == id).First();
return Page();
}
}
}

View File

@@ -0,0 +1,139 @@
@page
@model HaLive.Pages.EditionsgeschichteModel
@{
ViewData["Title"] = "Editionsgeschichte";
}
<div class="mainhead row "> <!-- + sticky-top if sticky -->
<!--Sticky grey space on top of header -->
<div class="col">
<div class="widehead">
<div class="flexcol">
<div style="align-self: flex-end">
<br/>
</div>
<div class="flexrow" style="margin-bottom:-30px">
<div class="heading">
Editionsgeschichtliche Voraussetzungen
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row no-gutters">
<div class="col">
<div class="registerbox">
<div class="text editionstext">
<!-- Text -->
<p class="Text">Von 1899 bis zu seinem Tod 1929 sammelte Arthur Warda, Amtsrichter in Königsberg und Mitarbeiter an den ersten Briefbänden der Akademieausgabe von Kants Gesammelten Werken, alles in Bezug auf Hamann Erreichbare in Königsberg, um eine Gesamtausgabe der Werke und Briefe auf den Weg zu bringen.<a class="Fußnotenzeichen" name="FnZ-2" href="#FnA-2">2</a> Bei seinem Tod 1929 hatte er von Dreivierteln der fast 1.200 Briefe handschriftliche Abschriften in der Qualität von Satzvorlagen für den Druck angefertigt. In den Jahren 1905/06 schaffte er es, den Erwerb der drei wichtigsten Hamann-Nachlässe durch die Königsberger Staats- und Universitätsbibliothek zu vermitteln.<a class="Fußnotenzeichen" name="FnZ-3" href="#FnA-3">3</a></p>
<p class="Text">1904 wandte er sich mit dem Projekt einer Werk- und Briefausgabe an die Preußische Akademie der Wissenschaften zu Berlin (= PAW). Nach jahrelangen Verhandlungen begann die Unternehmung 1914 konkrete Züge anzunehmen, doch der Ausbruch des Ersten Weltkriegs erstickte diese Bestrebungen sogleich wieder im Keim. Erst 1927 betraute die Deutsche Kommission Julius Petersen (18781941) mit der Organisation einer Gesamtausgabe.<a class="Fußnotenzeichen" name="FnZ-4" href="#FnA-4">4</a> Als Bearbeiter der Brief-Bände wurde Arthur Warda benannt. Zeitgleich suchte die Preußische Akademie der Wissenschaften über Josef Nadler, zu dieser Zeit Professor für Neuere deutsche Literaturgeschichte in Königsberg, den Kontakt zur Königsberger Gelehrten Gesellschaft, um diese für eine gemeinsame Finanzierung der Ausgabe zu gewinnen. Josef Nadler bot sich als Bearbeiter der Werkbände an, im Juli 1928 übersandte er einen Ausgabenplan.</p>
<p class="Text">Als Arthur Warda 1929 starb, hinterließ er, neben zahlreichen Autographen und wertvollen Drucken, u.a. eine Kartei über sämtliche Briefe von und an Hamann, Abschriften von 857 Briefen in der Qualität von Satzvorlagen, ein durchkorrigiertes Exemplar von Gildemeisters Edition des Briefwechsels Hamanns mit Jacobi sowie reinschriftliche Abschriften in drei Foliobänden der übrigen Briefe.<a class="Fußnotenzeichen" name="FnZ-5" href="#FnA-5">5</a> Diese Materialien konnte Walther Ziesemer, der 1930 neu bestimmte Herausgeber der Briefe, übernehmen.</p>
<p>Wirksam zum 1. Januar 1930, wurde ein Vertrag zwischen der Preußischen Akademie der Wissenschaften sowie der Königsberger Gelehrten Gesellschaft mit dem Insel-Verlag, <span class="kursiv">in persona</span> dessen Leiter Anton Kippenberg, ausgehandelt. Jedes Jahr sollten parallel je ein Band der Werke und Briefe erscheinen.<a class="Fußnotenzeichen" name="FnZ-6" href="#FnA-6">6</a></p>
<p class="Text">Dank der Vorarbeiten von Warda konnte Ziesemer bereits im April 1932 die Satzvorlagen für den Druck von Band I des Briefwechsels an den Insel-Verlag schicken.<a class="Fußnotenzeichen" name="FnZ-7" href="#FnA-7">7</a> Mit der Drucklegung wollte der Verlag jedoch noch auf den ersten Werkband warten, damit eine einheitliche Druckgestaltung abgesprochen werden konnte. Obwohl jährlich angekündigt, konnte Nadler diese erst vier Jahre später Ende 1936 an den Verlag geben.<a class="Fußnotenzeichen" name="FnZ-8" href="#FnA-8">8</a></p>
<p class="Text">Nachdem Ende November 1936 sowohl die Satzvorlage für den Druck des ersten Bandes der Briefe, als auch jene der Werke beim Insel-Verlag vorlagen, begann die schwierige Phase der Drucklegung. Zunächst wurden vom Verlag Probeseiten für die Werkausgabe erstellt.<a class="Fußnotenzeichen" name="FnZ-9" href="#FnA-9">9</a> Petersen hatte den Verlagsleiter Kippenberg bereits im Dezember 1929 vor Vertragsabschluss auf Anraten Nadlers explizit darauf aufmerksam gemacht, »dass bei einzelnen Schriften Hamanns das Satzbild ein sehr kompliziertes ist und dass er selbst eine Buntheit von Typen im Wechsel von Sperrdruck, Fettdruck, antiqua, Fraktur, petit und fremden Alphabeten wie hebräisch und griechisch gewählt hat, um die man bei der Wiedergabe nicht herum kommt.«<a class="Fußnotenzeichen" name="FnZ-10" href="#FnA-10">10</a></p>
<p class="Text">Aus angeblich ästhetischen, aber wohl vornehmlich ökonomischen Gründen wollte der Verlag nun bei der Satzgestaltung auf fast sämtliche typographischen Auszeichnungen wie den mehrfachen Schriftwechsel und verschiedene Schriftgrößen wie sie in Hamanns Erstdrucken vorliegen, verzichten und einzig einzelne Wörter durch Sperrung hervorheben. Nadler fand die Entscheidung des Verlags, auf die spezifische typographische Gestaltung der Hamannschen Drucke zu verzichten, fatal.<a class="Fußnotenzeichen" name="FnZ-11" href="#FnA-11">11</a> Trotzdem begann die Drucklegung des je ersten Bands der Werke und Briefe im Juni 1937. Kurz darauf kollationierte Ziesemer bereits die Druckfahnen von Band I der Briefe noch einmal vollständig mit den Originalen in Königsberg,<a class="Fußnotenzeichen" name="FnZ-12" href="#FnA-12">12</a> und im Sitzungsbericht der PAW wird das Erscheinen der beiden Bände für Ostern 1938 angekündigt.<a class="Fußnotenzeichen" name="FnZ-13" href="#FnA-13">13</a></p>
<p class="Text">In den kommenden zweieinhalb Jahren vertröstete Nadler den Verlag und die Akademie immer wieder in Bezug auf die noch ausstehende Korrektur des Werkbandes. Während der erste Werkband unkorrigiert im Satz stand, wurden von 1937 bis 1939<a class="Fußnotenzeichen" name="FnZ-14" href="#FnA-14">14</a> die ersten beiden Bände der Briefe von Ziesemer vollständig korrigiert, in der vereinbarten Auflage von 1.200 Exemplaren ausgedruckt und vorerst eingelagert. Denn der Erscheinungstermin der Ausgabe wurde von Jahr zu Jahr verschoben. Die gescheiterte Wahl Nadlers zum korrespondierenden Mitglied der Preußischen Akademie der Wissenschaften im Frühjahr 1939 wurde dann zu einem Ränkespiel an Gesinnungsfronten, das bis 1943 andauerte und die Arbeit an der Werk-Ausgabe ausbremste.</p>
<p class="Text">Die Situation schien zwischen 19391942 so festgefahren, dass selbst Akademie und Königsberger Gelehrte Gesellschaft nicht mehr an die Korrektur der Druckfahnen durch Nadler glaubten und den Insel-Verlag, 1941/42 gerade mit der Drucklegung der Bände III und IV der Briefe beschäftigt,<a class="Fußnotenzeichen" name="FnZ-15" href="#FnA-15">15</a> um eine Entkoppelung des Erscheinens der Briefbände von den Werkbänden baten.<a class="Fußnotenzeichen" name="FnZ-16" href="#FnA-16">16</a> Kippenberg ging mit Verweis auf die vertraglichen Regelungen von 1930 jedoch nicht darauf ein<a class="Fußnotenzeichen" name="FnZ-17" href="#FnA-17">17</a> und druckte die Briefbände weiterhin für das Lager. Während der Satz des ersten Werkbandes trotz der zunehmenden Materialverknappung stehen blieb und auf Korrekturen und das Imprimatur Nadlers wartete, übersandte Ziesemer 1941 und Ende 1942 die restlichen Satzvorlagen für den Druck der Bände V, VI und VII an den Verlag.<a class="Fußnotenzeichen" name="FnZ-18" href="#FnA-18">18</a> Der Satz der letzten drei Bände wurde vom Verlag jedoch nicht mehr veranstaltet.</br></p>
<!-- Leerzeile -->
<p class="Text">In der Nacht vom 3. auf den 4. Dezember 1943 wurde das Verlagsgebäude des Insel-Verlags beim Luftangriff der Alliierten auf das Graphische Viertel Leipzigs vollständig zerstört. Im Januar 1944 schrieb Kippenberg an Ziesemer diesbezüglich: »Vom Insel-Verlag habe ich das Wesentlichste, vor allem alles Geschichtliche des Verlags rechtzeitig in Sicherheit gebracht, darunter auch die Manuskripte zu Band 5 bis 7 der Hamann-Briefe. Aber auch sonst hat über Hamann ein guter Stern gestanden insofern, als die Buchbinderei, in der die Vorräte der ersten Bände lagen, sich unter den wenigen befindet, die erhalten geblieben sind.«<a class="Fußnotenzeichen" name="FnZ-19" href="#FnA-19">19</a></p>
<p class="Text">Zwar wurden die eingelagerten Vorräte der ersten beiden Briefbände bei einem weiteren Luftangriff am 20. Februar 1944 doch noch zerstört, erhalten blieben jedoch einzelne Abzüge der Druckbogen der Briefbände I bis IV sowie die Satzvorlagen für die Bände V bis VII. Diese Materialien wurden nach Ziesemers Tod 1954 Arthur Henkel, dem mittlerweile dritten Herausgeber der Briefe Hamanns, übergeben.<a class="Fußnotenzeichen" name="FnZ-20" href="#FnA-20">20</a></p>
<p class="Text">Unschätzbare Bedeutung haben diese Materialien dadurch gewonnen, dass sämtliche Briefe Hamanns, die sich in Königsberg befanden, es handelt sich um insgesamt 658 Stück seit der Einnahme Königsbergs durch die Rote Armee Anfang 1945 ebenso wie der restliche Hamann-Nachlass als verschollen gelten. Nadlers Übersiedlung nach Wien, so negativ sie sich auch auf die Fertigstellung der Hamann-Ausgabe in den 1930/40er Jahren ausgewirkt hat, ist gleichzeitig nützlich gewesen, weil Reproduktionen angefertigt werden mussten. Anhand der Photographien, die Nadler veranlasste, lässt sich der Königsberger Nachlass, die Werke betreffend, heute recht gut rekonstruieren.<a class="Fußnotenzeichen" name="FnZ-21" href="#FnA-21">21</a></p>
<p class="Text">Da Ziesemer in Königsberg geblieben war, bestand für ihn nicht die Notwendigkeit, sich Reproduktionen der Briefe Hamanns anfertigen zu lassen, konnte er doch jederzeit an den Originalen arbeiten. So bleiben uns von jenen 658 Briefen, die in Königsberg waren, jeweils nur zweitbeste Quellen. Für die Jahre bis 1782, also die Bände I bis IV, haben wir als einzige Quelle der Königsberger-Briefe noch die Druckbogen aus den Jahren 1937 bis 1943. Für die Briefe aus den Jahren 1783 bis 1788 die Satzvorlagen für die Bände V bis VII, die Ziesemer 1941/42 an den Verlag geschickt hatte.</br></p>
<!-- Leerzeile -->
<p class="Text">Während Nadler nach dem zweiten Weltkrieg seine sechsbändige Werkausgabe Hamanns von 1949 bis 1957 wegen der Divergenzen mit dem Insel-Verlag und der Preußischen Akademie der Wissenschaften bei der Thomas-Morus-Presse im Herder-Verlag in Wien veröffentlichte,<a class="Fußnotenzeichen" name="FnZ-22" href="#FnA-22">22</a> ließ der Insel-Verlag von 1955 bis 1957, jetzt in Wiesbaden, unter Ziesemers und Henkels gemeinsamer Herausgeberschaft, die Bände I bis III der Briefausgabe seiten- und zeilenidentisch anhand der wenigen überlieferten Druckbogen neu setzen und diesmal auch ausliefern.<a class="Fußnotenzeichen" name="FnZ-23" href="#FnA-23">23</a> Band IV erschien als erster Band unter alleiniger Herausgeberschaft von Henkel 1959.<a class="Fußnotenzeichen" name="FnZ-24" href="#FnA-24">24</a> Im Gegensatz zu den vorherigen drei Bänden ist Band IV kein bloßer Nachdruck der Druckbogen Ziesemers aus den Jahren 194043. Zwar ist ein großer Teil der Briefe ebenfalls seiten- und zeilengetreu zur Vorlage, der Text wurde von Henkel aber nochmals »kritisch […] bearbeit[et]« und »eine genauere chronologische Ordnung der Briefe« hergestellt, wie er in seiner Einleitung schreibt.<a class="Fußnotenzeichen" name="FnZ-25" href="#FnA-25">25</a> Der Textbestand ist freilich identisch.</p>
<p class="Text">Insgesamt 499 der 681 Briefe aus den Hamann-Briefbänden I bis IV gelten seit 1945 als verschollen. Für diese 499 Briefe sind die Druckfahnen aus den 1930/40-Jahren die einzige erhaltene Quelle. Da Henkel in den Nachweisen aller sieben Briefbände jeweils noch die bei Ziesemer genannten, seinerzeit aber schon verschollenen Königsberger Quellen anführt, ist für den Leser leider zunächst nicht ersichtlich, dass für die Erstellung der Ausgabe von Henkel bereits nicht mehr die Originalbriefe verwendet werden konnten. Verstehbar wird diese Intransparenz der Quellen dadurch, dass Henkel nicht sicher wusste, ob die Originalbriefe tatsächlich zerstört wurden.</p>
<p class="Text">Die wenigen überlieferten Exemplare der ursprünglichen Druckfahnen der Bände I, II und IV befinden sich heute in der Deutschen Nationalbibliothek Leipzig, in der Präsenzbibliothek des Germanistischen Seminars der Universität Hamburg, in der Beinecke Library in Yale, im Herder-Institut in Marburg, in Privatbesitz sowie im Hamann-Nachlass Henkels in Heidelberg. Von Band III konnte ich bisher leider noch kein überliefertes Exemplar ausfindig machen,<a class="Fußnotenzeichen" name="FnZ-26" href="#FnA-26">26</a> 1957 hat es ein solches jedoch definitiv noch gegeben.</br></p>
<!-- Leerzeile -->
<p class="Text">Die letzten drei Bände der Briefausgabe erschienen, herausgegeben von Arthur Henkel: 1965, 1975 und 1979.<a class="Fußnotenzeichen" name="FnZ-27" href="#FnA-27">27</a> Henkel erstellte die Bände auf der Grundlage der Satzvorlagen der Bände V bis VII, die Ziesemer 1941/42 an den Verlag geschickt hatte und die Kippenberg kurz vor den Luftangriffen auf Leipzig noch aus dem Verlagsgebäude gerettet hatte. Kopien der durchnumerierten losen Abschriften in der Qualität von Satzvorlagen befinden sich heute im Nachlass Arthur Henkels: etwa ein Drittel als handschriftliche Abschriften Arthur Wardas von 19011929, die restlichen zwei Drittel als Typoskripte, die Ziesemer in den 1930er-Jahren angefertigt hat. Die Typoskripte sind bis auf wenige Ausnahmen Abschriften aus dem Briefwechsel Hamanns mit Jacobi, den Warda als einziges Großkonvolut vor seinem Tod nicht mehr abschreiben konnte. Glücklicherweise haben diese Briefe in der UB Nürnberg-Erlangen den Zweiten Weltkrieg überstanden, so dass die Typoskripte Ziesemers hauptsächlich editionsgeschichtliche, keine quellenmäßige Bedeutung haben.</p>
<p class="Text">Anders liegt die Sache bei den handschriftlichen Abschriften Wardas. Für mindestens 159 Briefe aus den Bänden V bis VII sind die handschriftlichen Abschriften Wardas die einzige überlieferte Quelle. Besser wäre es natürlich, hätten wir noch die Originalbriefe. Die Qualität und Genauigkeit der Transkription der Wardaschen Abschriften ist indes nicht zu verachten. Von Haus aus war Warda Jurist, nicht Philologe und so sind auch seine Abschriften von geradezu juristischer Genauigkeit: Unterschiedliche Schreiberhände sind mit verschiedenfarbiger Tinte kenntlich gemacht, Streichungen und Überschreibungen werden in Umschrift transkribiert, Geminationen wiedergegeben statt stillschweigend aufgelöst, die Anordnung der Textteile ist zum Teil präziser als in der gedruckten Ausgabe.</p>
<!-- Autorangabe -->
<div class="Unterschrift">Janina Reibold</div>
<p class="Text"><span class="kursiv">Eine ausführliche Version dieser editionsgeschichtlichen Untersuchung ist erschienen: <br/>Janina Reibold: Kurze Geschichte der langen Hamann-Edition. Ein Zwischenbericht. In: Johann Georg Hamann: Natur und Geschichte. Acta des Elften Internationalen Hamann-Kolloquiums an der Kirchlichen Hochschule Wuppertal/Bethel 2015. Hg. von Eric Achermann, Johann Kreuzer und Johannes von Lüpke. Göttingen 2020 (= Hamann-Studien, Bd. 4), S. 453&ndash;475.</span></p>
<!-- Fußnoten ab hier -->
<br/>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-1" href="#FnZ-1">1</a>Die im Folgenden genannten Informationen sind auf Dokumente gestützt in den Nachlässen Josef Nadlers in Wien (ÖNB), Julius Petersens in Marbach (DLA), Arthur Henkels in Heidelberg, dem Verlagsarchiv des Insel-Verlags in Weimar (GSA) sowie dem Archiv der Berlin-Brandenburgischen Akademie der Wissenschaften (ABBAW). Die Briefe zwischen Anton Kippenberg und Julius Petersen aus dem DLA und GSA wurden in Auswahl bereits von Thomas Neumann ediert: Anton Kippenberg. Der Briefwechsel mit Julius Petersen 1907 bis 1941. Hg. von Th. Neumann. Norderstedt 2000. Im Folgenden, falls vorhanden, zitiert als Neumann, Briefnummer. Die Briefe Arthur Wardas an Rudolf Unger aus der UB Göttingen wurden bereits von Renate Knoll ediert in: Johann Georg Hamann 17301788. Quellen und Forschungen. Hg. von R. Knoll. Bonn 1988, S. 209218. Im Folgenden zitiert als Knoll, Briefnummer [Seitennummer].</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-2" href="#FnZ-2">2</a>Vgl. hierzu und dem Folgenden ausführlich Josef Nadler: Die Hamannausgabe. Vermächtnis Bemühungen Vollzug. Halle an der Saale 1930 (= HA), S. 148166.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-3" href="#FnZ-3">3</a>Vgl. ebd., S. 150154.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-4" href="#FnZ-4">4</a>Vgl. Petersen an Kippenberg, 19.2.1927 (GSA 50/2606,2 | Neumann, Nr. 294) und Nadler, HA S. 163.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-5" href="#FnZ-4">5</a>Vgl. Nadler, HA S. 165f. sowie Ranke an Petersen, 23.11.1929 (DLA, A: Petersen, 73.494/7).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-6" href="#FnZ-6">6</a>Eine Kopie des endgültigen Vertrags findet sich sowohl als Beilage zum Brief Sthamers an Petersen, 15.4.1930 (DLA, A: Petersen, 73.495/2) als auch in den Unterlagen der ehemaligen Preußischen Akademie der Wissenschaften (ABBAW: ASt. Dt. Kommission, Nr. 19).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-7" href="#FnZ-7">7</a>Vgl. Ziesemer an Kippenberg, 23.4.1932 sowie Insel-Verlag an Ziesemer, 30.4.1932 (GSA 50/3859).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-8" href="#FnZ-8">8</a>Vgl. hierzu v.a. Nadler an Petersen, 31.12.1934 (DLA, A: Petersen, D62.348/2).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-9" href="#FnZ-9">9</a>Vgl. Insel-Verlag an Ziesemer, 23.1.1937 (GSA 50/3859).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-10" href="#FnZ-10">10</a>Petersen an Kippenberg, 21.12.1929 (DLA, A: Petersen, 73.480/1).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-11" href="#FnZ-11">11</a>Nadlers hier klar artikulierte Einsicht in die Notwendigkeit der Wiedergabe der spezifischen Druckbildlichkeit der Schriften Hamanns steht im diametralen Gegensatz zur tatsächlichen Praxis in den von ihm letztlich 194957 herausgegebenen <span class="kursiv">Sämtlichen Werken</span> beim Herder Verlag in Wien (vgl. Anm. 22). Stefan Willer hat auf diese Widersprüchlichkeit (in Bezug auf andere Äußerungen Nadlers) bereits hingewiesen in ders., <span class="kursiv">»Ein geschickter Gebrauch dieser masoretischen Zeichen«. Philologische Schriftbildlichkeit am Beispiel Johann Georg Hamanns.</span> In: Gernot Gruber, Werner Kogge u. Sybille Krämer (Hg.), Schrift. Kulturtechnik zwischen Auge, Hand und Maschine. München 2005, S. 357373: »Hinweise wie dieser, die die Buntheit und den Detailreichtum des Druckbildes betreffen, finden sich in Nadlers Kommentaren immer wieder. Umso auffälliger wird der Abstand zwischen der von Hamann veranstalteten Diversität der Erstdrucke und der Homogenität der Nadler-Ausgabe« (S. 363f.). Eine der wenigen Arbeiten, die sich mit der typographischen Gestaltung der Hamannschen Drucke auseinandersetzt, ist die (leider nur schwer zugängliche) Dissertation von Ilse Johanna Meyer, Provokationen im Druckbild Johann Georg Hamanns (17301788). Ohio State University 1978; Mikrofilm 1979. Ziesemer an Insel-Verlag, 22.7. und 27.9.1937 (GSA 50/3859).
</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-12" href="#FnZ-12">12</a>Ziesemer an Insel-Verlag, 22.7. und 27.9.1937 (GSA 50/3859).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-13" href="#FnZ-13">13</a>Sitzungsberichte der Preussischen Akademie der Wissenschaften, Philosophisch-Historische Klasse (1938), LXVIII.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-14" href="#FnZ-14">14</a>Das Druckmanuskript für Band II der Briefe wurde am 10. März 1938 von Ziesemer an den Insel-Verlag geschickt (GSA 50/3859).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-15" href="#FnZ-15">15</a>Die Satzvorlagen gingen für Band III vermutlich Ende 1939 und für Band IV 1940 an den Insel-Verlag, vgl. Ziesemer an Petersen, 20.3.1940 (DLA, A: Petersen, 73.497/8).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-16" href="#FnZ-16">16</a>Ernst Forsthoff (Königsberger Gelehrte Gesellschaft) an Kippenberg, 9.12.1940 (DLA, A: Petersen, 73.504).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-17" href="#FnZ-17">17</a>Forsthoff an Petersen, 22.12.1940 (DLA, A: Petersen, 73.486/1).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-18" href="#FnZ-18">18</a>Band V am 27.6.1941, Band VI am 1.12.1942 und Band VII am 4.12.1942, vgl. Ziesemer an Kippenberg, 21.1.1944. Entsprechende Briefe und Eingangsvermerke im Insel-Verlag fehlen, da die gesamten sich im Verlagsgebäude befindlichen Akten, v.a. die Korrespondenz zwischen Frühjahr 1939 und Ende 1943, bei der Zerstörung des Verlagsgebäudes in der Nacht vom 3. auf den 4. Dezember 1943 wohl verlorengegangen sind.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-19" href="#FnZ-19">19</a>Kippenberg an Ziesemer, 27.1.1944 (GSA 50/3859).</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-20" href="#FnZ-20">20</a>Diese Angaben decken sich auch mit Nadlers »Abschlussbericht«: Ders.: Fliegender Brief. Rückblick und Abschied. In: Johann Georg Hamann: Sämtliche Werke. Historisch-kritische Ausgabe, Bd. VI (Wien 1952), S. 423431.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-21" href="#FnZ-21">21</a>Die ca. 6.000 Photographien befinden sich heute in der ULB Münster. Ein Findbuch zum Hamann-Nachlass in der ULB Münster ist dem Faksimiledruck von Nadler, HA durch Sabine Kinder, Bern/Frankfurt/Las Vegas 1978, beigegeben.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-22" href="#FnZ-22">22</a>Johann Georg Hamann: Sämtliche Werke. Historisch-kritische Ausgabe. 6 Bde. Hg. von Josef Nadler. Wien 19491957 [= N].</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-23" href="#FnZ-23">23</a>Johann Georg Hamann: Briefwechsel. Bde. IIII. Hg. von Walther Ziesemer und Arthur Henkel. Frankfurt a. M. 1955, 1956, 1957.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-24" href="#FnZ-24">24</a>Johann Georg Hamann: Briefwechsel. Bd. IV. Hg. von Arthur Henkel. Frankfurt a. M. 1959.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-25" href="#FnZ-25">25</a>Ebd., S. XXIII.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-26" href="#FnZ-26">26</a>Für Hinweise, die zum Auffinden eines Exemplars der Druckbogen von Bd. III dienen, bin ich sehr dankbar.</div>
<div class="Fußnote"><a class="Fußnotenanker" name="FnA-27" href="#FnZ-27">27</a>Johann Georg Hamann: Briefwechsel. Bde. VVII. Hg. von Arthur Henkel. Frankfurt a.M. 1965, 1975, 1979.</div>
</div>
</div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More