From 7da33d5bb08330fd3cd97cfeb0184217dc051e19 Mon Sep 17 00:00:00 2001 From: bjsi Date: Tue, 10 Aug 2021 18:39:55 +0100 Subject: [PATCH] - Added: IControlSound --- .../Extensions/IControlEx.cs | 5 +++++ .../SuperMemo/Content/Controls/IControlGroup.cs | 3 +-- .../SuperMemo/Content/Controls/IControlSound.cs | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlSound.cs diff --git a/src/SuperMemoAssistant.Interop/Extensions/IControlEx.cs b/src/SuperMemoAssistant.Interop/Extensions/IControlEx.cs index a049edb..fa20a5e 100644 --- a/src/SuperMemoAssistant.Interop/Extensions/IControlEx.cs +++ b/src/SuperMemoAssistant.Interop/Extensions/IControlEx.cs @@ -58,5 +58,10 @@ public static IControlImage AsImage(this IControl ctrl) { return ctrl as IControlImage; } + + public static IControlSound AsSound(this IControl ctrl) + { + return ctrl as IControlSound; + } } } diff --git a/src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlGroup.cs b/src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlGroup.cs index 07773ec..6b41e99 100644 --- a/src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlGroup.cs +++ b/src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlGroup.cs @@ -47,8 +47,7 @@ public interface IControlGroup : IEnumerable IControlImage GetFirstImageControl(); IControlRtf GetFirstRtfControl(); IControlText GetFirstTextControl(); - - //IControlSound GetFirstSoundControl(); + IControlSound GetFirstSoundControl(); //IControlSpelling GetFirstSpellingControl(); //IControlVideo GetFirstVideoControl(); } diff --git a/src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlSound.cs b/src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlSound.cs new file mode 100644 index 0000000..0449942 --- /dev/null +++ b/src/SuperMemoAssistant.Interop/Interop/SuperMemo/Content/Controls/IControlSound.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SuperMemoAssistant.Interop.SuperMemo.Content.Controls +{ + using Registry.Members; + + public interface IControlSound : IControl + { + ISound SoundMember { get; set; } + + int SoundMemberId { get; set; } + } +}