mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-28 08:45:33 +00:00
Initial replacement of old repository.
This commit is contained in:
433
.gitignore
vendored
Normal file
433
.gitignore
vendored
Normal file
@@ -0,0 +1,433 @@
|
||||
## 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/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# 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
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# 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
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# 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
|
||||
# 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
|
||||
*- Backup*.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/
|
||||
|
||||
##
|
||||
## 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
|
||||
36
.vscode/launch.json
vendored
Normal file
36
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"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}/HaLive/bin/Debug/netcoreapp2.2/HaLive.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/HaLive",
|
||||
"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",
|
||||
"processId": "${command:pickProcess}"
|
||||
}
|
||||
]
|
||||
}
|
||||
42
.vscode/tasks.json
vendored
Normal file
42
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/HaLive/HaLive.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/HaLive/HaLive.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"${workspaceFolder}/HaLive/HaLive.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
||||
6
DocAcrobat/App.config
Normal file
6
DocAcrobat/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
128
DocAcrobat/DocAcrobat.csproj
Normal file
128
DocAcrobat/DocAcrobat.csproj
Normal file
@@ -0,0 +1,128 @@
|
||||
<?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>{81AF3DED-ED71-4B91-98F4-978AE1C28C98}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>DocAcrobat</RootNamespace>
|
||||
<AssemblyName>DocAcrobat</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>D:\dev\pub\</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>
|
||||
<AutorunEnabled>true</AutorunEnabled>
|
||||
<ApplicationRevision>2</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<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>
|
||||
</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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>6E184F5867B4F91D671E969A391C43FBEE783496</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>DocAcrobat_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<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="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.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="DocAcrobat_TemporaryKey.pfx" />
|
||||
<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.8">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.8 %28x86 and 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>
|
||||
123
DocAcrobat/Form1.Designer.cs
generated
Normal file
123
DocAcrobat/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,123 @@
|
||||
namespace DocAcrobat
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.PathBox = new System.Windows.Forms.TextBox();
|
||||
this.ConvertButton = new System.Windows.Forms.Button();
|
||||
this.OpenButton = new System.Windows.Forms.Button();
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.backgroundWorker = new System.ComponentModel.BackgroundWorker();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PathBox
|
||||
//
|
||||
this.PathBox.Enabled = false;
|
||||
this.PathBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.PathBox.Name = "PathBox";
|
||||
this.PathBox.Size = new System.Drawing.Size(988, 26);
|
||||
this.PathBox.TabIndex = 0;
|
||||
//
|
||||
// ConvertButton
|
||||
//
|
||||
this.ConvertButton.Location = new System.Drawing.Point(1134, 9);
|
||||
this.ConvertButton.Name = "ConvertButton";
|
||||
this.ConvertButton.Size = new System.Drawing.Size(139, 32);
|
||||
this.ConvertButton.TabIndex = 2;
|
||||
this.ConvertButton.Text = "Konvertieren";
|
||||
this.ConvertButton.UseVisualStyleBackColor = true;
|
||||
this.ConvertButton.Click += new System.EventHandler(this.ConvertButton_Click);
|
||||
//
|
||||
// OpenButton
|
||||
//
|
||||
this.OpenButton.Location = new System.Drawing.Point(1027, 9);
|
||||
this.OpenButton.Name = "OpenButton";
|
||||
this.OpenButton.Size = new System.Drawing.Size(101, 32);
|
||||
this.OpenButton.TabIndex = 3;
|
||||
this.OpenButton.Text = "Öffnen";
|
||||
this.OpenButton.UseVisualStyleBackColor = true;
|
||||
this.OpenButton.Click += new System.EventHandler(this.OpenButton_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.StatusLabel});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 74);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1285, 32);
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
this.statusStrip1.TabIndex = 5;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// StatusLabel
|
||||
//
|
||||
this.StatusLabel.Name = "StatusLabel";
|
||||
this.StatusLabel.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
|
||||
this.StatusLabel.Size = new System.Drawing.Size(530, 25);
|
||||
this.StatusLabel.Text = "Bereit. Dateien mit gleichem Namen werden mglw. überschrieben.";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1285, 106);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.OpenButton);
|
||||
this.Controls.Add(this.ConvertButton);
|
||||
this.Controls.Add(this.PathBox);
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(1307, 162);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(1307, 162);
|
||||
this.Name = "Form1";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "DocAcrobat";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox PathBox;
|
||||
private System.Windows.Forms.Button ConvertButton;
|
||||
private System.Windows.Forms.Button OpenButton;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
private System.ComponentModel.BackgroundWorker backgroundWorker;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel StatusLabel;
|
||||
}
|
||||
}
|
||||
|
||||
159
DocAcrobat/Form1.cs
Normal file
159
DocAcrobat/Form1.cs
Normal file
@@ -0,0 +1,159 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
|
||||
namespace DocAcrobat
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
double progess = 0;
|
||||
double file = 0;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
ConvertButton.Enabled = false;
|
||||
|
||||
InitializeBackgroundWorker();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OpenButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
PathBox.Text = folderBrowserDialog1.SelectedPath;
|
||||
ConvertButton.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool PrepareWordAutomation()
|
||||
{
|
||||
////Wenn man das Programm abbricht, bleiben leider manchmal Wordinstanzen aktiv, die dann Dokumente blokieren. Deswegen kann man das ruig öfter laufen lassen.
|
||||
//if (Process.GetProcessesByName("winword").Any())
|
||||
//{
|
||||
|
||||
// if (Process.GetProcessesByName("winword").Any())
|
||||
// {
|
||||
// var answer = Helper.SayYesNo("Also es scheint immernoch Word zu laufen. Veilleicht ist das ein verwaister Prozess. Wenn du dir sicher bist, dass du Word nicht laufen hast, dann mach einfach weiter. Weitermachen?");
|
||||
// if (answer == System.Windows.MessageBoxResult.No)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void DocToPdf(string path, Microsoft.Office.Interop.Word.Application appWORD)
|
||||
{
|
||||
string dir = Path.GetDirectoryName(path) + @"\";
|
||||
var file = Path.GetFileName(path);
|
||||
var pdfDirectory = Directory.CreateDirectory(dir + @"pdf\").FullName;
|
||||
var pdfFile = file.Replace(".docx", ".pdf");
|
||||
Document wordDocument = appWORD.Documents.Open(path, ConfirmConversions: false, ReadOnly: true, AddToRecentFiles: false, Visible: true);
|
||||
wordDocument.ExportAsFixedFormat((pdfDirectory + pdfFile), WdExportFormat.wdExportFormatPDF);
|
||||
wordDocument.Close(false);
|
||||
wordDocument = null;
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void ConvertButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (backgroundWorker.IsBusy != true)
|
||||
{
|
||||
ConvertButton.Enabled = false;
|
||||
OpenButton.Enabled = false;
|
||||
StatusLabel.Text = "Konvertiere...";
|
||||
backgroundWorker.RunWorkerAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private void Convert(string paths, BackgroundWorker worker, DoWorkEventArgs e)
|
||||
{
|
||||
if (PrepareWordAutomation())
|
||||
{
|
||||
var appWORD = new Microsoft.Office.Interop.Word.Application();
|
||||
appWORD.Visible = false;
|
||||
appWORD.ScreenUpdating = false;
|
||||
|
||||
var files = System.IO.Directory.GetFiles(paths, "*.doc");
|
||||
var files2 = System.IO.Directory.GetFiles(paths, "*.docx");
|
||||
file = 100.0 / (files.Length + files2.Length);
|
||||
|
||||
foreach (string path in files.Concat(files2))
|
||||
{
|
||||
DocToPdf(path, appWORD);
|
||||
progess += file;
|
||||
worker.ReportProgress((int)Math.Round(progess));
|
||||
}
|
||||
|
||||
appWORD.Quit(false);
|
||||
appWORD = null;
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeBackgroundWorker()
|
||||
{
|
||||
backgroundWorker.WorkerReportsProgress = true;
|
||||
backgroundWorker.WorkerSupportsCancellation = true;
|
||||
|
||||
backgroundWorker.DoWork +=
|
||||
new DoWorkEventHandler(backgroundWorker_DoWork);
|
||||
backgroundWorker.RunWorkerCompleted +=
|
||||
new RunWorkerCompletedEventHandler(
|
||||
backgroundWorker_RunWorkerCompleted);
|
||||
backgroundWorker.ProgressChanged +=
|
||||
new ProgressChangedEventHandler(
|
||||
backgroundWorker_ProgressChanged);
|
||||
}
|
||||
|
||||
private void backgroundWorker_DoWork(object sender,
|
||||
DoWorkEventArgs e)
|
||||
{
|
||||
BackgroundWorker worker = sender as BackgroundWorker;
|
||||
Convert(PathBox.Text, worker, e);
|
||||
}
|
||||
|
||||
private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
StatusLabel.Text = ("Das Konvertieren vieler Dateien kann eine Weile in Anspruch nehmen. Fortschritt: " + e.ProgressPercentage.ToString() + "%");
|
||||
}
|
||||
|
||||
|
||||
private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
if (e.Cancelled == true)
|
||||
{
|
||||
StatusLabel.Text = "Canceled!";
|
||||
}
|
||||
else if (e.Error != null)
|
||||
{
|
||||
StatusLabel.Text = "Error: " + e.Error.Message;
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusLabel.Text = "Done!";
|
||||
}
|
||||
|
||||
ConvertButton.Enabled = true;
|
||||
OpenButton.Enabled = true;
|
||||
progess = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
129
DocAcrobat/Form1.resx
Normal file
129
DocAcrobat/Form1.resx
Normal file
@@ -0,0 +1,129 @@
|
||||
<?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="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="backgroundWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>255, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>475, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
22
DocAcrobat/Program.cs
Normal file
22
DocAcrobat/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DocAcrobat
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
DocAcrobat/Properties/AssemblyInfo.cs
Normal file
36
DocAcrobat/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DocAcrobat")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DocAcrobat")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("81af3ded-ed71-4b91-98f4-978ae1c28c98")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
DocAcrobat/Properties/Resources.Designer.cs
generated
Normal file
71
DocAcrobat/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 DocAcrobat.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[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>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </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("DocAcrobat.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
DocAcrobat/Properties/Resources.resx
Normal file
117
DocAcrobat/Properties/Resources.resx
Normal 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>
|
||||
30
DocAcrobat/Properties/Settings.Designer.cs
generated
Normal file
30
DocAcrobat/Properties/Settings.Designer.cs
generated
Normal 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 DocAcrobat.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
DocAcrobat/Properties/Settings.settings
Normal file
7
DocAcrobat/Properties/Settings.settings
Normal 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>
|
||||
24
DocxToPdf/DocxToPdf.csproj
Normal file
24
DocxToPdf/DocxToPdf.csproj
Normal file
@@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
123
DocxToPdf/Form1.Designer.cs
generated
Normal file
123
DocxToPdf/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,123 @@
|
||||
namespace DocAcrobat
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.PathBox = new System.Windows.Forms.TextBox();
|
||||
this.ConvertButton = new System.Windows.Forms.Button();
|
||||
this.OpenButton = new System.Windows.Forms.Button();
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.backgroundWorker = new System.ComponentModel.BackgroundWorker();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PathBox
|
||||
//
|
||||
this.PathBox.Enabled = false;
|
||||
this.PathBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.PathBox.Name = "PathBox";
|
||||
this.PathBox.Size = new System.Drawing.Size(988, 26);
|
||||
this.PathBox.TabIndex = 0;
|
||||
//
|
||||
// ConvertButton
|
||||
//
|
||||
this.ConvertButton.Location = new System.Drawing.Point(1134, 9);
|
||||
this.ConvertButton.Name = "ConvertButton";
|
||||
this.ConvertButton.Size = new System.Drawing.Size(139, 32);
|
||||
this.ConvertButton.TabIndex = 2;
|
||||
this.ConvertButton.Text = "Konvertieren";
|
||||
this.ConvertButton.UseVisualStyleBackColor = true;
|
||||
this.ConvertButton.Click += new System.EventHandler(this.ConvertButton_Click);
|
||||
//
|
||||
// OpenButton
|
||||
//
|
||||
this.OpenButton.Location = new System.Drawing.Point(1027, 9);
|
||||
this.OpenButton.Name = "OpenButton";
|
||||
this.OpenButton.Size = new System.Drawing.Size(101, 32);
|
||||
this.OpenButton.TabIndex = 3;
|
||||
this.OpenButton.Text = "Öffnen";
|
||||
this.OpenButton.UseVisualStyleBackColor = true;
|
||||
this.OpenButton.Click += new System.EventHandler(this.OpenButton_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.StatusLabel});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 74);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1285, 32);
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
this.statusStrip1.TabIndex = 5;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// StatusLabel
|
||||
//
|
||||
this.StatusLabel.Name = "StatusLabel";
|
||||
this.StatusLabel.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
|
||||
this.StatusLabel.Size = new System.Drawing.Size(530, 25);
|
||||
this.StatusLabel.Text = "Bereit. Dateien mit gleichem Namen werden mglw. überschrieben.";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1285, 106);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.OpenButton);
|
||||
this.Controls.Add(this.ConvertButton);
|
||||
this.Controls.Add(this.PathBox);
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(1307, 162);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(1307, 162);
|
||||
this.Name = "Form1";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "DocAcrobat";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox PathBox;
|
||||
private System.Windows.Forms.Button ConvertButton;
|
||||
private System.Windows.Forms.Button OpenButton;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
private System.ComponentModel.BackgroundWorker backgroundWorker;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel StatusLabel;
|
||||
}
|
||||
}
|
||||
|
||||
159
DocxToPdf/Form1.cs
Normal file
159
DocxToPdf/Form1.cs
Normal file
@@ -0,0 +1,159 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
|
||||
namespace DocAcrobat
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
double progess = 0;
|
||||
double file = 0;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
ConvertButton.Enabled = false;
|
||||
|
||||
InitializeBackgroundWorker();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OpenButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
PathBox.Text = folderBrowserDialog1.SelectedPath;
|
||||
ConvertButton.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool PrepareWordAutomation()
|
||||
{
|
||||
////Wenn man das Programm abbricht, bleiben leider manchmal Wordinstanzen aktiv, die dann Dokumente blokieren. Deswegen kann man das ruig öfter laufen lassen.
|
||||
//if (Process.GetProcessesByName("winword").Any())
|
||||
//{
|
||||
|
||||
// if (Process.GetProcessesByName("winword").Any())
|
||||
// {
|
||||
// var answer = Helper.SayYesNo("Also es scheint immernoch Word zu laufen. Veilleicht ist das ein verwaister Prozess. Wenn du dir sicher bist, dass du Word nicht laufen hast, dann mach einfach weiter. Weitermachen?");
|
||||
// if (answer == System.Windows.MessageBoxResult.No)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void DocToPdf(string path, Microsoft.Office.Interop.Word.Application appWORD)
|
||||
{
|
||||
string dir = Path.GetDirectoryName(path) + @"\";
|
||||
var file = Path.GetFileName(path);
|
||||
var pdfDirectory = Directory.CreateDirectory(dir + @"pdf\").FullName;
|
||||
var pdfFile = file.Replace(".docx", ".pdf");
|
||||
Document wordDocument = appWORD.Documents.Open(path, ConfirmConversions: false, ReadOnly: true, AddToRecentFiles: false, Visible: true);
|
||||
wordDocument.ExportAsFixedFormat((pdfDirectory + pdfFile), WdExportFormat.wdExportFormatPDF);
|
||||
wordDocument.Close(false);
|
||||
wordDocument = null;
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void ConvertButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (backgroundWorker.IsBusy != true)
|
||||
{
|
||||
ConvertButton.Enabled = false;
|
||||
OpenButton.Enabled = false;
|
||||
StatusLabel.Text = "Konvertiere...";
|
||||
backgroundWorker.RunWorkerAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private void Convert(string paths, BackgroundWorker worker, DoWorkEventArgs e)
|
||||
{
|
||||
if (PrepareWordAutomation())
|
||||
{
|
||||
var appWORD = new Microsoft.Office.Interop.Word.Application();
|
||||
appWORD.Visible = false;
|
||||
appWORD.ScreenUpdating = false;
|
||||
|
||||
var files = System.IO.Directory.GetFiles(paths, "*.doc");
|
||||
var files2 = System.IO.Directory.GetFiles(paths, "*.docx");
|
||||
file = 100.0 / (files.Length + files2.Length);
|
||||
|
||||
foreach (string path in files.Concat(files2))
|
||||
{
|
||||
DocToPdf(path, appWORD);
|
||||
progess += file;
|
||||
worker.ReportProgress((int)Math.Round(progess));
|
||||
}
|
||||
|
||||
appWORD.Quit(false);
|
||||
appWORD = null;
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeBackgroundWorker()
|
||||
{
|
||||
backgroundWorker.WorkerReportsProgress = true;
|
||||
backgroundWorker.WorkerSupportsCancellation = true;
|
||||
|
||||
backgroundWorker.DoWork +=
|
||||
new DoWorkEventHandler(backgroundWorker_DoWork);
|
||||
backgroundWorker.RunWorkerCompleted +=
|
||||
new RunWorkerCompletedEventHandler(
|
||||
backgroundWorker_RunWorkerCompleted);
|
||||
backgroundWorker.ProgressChanged +=
|
||||
new ProgressChangedEventHandler(
|
||||
backgroundWorker_ProgressChanged);
|
||||
}
|
||||
|
||||
private void backgroundWorker_DoWork(object sender,
|
||||
DoWorkEventArgs e)
|
||||
{
|
||||
BackgroundWorker worker = sender as BackgroundWorker;
|
||||
Convert(PathBox.Text, worker, e);
|
||||
}
|
||||
|
||||
private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
StatusLabel.Text = ("Das Konvertieren vieler Dateien kann eine Weile in Anspruch nehmen. Fortschritt: " + e.ProgressPercentage.ToString() + "%");
|
||||
}
|
||||
|
||||
|
||||
private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
if (e.Cancelled == true)
|
||||
{
|
||||
StatusLabel.Text = "Canceled!";
|
||||
}
|
||||
else if (e.Error != null)
|
||||
{
|
||||
StatusLabel.Text = "Error: " + e.Error.Message;
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusLabel.Text = "Done!";
|
||||
}
|
||||
|
||||
ConvertButton.Enabled = true;
|
||||
OpenButton.Enabled = true;
|
||||
progess = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
129
DocxToPdf/Form1.resx
Normal file
129
DocxToPdf/Form1.resx
Normal file
@@ -0,0 +1,129 @@
|
||||
<?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="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="backgroundWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>255, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>475, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
23
DocxToPdf/Program.cs
Normal file
23
DocxToPdf/Program.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DocxToPdf
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
15
HaDocument/Comparers/CommentComparer.cs
Normal file
15
HaDocument/Comparers/CommentComparer.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
22
HaDocument/Comparers/DefaultComparer.cs
Normal file
22
HaDocument/Comparers/DefaultComparer.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
HaDocument/Comparers/PersonComparer.cs
Normal file
13
HaDocument/Comparers/PersonComparer.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
HaDocument/Comparers/ZHComparer.cs
Normal file
41
HaDocument/Comparers/ZHComparer.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
55
HaDocument/Document.cs
Normal file
55
HaDocument/Document.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
11
HaDocument/Exceptions/ObjectBotchedException.cs
Normal file
11
HaDocument/Exceptions/ObjectBotchedException.cs
Normal 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) { }
|
||||
}
|
||||
}
|
||||
10
HaDocument/Exceptions/ObjectNotFoundException.cs
Normal file
10
HaDocument/Exceptions/ObjectNotFoundException.cs
Normal 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) { }
|
||||
}
|
||||
}
|
||||
10
HaDocument/Exceptions/SettingsInvalidException.cs
Normal file
10
HaDocument/Exceptions/SettingsInvalidException.cs
Normal 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) { }
|
||||
}
|
||||
}
|
||||
13
HaDocument/HaDocument.csproj
Normal file
13
HaDocument/HaDocument.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\HaXMLReader\HaXMLReader.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
7
HaDocument/Interfaces/IDocument.cs
Normal file
7
HaDocument/Interfaces/IDocument.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
|
||||
namespace HaDocument.Interfaces {
|
||||
public interface IDocument {
|
||||
|
||||
}
|
||||
}
|
||||
10
HaDocument/Interfaces/IHaDocumentOptions.cs
Normal file
10
HaDocument/Interfaces/IHaDocumentOptions.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
31
HaDocument/Interfaces/ILibrary.cs
Normal file
31
HaDocument/Interfaces/ILibrary.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
7
HaDocument/Interfaces/ITemporaryLibrary.cs
Normal file
7
HaDocument/Interfaces/ITemporaryLibrary.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
|
||||
namespace HaDocument {
|
||||
interface ITemporaryLibrary {
|
||||
|
||||
}
|
||||
}
|
||||
16
HaDocument/Logic/Helpers.cs
Normal file
16
HaDocument/Logic/Helpers.cs
Normal 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 ? "/" : "") + ">";
|
||||
}
|
||||
}
|
||||
}
|
||||
10
HaDocument/Logic/SettingsValidator.cs
Normal file
10
HaDocument/Logic/SettingsValidator.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using HaDocument.Interfaces;
|
||||
|
||||
namespace HaDocument.Logic {
|
||||
static class SettingsValidator {
|
||||
internal static void Validate(IHaDocumentOptions settings) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
24
HaDocument/Models/Backlink.cs
Normal file
24
HaDocument/Models/Backlink.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
36
HaDocument/Models/Comment.cs
Normal file
36
HaDocument/Models/Comment.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
HaDocument/Models/Editreason.cs
Normal file
32
HaDocument/Models/Editreason.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
HaDocument/Models/HaModel.cs
Normal file
15
HaDocument/Models/HaModel.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
26
HaDocument/Models/Hand.cs
Normal file
26
HaDocument/Models/Hand.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
70
HaDocument/Models/IntermediateLibrary.cs
Normal file
70
HaDocument/Models/IntermediateLibrary.cs
Normal 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
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
HaDocument/Models/Letter.cs
Normal file
14
HaDocument/Models/Letter.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
150
HaDocument/Models/Library.cs
Normal file
150
HaDocument/Models/Library.cs
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
14
HaDocument/Models/Location.cs
Normal file
14
HaDocument/Models/Location.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
HaDocument/Models/Marginal.cs
Normal file
23
HaDocument/Models/Marginal.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
49
HaDocument/Models/Meta.cs
Normal file
49
HaDocument/Models/Meta.cs
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
13
HaDocument/Models/OptionalBool.cs
Normal file
13
HaDocument/Models/OptionalBool.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace HaDocument.Models
|
||||
{
|
||||
public enum OptionalBool
|
||||
{
|
||||
True,
|
||||
False,
|
||||
None
|
||||
}
|
||||
}
|
||||
20
HaDocument/Models/Person.cs
Normal file
20
HaDocument/Models/Person.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
HaDocument/Models/Tradition.cs
Normal file
14
HaDocument/Models/Tradition.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
22
HaDocument/Models/ZHInfo.cs
Normal file
22
HaDocument/Models/ZHInfo.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
178
HaDocument/Reactors/CommentReactor.cs
Normal file
178
HaDocument/Reactors/CommentReactor.cs
Normal 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 = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
154
HaDocument/Reactors/EditreasonReactor.cs
Normal file
154
HaDocument/Reactors/EditreasonReactor.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
HaDocument/Reactors/ElementStringBinder.cs
Normal file
99
HaDocument/Reactors/ElementStringBinder.cs
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
55
HaDocument/Reactors/HandDefsReactor.cs
Normal file
55
HaDocument/Reactors/HandDefsReactor.cs
Normal 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, "", ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
149
HaDocument/Reactors/LetterReactor.cs
Normal file
149
HaDocument/Reactors/LetterReactor.cs
Normal file
@@ -0,0 +1,149 @@
|
||||
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>();
|
||||
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 (
|
||||
!tag.EndTag &&
|
||||
!tag.IsEmpty &&
|
||||
tag.Name == "hand" &&
|
||||
!String.IsNullOrWhiteSpace(tag["ref"])
|
||||
)
|
||||
{
|
||||
_person = tag["ref"];
|
||||
_handstartln = _line;
|
||||
_handstartpg = _page;
|
||||
}
|
||||
else if (
|
||||
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)
|
||||
{
|
||||
CreatedHands.Add(Index, _hands);
|
||||
}
|
||||
Reset();
|
||||
}
|
||||
|
||||
protected override void Reset()
|
||||
{
|
||||
Index = "";
|
||||
_active = false;
|
||||
_element = null;
|
||||
_hands = null;
|
||||
}
|
||||
|
||||
protected void Deactivate()
|
||||
{
|
||||
_element.Unsubscribe();
|
||||
Reset();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
56
HaDocument/Reactors/LocationDefsReactor.cs
Normal file
56
HaDocument/Reactors/LocationDefsReactor.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
100
HaDocument/Reactors/MarginalReactor.cs
Normal file
100
HaDocument/Reactors/MarginalReactor.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
199
HaDocument/Reactors/MetaReactor.cs
Normal file
199
HaDocument/Reactors/MetaReactor.cs
Normal file
@@ -0,0 +1,199 @@
|
||||
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)
|
||||
) {
|
||||
if (Index == "1190") {
|
||||
;
|
||||
}
|
||||
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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
60
HaDocument/Reactors/PersonDefsReactor.cs
Normal file
60
HaDocument/Reactors/PersonDefsReactor.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
20
HaDocument/Reactors/Reactor.cs
Normal file
20
HaDocument/Reactors/Reactor.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
116
HaDocument/Reactors/TraditionsReactor.cs
Normal file
116
HaDocument/Reactors/TraditionsReactor.cs
Normal file
@@ -0,0 +1,116 @@
|
||||
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;
|
||||
private bool _normalizeWhitespace = false;
|
||||
|
||||
// State
|
||||
private string Index = "";
|
||||
|
||||
private string _page = "";
|
||||
private string _line = "";
|
||||
|
||||
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>>>();
|
||||
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>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
Reset();
|
||||
}
|
||||
|
||||
protected override void Reset()
|
||||
{
|
||||
Index = "";
|
||||
_page = "";
|
||||
_line = "";
|
||||
_active = false;
|
||||
_element = null;
|
||||
}
|
||||
|
||||
protected void Deactivate()
|
||||
{
|
||||
_element.Unsubscribe();
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
8
HaEdits/HaEdits.csproj
Normal file
8
HaEdits/HaEdits.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
43
HaEdits/Program.cs
Normal file
43
HaEdits/Program.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
128022
HaEdits/briefe.xml
Normal file
128022
HaEdits/briefe.xml
Normal file
File diff suppressed because it is too large
Load Diff
128302
HaEdits/briefeedit.xml
Normal file
128302
HaEdits/briefeedit.xml
Normal file
File diff suppressed because it is too large
Load Diff
25056
HaEdits/meta.xml
Normal file
25056
HaEdits/meta.xml
Normal file
File diff suppressed because it is too large
Load Diff
25056
HaEdits/metaedit.xml
Normal file
25056
HaEdits/metaedit.xml
Normal file
File diff suppressed because it is too large
Load Diff
6
HaInformator/App.config
Normal file
6
HaInformator/App.config
Normal 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>
|
||||
172
HaInformator/AttrValSelection.cs
Normal file
172
HaInformator/AttrValSelection.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
HaInformator/AttributeTree.cs
Normal file
79
HaInformator/AttributeTree.cs
Normal 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];
|
||||
}
|
||||
}
|
||||
}
|
||||
292
HaInformator/ContextMenuSelection.cs
Normal file
292
HaInformator/ContextMenuSelection.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
180
HaInformator/ElementSelection.cs
Normal file
180
HaInformator/ElementSelection.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
54
HaInformator/FlatCollection.cs
Normal file
54
HaInformator/FlatCollection.cs
Normal 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
HaInformator/Form1.Designer.cs
generated
Normal file
569
HaInformator/Form1.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
57
HaInformator/Form1.cs
Normal file
57
HaInformator/Form1.cs
Normal 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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
665
HaInformator/Form1.resx
Normal file
665
HaInformator/Form1.resx
Normal 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>
|
||||
22
HaInformator/HaControl.cs
Normal file
22
HaInformator/HaControl.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
123
HaInformator/HaInformator.csproj
Normal file
123
HaInformator/HaInformator.csproj
Normal 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>
|
||||
51
HaInformator/Informate.cs
Normal file
51
HaInformator/Informate.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
HaInformator/Logger.cs
Normal file
52
HaInformator/Logger.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
24
HaInformator/Program.cs
Normal file
24
HaInformator/Program.cs
Normal 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
HaInformator/Properties/AssemblyInfo.cs
Normal file
36
HaInformator/Properties/AssemblyInfo.cs
Normal 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")]
|
||||
10
HaInformator/Properties/DataSources/Tree.datasource
Normal file
10
HaInformator/Properties/DataSources/Tree.datasource
Normal 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>
|
||||
71
HaInformator/Properties/Resources.Designer.cs
generated
Normal file
71
HaInformator/Properties/Resources.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
HaInformator/Properties/Resources.resx
Normal file
117
HaInformator/Properties/Resources.resx
Normal 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>
|
||||
30
HaInformator/Properties/Settings.Designer.cs
generated
Normal file
30
HaInformator/Properties/Settings.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
HaInformator/Properties/Settings.settings
Normal file
7
HaInformator/Properties/Settings.settings
Normal 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>
|
||||
153
HaInformator/SelectionState.cs
Normal file
153
HaInformator/SelectionState.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
174
HaInformator/Tree.cs
Normal file
174
HaInformator/Tree.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
12
HaLive/.config/dotnet-tools.json
Normal file
12
HaLive/.config/dotnet-tools.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "5.0.4",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
35
HaLive/.vscode/launch.json
vendored
Normal file
35
HaLive/.vscode/launch.json
vendored
Normal 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
HaLive/.vscode/tasks.json
vendored
Normal file
42
HaLive/.vscode/tasks.json
vendored
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
138
HaLive/Classes/HTMLHelpers.cs
Normal file
138
HaLive/Classes/HTMLHelpers.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
123
HaLive/Classes/LinkBuilder.cs
Normal file
123
HaLive/Classes/LinkBuilder.cs
Normal 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 " + 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)) + " ";
|
||||
linkstring += " ( ";
|
||||
linkstring += ZHstring;
|
||||
linkstring += pglnstring;
|
||||
linkstring += " )";
|
||||
}
|
||||
_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();
|
||||
}
|
||||
}
|
||||
}
|
||||
77
HaLive/Classes/Search.cs
Normal file
77
HaLive/Classes/Search.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
102
HaLive/Classes/StandardSubscriber.cs
Normal file
102
HaLive/Classes/StandardSubscriber.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
HaLive/HaLive.csproj
Normal file
43
HaLive/HaLive.csproj
Normal file
@@ -0,0 +1,43 @@
|
||||
<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\" />
|
||||
</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>
|
||||
220893
HaLive/Hamann.xml
Normal file
220893
HaLive/Hamann.xml
Normal file
File diff suppressed because it is too large
Load Diff
14
HaLive/Models/MenuItem.cs
Normal file
14
HaLive/Models/MenuItem.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
12
HaLive/Models/MenuPageItem.cs
Normal file
12
HaLive/Models/MenuPageItem.cs
Normal 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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
12
HaLive/Models/MenuSubMenuItem.cs
Normal file
12
HaLive/Models/MenuSubMenuItem.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user