diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-13 07:57:29 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-13 08:19:53 +0100 |
| commit | 0efa7446134489edd303b349ae1220f1c4228e9a (patch) | |
| tree | 3f7100d5bb31504c6971661de7da509e3b17be26 /src/StyleReader.cs | |
| parent | 688cd87004569c122bf19c127699c5b034492528 (diff) | |
styling is no longer static in iface to allow different styling context between ifaces
Diffstat (limited to 'src/StyleReader.cs')
| -rw-r--r-- | src/StyleReader.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/StyleReader.cs b/src/StyleReader.cs index 8a79cd4a..26037091 100644 --- a/src/StyleReader.cs +++ b/src/StyleReader.cs @@ -43,8 +43,8 @@ namespace Crow int column = 1; int line = 1; - public StyleReader (Assembly assembly, string resId) - : base(assembly.GetManifestResourceStream (resId)) + public StyleReader (Interface iface, Stream stream, string resId) + : base(stream) { resourceId = resId; string styleKey = resId.Substring (0, resId.Length - 6); @@ -137,11 +137,11 @@ namespace Crow string expression = token.Trim (); foreach (string tc in targetsClasses) { - if (!Interface.Styling.ContainsKey (tc)) - Interface.Styling [tc] = new Style (); - else if (Interface.Styling [tc].ContainsKey (currentProperty)) + if (!iface.Styling.ContainsKey (tc)) + iface.Styling [tc] = new Style (); + else if (iface.Styling [tc].ContainsKey (currentProperty)) continue; - Interface.Styling [tc] [currentProperty] = expression; + iface.Styling [tc] [currentProperty] = expression; } token = ""; } |