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9
zFW9c0H3N!kp^vlt)5`Ay*j|-v{lVyD?MIux3;^-Vna}*s)CCYqo^!lhAJCWI!?R
z$R+0uyrkDy6W$Z)9=`*TpmV#us#*j1Eh6!Sv|%(;E!n3u<#ZD!L%ya6899|aNGp~6
z6x%8eVfgCEwTt*uzUWL66A2QbQ|$E&XAhpfEhnVkynpS-?YD8L@#NDAZmaK+k`GD_
z7f3)6jXp+j3uP)AT5Hj=o3ZL=e(z5MzU2BqUO4^+{%X&maYA>!XYI89mR)%=@bCm?(eYp0H)B
zwVXN{yHXO`J&00?QWjghVHQ0He|v~)RdP8=N5Jhg%^kyE>z8fN()2tf`BD)pK$v$H
zcGfo};ppPF0)>{aDtwG>e%SlX>`CQHJ*~ltghPGeScbfF@8c^B+#S~lnM6!~@BL_W
zVgsN!e?J;O7S^Y&csn8WLxGlTWH|uZU8yH@6&dr|FN?*#4$hwz?!Wo%#Rr}pl;6a~
ziCaH7oE5k86>89M2{z^#
z|E0Q8S(Ae8m%bq`2by<3IZdB8DSXC}oqQX&U;5dkQ<~Fwtl4B!FW!_x4wN(+4ku8HM3=L^V-hmfIU-->^#=mgAF$I
zC@N$a#o;sc6z$Olp%XEWlh$$}GLJZm#z{e0cJ#(NYs}h)+#VFq!hT5lR506xuOL4=
zhZ0AclSJ{V`+kK+_Mm3f&7Qrp1Cp?%?uPr%tcV=?yLi+ebKmb`;=DWA-+8uZLpH~;
z8<->SScVXNeK>}Rj9~V8Q3;GZPb2&_ZSBpvBEgfnDyJB-xl
zJ(jH1|7~51K@8BaF|o$4B{U`~ZK$+F9i0UaIOx6mK3Nkv=x-avIL7>UTNE$dxnrVa
z`3y79y?WszmOY!F8fGPigV#RI_-au0%N_rgMfsSpYHP
+
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 |