From f53d68d923065fcd9de95e47c73d99968b5d0fc9 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 17:36:07 -0400 Subject: [PATCH 01/14] Add design time key colors --- .../ViewModel/DisplayLayoutViewModel.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs index 25f798ac..ea889791 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs @@ -174,14 +174,16 @@ private void LoadDesignTimeModel() Label = new KeyLabel("="), Modifier = new KeyLabel("Left Shift"), DisplayType = KeyDisplayType.ModifierOnTop, - KeyCategory = KeyCategory.DualFunction + KeyCategory = KeyCategory.DualFunction, + Color = "#111" }; CurrentLayoutTemplate[1].EZKey = new EZKey { Label = new KeyLabel("LT \u2192 1"), DisplayType = KeyDisplayType.SimpleLabel, - KeyCategory = KeyCategory.DualFunction - }; + KeyCategory = KeyCategory.DualFunction, + Color = "#BBB" + }; for (int i = 2 ; i < CurrentLayoutTemplate.Count ; i++) { @@ -189,8 +191,9 @@ private void LoadDesignTimeModel() Label = new KeyLabel("E"), Modifier = new KeyLabel("Left Shift"), KeyCategory = KeyCategory.French, - InternationalHint = "fr" - }; + InternationalHint = "fr", + Color = "#777" + }; } } From bf0a1af45138e1d6c55d15302f9bc2d88fe28dfa Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 17:52:02 -0400 Subject: [PATCH 02/14] Add the layer text block --- .../View/DisplayLayoutWindow.xaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml index fb5b06ea..0c6be9a9 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml @@ -33,6 +33,9 @@ + + + From 17ab3c371c58cd6b20fb387e353adaa738a7a81a Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 17:57:18 -0400 Subject: [PATCH 03/14] Fix the IsGlowing summary --- src/InvvardDev.EZLayoutDisplay.Desktop/Model/KeyTemplate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/Model/KeyTemplate.cs b/src/InvvardDev.EZLayoutDisplay.Desktop/Model/KeyTemplate.cs index ee1d4332..4910beae 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/Model/KeyTemplate.cs +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/Model/KeyTemplate.cs @@ -62,7 +62,7 @@ public class KeyTemplate public string RotationOrigin { get; set; } /// - /// Gets or sets the key . + /// Gets or sets the key Glowing indicator. /// [JsonProperty("glow", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] [DefaultValue(false)] From 090e7e52b1d84a53a4787e8d627bf3467e928d53 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:07:04 -0400 Subject: [PATCH 04/14] Add current layer name property --- .../ViewModel/DisplayLayoutViewModel.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs index ea889791..1e74ff55 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs @@ -40,6 +40,7 @@ public class DisplayLayoutViewModel : ViewModelBase private string _windowTitle; private bool _noLayoutAvailable; + private string _currentLayerName; #endregion @@ -54,6 +55,15 @@ public string WindowTitle set => Set(ref _windowTitle, value); } + /// + /// Gets or sets the current layer name. + /// + public string CurrentLayerName + { + get => _currentLayerName; + set => Set(ref _currentLayerName, value); + } + /// /// Gets or sets the no layout available indicator. /// @@ -230,6 +240,7 @@ private void SwitchLayer() if (_layoutTemplates.Any()) { CurrentLayoutTemplate = new ObservableCollection(_layoutTemplates[CurrentLayerIndex]); + } } From aa2aa81c3745db58a9e1a789a723b238db423592 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:09:28 -0400 Subject: [PATCH 05/14] Initialize current layer name --- .../ViewModel/DisplayLayoutViewModel.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs index 1e74ff55..1e9a5e4f 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs @@ -132,6 +132,7 @@ public DisplayLayoutViewModel(IWindowService windowService, ILayoutService layou private void SetLabelUi() { WindowTitle = "ErgoDox Layout"; + CurrentLayerName = ""; } private async void LoadCompleteLayout() @@ -172,6 +173,7 @@ private void LoadDesignTimeModel() Logger.TraceMethod(); NoLayoutAvailable = false; + CurrentLayerName = "Current Layer Name"; var json = Encoding.Default.GetString(Resources.layoutDefinition); var layoutDefinition = JsonConvert.DeserializeObject>(json) as List; From 9fabb4cf2c1c10ac672876722dcb9725db1581ae Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:15:54 -0400 Subject: [PATCH 06/14] Bind Layer name --- .../View/DisplayLayoutWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml index 0c6be9a9..cbb243f7 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml @@ -34,7 +34,7 @@ - + From 8cc4327a16cbcae1f244539294a2351eec32ecd8 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:16:14 -0400 Subject: [PATCH 07/14] Change layer name --- .../ViewModel/DisplayLayoutViewModel.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs index 1e9a5e4f..24fdb47b 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs @@ -242,10 +242,15 @@ private void SwitchLayer() if (_layoutTemplates.Any()) { CurrentLayoutTemplate = new ObservableCollection(_layoutTemplates[CurrentLayerIndex]); - + ChangeLayerName(); } } + private void ChangeLayerName() + { + CurrentLayerName = _ezLayout.EZLayers[CurrentLayerIndex].Name; + } + #region Delegates private void LoadCompleteLayout(UpdatedLayoutMessage obj) From ed1c3a2672f2eb5db1c1a90d57ad32523581c863 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:19:46 -0400 Subject: [PATCH 08/14] Adjust text formating --- .../View/DisplayLayoutWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml index cbb243f7..b5c36d42 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml @@ -34,7 +34,7 @@ - + From 8e87b9fdfa8f3db07382884612655296b7d8a936 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:26:18 -0400 Subject: [PATCH 09/14] Add the current layer name title --- .../ViewModel/DisplayLayoutViewModel.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs index 24fdb47b..8179fdb9 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs @@ -39,8 +39,9 @@ public class DisplayLayoutViewModel : ViewModelBase private EZLayout _ezLayout; private string _windowTitle; - private bool _noLayoutAvailable; + private string _currentLayerNameTitle; private string _currentLayerName; + private bool _noLayoutAvailable; #endregion @@ -55,6 +56,15 @@ public string WindowTitle set => Set(ref _windowTitle, value); } + /// + /// Gets or sets the current layer name title. + /// + public string CurrentLayerNameTitle + { + get => _currentLayerNameTitle; + set => Set(ref _currentLayerNameTitle, value); + } + /// /// Gets or sets the current layer name. /// @@ -132,6 +142,7 @@ public DisplayLayoutViewModel(IWindowService windowService, ILayoutService layou private void SetLabelUi() { WindowTitle = "ErgoDox Layout"; + CurrentLayerNameTitle = "Current layer :"; CurrentLayerName = ""; } From a9f280fc31e998ce488b78def48886833dfd7040 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:26:38 -0400 Subject: [PATCH 10/14] Display the current layer name title --- .../View/DisplayLayoutWindow.xaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml index b5c36d42..9e0df1a0 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml @@ -34,7 +34,8 @@ - + + From f724fa58e45604a8e214616af3b6f26b60b22e57 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 18:28:52 -0400 Subject: [PATCH 11/14] Add the DisplayLayoutWindow skin --- .../InvvardDev.EZLayoutDisplay.Desktop.csproj | 4 ++++ .../Skins/DisplayLayoutSkin.xaml | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/InvvardDev.EZLayoutDisplay.Desktop.csproj b/src/InvvardDev.EZLayoutDisplay.Desktop/InvvardDev.EZLayoutDisplay.Desktop.csproj index e97b739f..8841daaa 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/InvvardDev.EZLayoutDisplay.Desktop.csproj +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/InvvardDev.EZLayoutDisplay.Desktop.csproj @@ -172,6 +172,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml new file mode 100644 index 00000000..3ccc94d7 --- /dev/null +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml @@ -0,0 +1,5 @@ + + + \ No newline at end of file From 573aab0e041a222ba1091d8d14f4dcc7dcb17805 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 20:39:16 -0400 Subject: [PATCH 12/14] Move merged dictionaries to window --- src/InvvardDev.EZLayoutDisplay.Desktop/App.xaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/App.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/App.xaml index e5a918a7..a06a2aea 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/App.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/App.xaml @@ -26,10 +26,6 @@ TrueValue="Visible" FalseValue="Hidden" /> - - - - From aa8ba27348b7225df438d3a066e426e467a9d906 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 20:42:04 -0400 Subject: [PATCH 13/14] Move textblocks style to dictionary --- .../Skins/DisplayLayoutSkin.xaml | 21 +++++++++++++++++-- .../View/DisplayLayoutWindow.xaml | 16 +++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml index 3ccc94d7..708d85bc 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml @@ -1,5 +1,22 @@  + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + + + + + + + \ No newline at end of file diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml index 9e0df1a0..618d2519 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/View/DisplayLayoutWindow.xaml @@ -13,6 +13,15 @@ Title="{Binding WindowTitle}" Icon="{StaticResource WindowIcon}" DataContext="{Binding DisplayLayout, Source={StaticResource Locator}}"> + + + + + + + + + @@ -33,9 +42,10 @@ - - - + + + From 4a76a13f810c7dcedffe1490dc87136bfa53fd15 Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 29 Mar 2019 20:46:00 -0400 Subject: [PATCH 14/14] Move StackPanel style to dictionary --- .../Skins/DisplayLayoutSkin.xaml | 11 +++++++++-- .../View/DisplayLayoutWindow.xaml | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml index 708d85bc..e7ee5cdd 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml @@ -1,7 +1,14 @@  - - + + +