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" /> - - - - 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/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)] diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml new file mode 100644 index 00000000..e7ee5cdd --- /dev/null +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/Skins/DisplayLayoutSkin.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + \ 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 fb5b06ea..eac7f36e 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,6 +42,11 @@ + + + + diff --git a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs index 25f798ac..8179fdb9 100644 --- a/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs +++ b/src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs @@ -39,6 +39,8 @@ public class DisplayLayoutViewModel : ViewModelBase private EZLayout _ezLayout; private string _windowTitle; + private string _currentLayerNameTitle; + private string _currentLayerName; private bool _noLayoutAvailable; #endregion @@ -54,6 +56,24 @@ 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. + /// + public string CurrentLayerName + { + get => _currentLayerName; + set => Set(ref _currentLayerName, value); + } + /// /// Gets or sets the no layout available indicator. /// @@ -122,6 +142,8 @@ public DisplayLayoutViewModel(IWindowService windowService, ILayoutService layou private void SetLabelUi() { WindowTitle = "ErgoDox Layout"; + CurrentLayerNameTitle = "Current layer :"; + CurrentLayerName = ""; } private async void LoadCompleteLayout() @@ -162,6 +184,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; @@ -174,14 +197,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 +214,9 @@ private void LoadDesignTimeModel() Label = new KeyLabel("E"), Modifier = new KeyLabel("Left Shift"), KeyCategory = KeyCategory.French, - InternationalHint = "fr" - }; + InternationalHint = "fr", + Color = "#777" + }; } } @@ -227,9 +253,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)