From 1862090a89790c152d7a58d539a0a360be6a07ff Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 13 Oct 2020 09:53:18 -0600 Subject: [PATCH 1/6] #440 add interfaces --- .../DeviceTypeInterfaces/ILanguageDefinition.cs | 11 +++++++++++ .../DeviceTypeInterfaces/ILanguageLabel.cs | 8 ++++++++ .../DeviceTypeInterfaces/ILanguageProvider.cs | 14 ++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs create mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs create mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs new file mode 100644 index 00000000..8c81d6bb --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs @@ -0,0 +1,11 @@ +using System; + +namespace PepperDash_Essentials_Core.DeviceTypeInterfaces +{ + public interface ILanguageDefinition + { + ILanguageDefinition CurrentLanguage { get; set; } + + event EventHandler CurrentLanguageChanged; + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs new file mode 100644 index 00000000..7f3fecd7 --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs @@ -0,0 +1,8 @@ +namespace PepperDash_Essentials_Core.DeviceTypeInterfaces +{ + public interface ILanguageLabel + { + string Description { get; set; } + string DisplayText { get; set; } + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs new file mode 100644 index 00000000..34047535 --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +namespace PepperDash_Essentials_Core.DeviceTypeInterfaces +{ + public interface ILanguageProvider + { + string LocaleName { get; set; } + string FriendlyName { get; set; } + bool Enable { get; set; } + List UiLabels { get; set; } + List Sources { get; set; } + List Destinations { get; set; } + } +} \ No newline at end of file From 08c929699fa5f966db007cbed2d4526a8360e94b Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 13 Oct 2020 10:29:30 -0600 Subject: [PATCH 2/6] #440 Updates for csproj file --- .../PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 36afcac4..4b5d20b8 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -206,7 +206,10 @@ + + + From cb752850ffe2566cf85ecaf91be154fe6fccaa51 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 13 Oct 2020 13:30:29 -0600 Subject: [PATCH 3/6] correct interfaces --- .../DeviceTypeInterfaces/ILanguageDefinition.cs | 10 +++++++--- .../DeviceTypeInterfaces/ILanguageProvider.cs | 15 +++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs index 8c81d6bb..659b396a 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs @@ -1,11 +1,15 @@ using System; +using System.Collections.Generic; namespace PepperDash_Essentials_Core.DeviceTypeInterfaces { public interface ILanguageDefinition { - ILanguageDefinition CurrentLanguage { get; set; } - - event EventHandler CurrentLanguageChanged; + string LocaleName { get; set; } + string FriendlyName { get; set; } + bool Enable { get; set; } + List UiLabels { get; set; } + List Sources { get; set; } + List Destinations { get; set; } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs index 34047535..2ae483f6 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageProvider.cs @@ -1,14 +1,13 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace PepperDash_Essentials_Core.DeviceTypeInterfaces { - public interface ILanguageProvider + public interface ILanguageProvider { - string LocaleName { get; set; } - string FriendlyName { get; set; } - bool Enable { get; set; } - List UiLabels { get; set; } - List Sources { get; set; } - List Destinations { get; set; } + ILanguageDefinition CurrentLanguage { get; set; } + + event EventHandler CurrentLanguageChanged; } + } \ No newline at end of file From 1150d9e497a3194a19598fc9fe48947b79687cdd Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 13 Oct 2020 15:18:31 -0600 Subject: [PATCH 4/6] add IKeyed to ILanguageLabel to easily get the key --- .../DeviceTypeInterfaces/ILanguageLabel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs index 7f3fecd7..3473ea60 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs @@ -1,6 +1,8 @@ -namespace PepperDash_Essentials_Core.DeviceTypeInterfaces +using PepperDash.Core; + +namespace PepperDash_Essentials_Core.DeviceTypeInterfaces { - public interface ILanguageLabel + public interface ILanguageLabel:IKeyed { string Description { get; set; } string DisplayText { get; set; } From 7bbdf434527b7a53f168409a3f3fd8f5ee6263ad Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 15 Oct 2020 16:37:41 -0600 Subject: [PATCH 5/6] add full implementation for LanguageLabel --- .../DeviceTypeInterfaces/ILanguageDefinition.cs | 6 +++--- .../DeviceTypeInterfaces/ILanguageLabel.cs | 10 ---------- .../DeviceTypeInterfaces/LanguageLabel.cs | 12 ++++++++++++ 3 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs create mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/LanguageLabel.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs index 659b396a..f6849791 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageDefinition.cs @@ -8,8 +8,8 @@ namespace PepperDash_Essentials_Core.DeviceTypeInterfaces string LocaleName { get; set; } string FriendlyName { get; set; } bool Enable { get; set; } - List UiLabels { get; set; } - List Sources { get; set; } - List Destinations { get; set; } + List UiLabels { get; set; } + List Sources { get; set; } + List Destinations { get; set; } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs deleted file mode 100644 index 3473ea60..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/ILanguageLabel.cs +++ /dev/null @@ -1,10 +0,0 @@ -using PepperDash.Core; - -namespace PepperDash_Essentials_Core.DeviceTypeInterfaces -{ - public interface ILanguageLabel:IKeyed - { - string Description { get; set; } - string DisplayText { get; set; } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/LanguageLabel.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/LanguageLabel.cs new file mode 100644 index 00000000..345da2ed --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/LanguageLabel.cs @@ -0,0 +1,12 @@ +using PepperDash.Core; + +namespace PepperDash_Essentials_Core.DeviceTypeInterfaces +{ + public class LanguageLabel + { + public string Key { get; set; } + public string Description { get; set; } + public string DisplayText { get; set; } + public uint JoinNumber { get; set; } + } +} \ No newline at end of file From 36fd1dcda9d1da3347fbb9de5ff2ffdbcddd3750 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 15 Oct 2020 16:59:39 -0600 Subject: [PATCH 6/6] file name change --- .../PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 4981c8a7..98e4e510 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -195,7 +195,7 @@ - +