diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ec6951e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,327 @@
+## 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
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+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/
+**/Properties/launchSettings.json
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.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
+
+# 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
+
+# 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
+
+# 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/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# 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/
diff --git a/CustomAnalysisRules.Test.ruleset b/CustomAnalysisRules.Test.ruleset
new file mode 100644
index 0000000..64485ad
--- /dev/null
+++ b/CustomAnalysisRules.Test.ruleset
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CustomAnalysisRules.ruleset b/CustomAnalysisRules.ruleset
new file mode 100644
index 0000000..c6f28c0
--- /dev/null
+++ b/CustomAnalysisRules.ruleset
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..eabd9b7
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,44 @@
+
+
+ true
+
+ Full
+ 7.3
+ true
+ false
+ $(EnableSourceLink)
+
+ true
+
+
+
+ true
+ true
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+
+
+
+
+
+ false
+ $(MSBuildThisFileDirectory)\CustomAnalysisRules.Test.ruleset
+
+
+
+
+ true
+ $(MSBuildThisFileDirectory)\CustomAnalysisRules.ruleset
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..3c96bc6
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 James231
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c209350
--- /dev/null
+++ b/README.md
@@ -0,0 +1,135 @@
+# Simple Version Control
+
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MLD56V6HQWCKU&source=url)
+
+
+
+This is a .NET Standard Library for setting up very basic version control in your .NET applications. It comes with a WPF app to quickly create your new version information.
+
+:star: :star: :star: And if you like it ... please star it! :star: :star: :star:
+
+## Gui Screenshots
+
+Click for full size.
+
+[](https://cdn.jam-es.com/img/simple-version-control/screen1.png)
+
+[](https://cdn.jam-es.com/img/simple-version-control/screen2.png)
+
+[](https://cdn.jam-es.com/img/simple-version-control/screen3.png)
+
+## How to Use
+
+Install the WPF app from the [GitHub Releases Page](https://github.com/James231/Simple-Version-Control/releases). Use the app to produce a set of version control JSON files. You should use the app to update these files every time a new version is released.
+
+**Note:** It is possible to write the version control files by hand, but I strongly recommend you use the app.
+
+Next you need somewhere to host your version control files. I recommend a free static web host like [GitHub Pages](https://pages.github.com/), [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/), or [Netlify](https://www.netlify.com/). My preferred choice is [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/).
+
+Once you have created and hosted the files to a url like ...
+```
+https://example.com/app/vc/changelog.json
+```
+... then you can add the version control to your app. For example, you could add a 'Check For Updates' button.
+
+## Add Version Control to Your App
+
+Within a console app, WinForms, WPF app, library or any other .NET project you can add version control information or checks.
+
+Start by installing the following SimpleVersionControl NuGet package. This can be done using the NuGet package manager with the following command:
+```
+Install-Package SimpleVersionControl
+```
+
+Then within a C# file add:
+```cs
+using SimpleVersionControl;
+```
+
+Then the most important functionality is demonstrated in the code below:
+```cs
+// Create instance of VersionController by passing in this version of the application, and the URL of the directory containing changelog file:
+VersionController versionController = new VersionController("1.0.1", "https://example.com/app/vc/");
+
+// Check this is the latest version
+bool isLatestVersion = await versionController.IsLatestVersion();
+
+// If not latest, you can check this version is still meant to function correctly
+bool isFunctioningVersion = await versionController.IsFunctioningVersion();
+
+// Receive a list of all changes between two versions
+// These are actually references to changes and you need to use ChangeRef.GetChange to get the Change object
+IEnumerable changes = await versionController.GetChangesBetween("1.0.0", "1.0.1");
+foreach(ChangeRef changeRef in changes) {
+ Change change = await changeRef.GetChange();
+ Console.WriteLine($"Change Title: {change.Title}");
+ Console.WriteLine($"Change Description: {change.Description}");
+ Console.WriteLine($"Change Release Version: {change.ReleaseVersion.VersionName}");
+}
+
+// The ChangeLog object contains a list of all versions that have been released
+// We can list version properties like this:
+ChangeLog changeLog = await versionController.GetChangeLog();
+foreach (VersionRef versionRef in changeLog.Versions) {
+ Version version = await versionRef.GetVersion();
+ Console.WriteLine($"Version Name: {version.VersionName}");
+ Console.WriteLine($"Version Description: {version.Description}");
+ Console.WriteLine($"Version Download Link: {version.DownloadLink}");
+ Console.WriteLine($"Version Release Date: {version.ReleaseDate}");
+ // You can get all changes in a version with version.Changes
+}
+
+// Get individual versions with:
+VersionRef firstAppVersionRef = await versionController.GetFirstVersionRef();
+Version latestAppVersionRef = await versionController.GetLatestVersion();
+VersionRef specificVersionRef = await versionController.GetVersionRef("1.0.1b4");
+// Convert references to Version objects to get all the properties
+Version specificVersion = await specificVersionRef.GetVersion();
+
+// Get the current Version object representing this application version
+Version curVersion = await versionController.GetVersion();
+
+// ChangeLog, Version and Change objects can all have additional data stored within them (set in the WPF app)
+// You can access this data by deserializing the AdditionalData property (it is a JObject)
+// For example, to retrieve additional data from a version
+class ExtraVersionData {
+ public int Importance { get; set; }
+}
+ExtraVersionData extraData = curVersion.AdditionalData.ToObject();
+
+// You could use this to order lists of versions or changes using Linq:
+List> getVersionTasks = changeLog.Versions.Select(async v => await v.GetVersion()).ToList();
+IEnumerable versions = await Task.WhenAll(getVersionTasks);
+versions.OrderBy(v => v.AdditionalData.ToObject().Importance);
+// It is gerenally a good idea to surround this in try{}catch{} in case ToObject throws an error
+```
+
+## License
+
+This code is released under MIT license. This means you can use this for whatever you want. Modify, distribute, sell, fork, and use this as much as you like. Both for personal and commercial use. I hold no responsibility if anything goes wrong.
+
+If you use this, you don't need to refer to this repo, or give me any kind of credit but it would be appreciated. At least a :star: would be nice.
+
+It took a lot of work to make this available for free. If you are feeling more generous, perhaps you could consider donating?
+
+[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MLD56V6HQWCKU&source=url)
+
+## Contributing
+
+Pull Requests are welcome. But, note that by creating a pull request you are giving me permission to merge your code and release it under the MIT license mentioned above. At no point will you be able to withdraw merged code from the repository, or change the license under which it has been made available.
+
+## References
+
+This wouldn't have been possible without ...
+
+[Material Design In Xaml](http://materialdesigninxaml.net/) - The WPF styles used in this app.
+
+[AvalonEdit](http://avalonedit.net/) - The code editor WPF control used for the JSON editing in the app.
+
+[AvalonEditHighlightingThemes](https://github.com/Dirkster99/AvalonEditHighlightingThemes) - Implementation of Themes in AvalonEdit. Used for light/dark JSON editing themes.
+
+[Json.NET](https://www.newtonsoft.com/json) - JSON serializer.
+
+[Wix Toolset](https://wixtoolset.org/) - Used to create the `.msi` installer.
+
+... and obvious credit to Microsoft for C#, WPF, .NET, and the best OS in existence :)
\ No newline at end of file
diff --git a/SimpleVersionControl.sln b/SimpleVersionControl.sln
new file mode 100644
index 0000000..f1687a9
--- /dev/null
+++ b/SimpleVersionControl.sln
@@ -0,0 +1,79 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30330.147
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleVersionControl", "src\SimpleVersionControl\SimpleVersionControl.csproj", "{0DF4934A-83B0-4EE2-9486-892F6B22648C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleVersionControl.App", "src\SimpleVersionControl.App\SimpleVersionControl.App.csproj", "{94FB3269-CC7C-4412-A35E-6FADF9431B40}"
+EndProject
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "StartMenuManager.GUI.Installer", "src\SimpleVersionControl.App.Installer\StartMenuManager.GUI.Installer.wixproj", "{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleVersionControl.Example", "src\SimpleVersionControl.Example\SimpleVersionControl.Example.csproj", "{0819FE23-85DE-42A0-BE15-37DEDF55AD24}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HL", "src\HL\HL.csproj", "{26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TextEditLib", "src\TextEditLib\TextEditLib.csproj", "{5AD36454-7653-4282-9B9F-2183F0064754}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Debug|x86.Build.0 = Debug|Any CPU
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Release|x86.ActiveCfg = Release|Any CPU
+ {0DF4934A-83B0-4EE2-9486-892F6B22648C}.Release|x86.Build.0 = Release|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Debug|x86.Build.0 = Debug|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Release|Any CPU.Build.0 = Release|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Release|x86.ActiveCfg = Release|Any CPU
+ {94FB3269-CC7C-4412-A35E-6FADF9431B40}.Release|x86.Build.0 = Release|Any CPU
+ {B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Debug|x86.ActiveCfg = Debug|x86
+ {B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Debug|x86.Build.0 = Debug|x86
+ {B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Release|Any CPU.ActiveCfg = Release|x86
+ {B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Release|x86.ActiveCfg = Release|x86
+ {B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Release|x86.Build.0 = Release|x86
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Debug|x86.Build.0 = Debug|Any CPU
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Release|x86.ActiveCfg = Release|Any CPU
+ {0819FE23-85DE-42A0-BE15-37DEDF55AD24}.Release|x86.Build.0 = Release|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Debug|x86.Build.0 = Debug|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Release|x86.ActiveCfg = Release|Any CPU
+ {26FDCA06-B4D8-4D43-AD29-1EA0B6B2E2F4}.Release|x86.Build.0 = Release|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Debug|x86.Build.0 = Debug|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Release|x86.ActiveCfg = Release|Any CPU
+ {5AD36454-7653-4282-9B9F-2183F0064754}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {37ED5A5D-0B95-42B3-98E4-6FBBEF19EC01}
+ EndGlobalSection
+EndGlobal
diff --git a/img/icon-256x256.ico b/img/icon-256x256.ico
new file mode 100644
index 0000000..32492ec
Binary files /dev/null and b/img/icon-256x256.ico differ
diff --git a/img/icon-256x256.png b/img/icon-256x256.png
new file mode 100644
index 0000000..e6b783b
Binary files /dev/null and b/img/icon-256x256.png differ
diff --git a/img/icon.svg b/img/icon.svg
new file mode 100644
index 0000000..b5e3b34
--- /dev/null
+++ b/img/icon.svg
@@ -0,0 +1,91 @@
+
+
diff --git a/src/HL/AssemblyInfo.cs b/src/HL/AssemblyInfo.cs
new file mode 100644
index 0000000..9660537
--- /dev/null
+++ b/src/HL/AssemblyInfo.cs
@@ -0,0 +1,17 @@
+// -------------------------------------------------------------------------------------------------
+// Simple Version Control - © Copyright 2020 - Jam-Es.com
+// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
+// -------------------------------------------------------------------------------------------------
+
+using System.Windows;
+
+#pragma warning disable
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/src/HL/HL.csproj b/src/HL/HL.csproj
new file mode 100644
index 0000000..7d4c92d
--- /dev/null
+++ b/src/HL/HL.csproj
@@ -0,0 +1,135 @@
+
+
+
+ net4;netcoreapp3.0
+ true
+ 1.0.4
+ 1.0.4
+ 1.0.4
+ Open Source
+ Dirkster.HL
+ 2019-2020
+ This assembly implements a docking layout system for WPF.
+
+ true
+ https://github.com/Dirkster99/HL
+ https://github.com/Dirkster99/HL
+ Dirkster.HL
+ https://github.com/Dirkster99/HL
+ LICENSE
+
+ icon.png
+ avalonedit dark-theme light-theme theming highlighting
+ Mutlitargetting NetCore3 and Net 4.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
diff --git a/src/HL/HighlightingTheme/GlobalStyle.cs b/src/HL/HighlightingTheme/GlobalStyle.cs
new file mode 100644
index 0000000..d2221eb
--- /dev/null
+++ b/src/HL/HighlightingTheme/GlobalStyle.cs
@@ -0,0 +1,139 @@
+// -------------------------------------------------------------------------------------------------
+// Simple Version Control - © Copyright 2020 - Jam-Es.com
+// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
+// -------------------------------------------------------------------------------------------------
+
+#pragma warning disable
+
+namespace HL.HighlightingTheme
+{
+ using HL.Xshtd.interfaces;
+ using System.Windows.Media;
+
+ ///
+ /// Implements an object that holds general color and style definitions for the
+ /// Editor. These style definitions are usually non-highlighting language specific
+ /// (eg Hyperlink color) and can overwrite existing WPF definition (eg background or
+ /// foreground color)
+ ///
+ public class GlobalStyle : AbstractFreezable, IFreezable
+ {
+ #region fields
+ private string _TypeName;
+ private Color? _Foregroundcolor;
+ private Color? _Backgroundcolor;
+ private Color? _Bordercolor;
+ #endregion fields
+
+ #region ctors
+ ///
+ /// Construct a named (eg. 'Comment') WordStyle object
+ ///
+ ///
+ public GlobalStyle(string typeName)
+ : this()
+ {
+ this.TypeName = typeName;
+ }
+
+ ///
+ /// Hidden standard constructor
+ ///
+ protected GlobalStyle()
+ {
+ this.TypeName = string.Empty;
+ _Foregroundcolor = null;
+ _Backgroundcolor = null;
+ _Bordercolor = null;
+ }
+ #endregion ctors
+
+ #region properties
+ ///
+ /// Typed name of object
+ ///
+ /// (eg 'DefaultStyle', 'NonPrintableCharacter' ...,
+ /// (this is usually the key in a collection of these styles)
+ ///
+ public string TypeName
+ {
+ get
+ {
+ return _TypeName;
+ }
+ set
+ {
+ if (IsFrozen)
+ throw new System.InvalidOperationException("Property is already frozen.");
+
+ _TypeName = value;
+ }
+ }
+
+ ///
+ /// Get/set brush definition for the foreground used in this style
+ ///
+ public Color? foregroundcolor
+ {
+ get
+ {
+ return _Foregroundcolor;
+ }
+ set
+ {
+ if (IsFrozen)
+ throw new System.InvalidOperationException("Property is already frozen.");
+
+ _Foregroundcolor = value;
+ }
+ }
+
+ ///
+ /// Get/set brush definition for the background used in this style
+ ///
+ public Color? backgroundcolor
+ {
+ get
+ {
+ return _Backgroundcolor;
+ }
+ set
+ {
+ if (IsFrozen)
+ throw new System.InvalidOperationException("Property is already frozen.");
+
+ _Backgroundcolor = value;
+ }
+ }
+
+ ///
+ /// Get/set brush definition for the border used in this style
+ ///
+ public Color? bordercolor
+ {
+ get
+ {
+ return _Bordercolor;
+ }
+ set
+ {
+ if (IsFrozen)
+ throw new System.InvalidOperationException("Property is already frozen.");
+
+ _Bordercolor = value;
+ }
+ }
+ #endregion properties
+
+ #region methods
+ ///
+ /// Returns a string that represents the current object.
+ ///
+ ///
+ public override string ToString()
+ {
+ return "[" + (string.IsNullOrEmpty(this.TypeName) ? string.Empty : this.TypeName) + "]";
+ }
+ #endregion methods
+ }
+}
diff --git a/src/HL/HighlightingTheme/SyntaxDefinition.cs b/src/HL/HighlightingTheme/SyntaxDefinition.cs
new file mode 100644
index 0000000..fafe1ef
--- /dev/null
+++ b/src/HL/HighlightingTheme/SyntaxDefinition.cs
@@ -0,0 +1,130 @@
+// -------------------------------------------------------------------------------------------------
+// Simple Version Control - © Copyright 2020 - Jam-Es.com
+// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
+// -------------------------------------------------------------------------------------------------
+
+#pragma warning disable
+
+namespace HL.HighlightingTheme
+{
+ using HL.Xshtd.interfaces;
+ using ICSharpCode.AvalonEdit.Highlighting;
+ using ICSharpCode.AvalonEdit.Utils;
+ using System;
+ using System.Collections.Generic;
+
+ ///
+ /// Implements the object that keeps track of each syntax definition reference
+ /// within a highlighting theme definition.
+ ///
+ public class SyntaxDefinition : AbstractFreezable, IFreezable
+ {
+ #region fields
+ string _Name;
+ private readonly Dictionary _NamedHighlightingColors;
+ #endregion fields
+
+ #region ctors
+ ///
+ /// Class constructor
+ ///
+ public SyntaxDefinition(string paramName)
+ : this()
+ {
+ this._Name = paramName;
+ }
+
+ ///
+ /// Class constructor
+ ///
+ public SyntaxDefinition()
+ {
+ this.Extensions = new NullSafeCollection();
+ _NamedHighlightingColors = new Dictionary();
+ }
+ #endregion ctors
+
+ #region properties
+ ///
+ /// Gets/Sets the name of the color.
+ ///
+ public string Name
+ {
+ get
+ {
+ return _Name;
+ }
+ set
+ {
+ if (IsFrozen)
+ throw new InvalidOperationException();
+
+ _Name = value;
+ }
+ }
+
+ ///
+ /// Gets the associated extensions.
+ ///
+ public IList Extensions { get; private set; }
+
+ ///
+ /// Gets an enumeration of all highlighting colors that are defined
+ /// for this highlighting pattern (eg. C#) as part of a highlighting theme (eg 'True Blue').
+ ///
+ public IEnumerable NamedHighlightingColors
+ {
+ get
+ {
+ return _NamedHighlightingColors.Values;
+ }
+ }
+ #endregion properties
+
+ #region methods
+ ///
+ /// Returns a string that represents the current object.
+ ///
+ ///
+ public override string ToString()
+ {
+ return "[" + GetType().Name + " " + (string.IsNullOrEmpty(this.Name) ? string.Empty : this.Name) + "]";
+ }
+
+ ///
+ /// Gets a named color definition or null.
+ ///
+ ///
+ ///
+ public HighlightingColor ColorGet(string name)
+ {
+ HighlightingColor color;
+ if (_NamedHighlightingColors.TryGetValue(name, out color))
+ return color;
+
+ return null;
+ }
+
+ ///
+ /// Adds another named color definition.
+ /// Exceptions:
+ ///
+ /// key is null.
+ ///
+ ///
+ /// An element with the same key already exists in the System.Collections.Generic.Dictionary`2.
+ ///
+ ///
+ public void ColorAdd(HighlightingColor color)
+ {
+ _NamedHighlightingColors.Add(color.Name, color);
+ }
+
+ internal void ColorReplace(string name, HighlightingColor themeColor)
+ {
+ _NamedHighlightingColors.Remove(name);
+ _NamedHighlightingColors.Add(name, themeColor);
+ }
+ #endregion methods
+ }
+}
diff --git a/src/HL/Interfaces/IHLTheme.cs b/src/HL/Interfaces/IHLTheme.cs
new file mode 100644
index 0000000..f99b7bb
--- /dev/null
+++ b/src/HL/Interfaces/IHLTheme.cs
@@ -0,0 +1,123 @@
+// -------------------------------------------------------------------------------------------------
+// Simple Version Control - © Copyright 2020 - Jam-Es.com
+// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
+// -------------------------------------------------------------------------------------------------
+
+#pragma warning disable
+
+namespace HL.Manager
+{
+ using System.Collections.ObjectModel;
+ using HL.HighlightingTheme;
+ using HL.Xshtd;
+ using HL.Xshtd.interfaces;
+ using ICSharpCode.AvalonEdit.Highlighting;
+
+ ///
+ /// Defines a highlighting theme which is based on a WPF theme (eg. 'Light')
+ /// with a corresponding set of highlighting definitions (eg. 'XML', 'C#' etc)
+ /// to ensure that highlightings are correct in the contecxt of
+ /// (different background colors) WPF themes.
+ ///
+ public interface IHLTheme
+ {
+ #region properties
+ ///
+ /// Gets the display independent key value that should by unique in an
+ /// overall collection of highlighting themes and should be used for retrieval purposes.
+ ///
+ string Key { get; }
+
+ ///
+ /// Gets the prefix of the XSHD resources that should be used to lookup
+ /// the actual resource for this theme.
+ ///
+ /// This property is null for a derived highlighting theme since finding its
+ /// base highlighting should by performed through
+ /// and the corresponding property of that entry.
+ ///
+ string HLBasePrefix { get; }
+
+ ///
+ /// Gets the name of theme (eg. 'Dark' or 'Light' which is used as
+ /// the base of a derived highlighting theme.
+ ///
+ /// This property has the same value as the property
+ /// if the highlighting is GENERIC (since these highlightings come without
+ /// additional theme resources).
+ ///
+ string HLBaseKey { get; }
+
+ ///
+ /// Gets the prefix of the resource under which a theme resource definition
+ /// file xshTd can be found (eg 'HL.Resources.Themes').
+ ///
+ string HLThemePrefix { get; }
+
+ ///
+ /// Gets the file name under which a theme resource definition
+ /// file xshTd can be found (eg 'Dark.xshtd').
+ ///
+ string HLThemeFileName { get; }
+
+ ///
+ /// Gets the name of theme (eg. 'Dark', 'Light' or 'True Blue' for display purposes in the UI.
+ ///
+ string DisplayName { get; }
+
+ ///
+ /// Gets a copy of all highlightings defined in this object.
+ ///
+ ReadOnlyCollection HighlightingDefinitions { get; }
+
+ ///
+ /// Gets the theme highlighting definition for this theme
+ /// or null (highlighting definition is generic and not based on a theme).
+ ///
+ IHighlightingThemeDefinition HlTheme { get; }
+
+ ///
+ /// Gets/sets whether built-in themes have already been registered or not
+ /// Use this to avoid registration of built-in themes twice for one and the
+ /// same highlighting theme.
+ ///
+ bool IsBuiltInThemesRegistered { get; set; }
+ #endregion properties
+
+ #region methods
+ ///
+ /// Gets the highlighting definition by name, or null if it is not found.
+ ///
+ IHighlightingDefinition GetDefinition(string name);
+
+ ///
+ /// Gets a highlighting definition by extension.
+ /// Returns null if the definition is not found.
+ ///
+ IHighlightingDefinition GetDefinitionByExtension(string extension);
+
+ ///
+ /// Registers a highlighting definition.
+ ///
+ /// The name to register the definition with.
+ /// The file extensions to register the definition for.
+ /// The highlighting definition.
+ void RegisterHighlighting(string name, string[] extensions, IHighlightingDefinition highlighting);
+
+ ///
+ /// Gets the highlighting theme definition by name, or null if it is not found.
+ ///
+ ///
+ SyntaxDefinition GetThemeDefinition(string highlightingName);
+
+ ///
+ /// Converts a XSHD reference from namespace prefix and themename
+ /// into a object and returns it.
+ ///
+ ///
+ ///
+ ///
+ XhstdThemeDefinition ResolveHighLightingTheme(string hLPrefix, string hLThemeName);
+ #endregion methods
+ }
+}
\ No newline at end of file
diff --git a/src/HL/Interfaces/IThemedHighlightingManager.cs b/src/HL/Interfaces/IThemedHighlightingManager.cs
new file mode 100644
index 0000000..81eb050
--- /dev/null
+++ b/src/HL/Interfaces/IThemedHighlightingManager.cs
@@ -0,0 +1,72 @@
+// -------------------------------------------------------------------------------------------------
+// Simple Version Control - © Copyright 2020 - Jam-Es.com
+// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
+// -------------------------------------------------------------------------------------------------
+
+#pragma warning disable
+
+namespace HL.Interfaces
+{
+ using HL.Manager;
+ using HL.Xshtd.interfaces;
+ using ICSharpCode.AvalonEdit.Highlighting;
+ using System;
+ using System.Collections.ObjectModel;
+
+ ///
+ /// Defines a Highlighting Manager that associates syntax highlighting definitions with file extentions
+ /// (*.cs -> 'C#') with consideration of the current WPF App theme
+ ///
+ /// Extension App Theme SyntaxHighlighter
+ /// (*.cs + 'Dark') -> 'C#' (with color definitions for 'Dark')
+ ///
+ public interface IThemedHighlightingManager : IHighlightingDefinitionReferenceResolver,
+ IHighlightingThemeDefinitionReferenceResolver
+ {
+ #region properties
+ ///
+ /// Gets the current highlighting theme (eg 'Light' or 'Dark') that should be used as
+ /// a base for the syntax highlighting in AvalonEdit.
+ ///
+ IHLTheme CurrentTheme { get; }
+ #endregion properties
+
+ #region methods
+ ///
+ /// Gets a copy of all highlightings.
+ ///
+ ReadOnlyCollection HighlightingDefinitions { get; }
+
+ ///
+ /// Gets a highlighting definition by extension.
+ /// Returns null if the definition is not found.
+ ///
+ IHighlightingDefinition GetDefinitionByExtension(string extension);
+
+ ///
+ /// Registers a highlighting definition for the .
+ ///
+ /// The name to register the definition with.
+ /// The file extensions to register the definition for.
+ /// The highlighting definition.
+ void RegisterHighlighting(string name, string[] extensions, IHighlightingDefinition highlighting);
+
+ ///
+ /// Registers a highlighting definition.
+ ///
+ /// The name to register the definition with.
+ /// The file extensions to register the definition for.
+ /// A function that loads the highlighting definition.
+ void RegisterHighlighting(string name, string[] extensions, Func lazyLoadedHighlighting);
+
+ ///
+ /// Resets the highlighting theme based on the name of the WPF App Theme
+ /// (eg: WPF APP Theme 'Dark' -> Resolve highlighting 'C#' to 'Dark'->'C#')
+ ///
+ /// Throws an if the WPF APP theme is not known.
+ ///
+ ///
+ void SetCurrentTheme(string name);
+ #endregion methods
+ }
+}
diff --git a/src/HL/LICENSE b/src/HL/LICENSE
new file mode 100644
index 0000000..7d7cb0e
--- /dev/null
+++ b/src/HL/LICENSE
@@ -0,0 +1,9 @@
+Copyright 2019-2020 Dirkster99
+
+MIT License (https://opensource.org/licenses/MIT)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/HL/Manager/BusyManager.cs b/src/HL/Manager/BusyManager.cs
new file mode 100644
index 0000000..e98d56c
--- /dev/null
+++ b/src/HL/Manager/BusyManager.cs
@@ -0,0 +1,65 @@
+// -------------------------------------------------------------------------------------------------
+// Simple Version Control - © Copyright 2020 - Jam-Es.com
+// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
+// -------------------------------------------------------------------------------------------------
+
+#pragma warning disable
+
+namespace HL.Manager
+{
+ using System;
+ using System.Collections.Generic;
+
+ ///
+ /// This class is used to prevent stack overflows by representing a 'busy' flag
+ /// that prevents reentrance when another call is running.
+ /// However, using a simple 'bool busy' is not thread-safe, so we use a
+ /// thread-static BusyManager.
+ ///
+ internal static class BusyManager
+ {
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible",
+ Justification = "Should always be used with 'var'")]
+ public struct BusyLock : IDisposable
+ {
+ public static readonly BusyLock Failed = new BusyLock(null);
+
+ readonly List