diff --git a/mRemoteNG/Config/CredentialRepositoryListLoader.cs b/mRemoteNG/Config/CredentialRepositoryListLoader.cs index cd9088f0..c332b195 100644 --- a/mRemoteNG/Config/CredentialRepositoryListLoader.cs +++ b/mRemoteNG/Config/CredentialRepositoryListLoader.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Runtime.Versioning; using mRemoteNG.Config.DataProviders; using mRemoteNG.Config.Serializers.CredentialProviderSerializer; using mRemoteNG.Credential; @@ -22,6 +23,7 @@ namespace mRemoteNG.Config _deserializer = deserializer; } + [SupportedOSPlatform("windows")] public IEnumerable Load() { var data = _dataProvider.Load(); diff --git a/mRemoteNG/Themes/MremoteNGThemeBase.cs b/mRemoteNG/Themes/MremoteNGThemeBase.cs index 2b83460e..5ed16477 100644 --- a/mRemoteNG/Themes/MremoteNGThemeBase.cs +++ b/mRemoteNG/Themes/MremoteNGThemeBase.cs @@ -23,6 +23,7 @@ namespace mRemoteNG.Themes } } + [SupportedOSPlatform("windows")] public class MremoteDockPaneStripFactory : DockPanelExtender.IDockPaneStripFactory { public DockPaneStripBase CreateDockPaneStrip(DockPane pane) => new DockPaneStripNG(pane); diff --git a/mRemoteNG/UI/TaskDialog/cTaskDialog.cs b/mRemoteNG/UI/TaskDialog/cTaskDialog.cs index 697f2b52..f356f31e 100644 --- a/mRemoteNG/UI/TaskDialog/cTaskDialog.cs +++ b/mRemoteNG/UI/TaskDialog/cTaskDialog.cs @@ -41,6 +41,7 @@ namespace mRemoteNG.UI.TaskDialog #region [ShowTaskDialogBox] + [SupportedOSPlatform("windows")] public static DialogResult ShowTaskDialogBox(IWin32Window owner, string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText, string radioButtons, string commandButtons, ETaskDialogButtons buttons, ESysIcons mainIcon, ESysIcons footerIcon, int defaultIndex) { DialogResult result; @@ -77,6 +78,7 @@ namespace mRemoteNG.UI.TaskDialog //-------------------------------------------------------------------------------- // Overloaded versions... //-------------------------------------------------------------------------------- + [SupportedOSPlatform("windows")] public static DialogResult ShowTaskDialogBox(IWin32Window owner, string title, string mainInstruction, @@ -93,6 +95,7 @@ namespace mRemoteNG.UI.TaskDialog return ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, radioButtons, commandButtons, buttons, mainIcon, footerIcon, 0); } + [SupportedOSPlatform("windows")] public static DialogResult ShowTaskDialogBox(string title, string mainInstruction, string content, @@ -111,6 +114,8 @@ namespace mRemoteNG.UI.TaskDialog #endregion #region [MessageBox] + + [SupportedOSPlatform("windows")] public static DialogResult MessageBox(IWin32Window owner, string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText, ETaskDialogButtons buttons, ESysIcons mainIcon, ESysIcons footerIcon) { return ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, "", "", buttons, mainIcon, footerIcon); @@ -119,16 +124,19 @@ namespace mRemoteNG.UI.TaskDialog //-------------------------------------------------------------------------------- // Overloaded versions... //-------------------------------------------------------------------------------- + [SupportedOSPlatform("windows")] public static DialogResult MessageBox(string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText, ETaskDialogButtons buttons, ESysIcons mainIcon, ESysIcons footerIcon) { return ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, "", "", buttons, mainIcon, footerIcon); } + [SupportedOSPlatform("windows")] public static DialogResult MessageBox(IWin32Window owner, string title, string mainInstruction, string content, ETaskDialogButtons buttons, ESysIcons mainIcon) { return MessageBox(owner, title, mainInstruction, content, "", "", "", buttons, mainIcon, ESysIcons.Information); } + [SupportedOSPlatform("windows")] public static DialogResult MessageBox(string title, string mainInstruction, string content, ETaskDialogButtons buttons, ESysIcons mainIcon) { return MessageBox(null, title, mainInstruction, content, "", "", "", buttons, mainIcon, ESysIcons.Information); @@ -143,6 +151,7 @@ namespace mRemoteNG.UI.TaskDialog #region [ShowRadioBox] //-------------------------------------------------------------------------------- + [SupportedOSPlatform("windows")] public static int ShowRadioBox(IWin32Window owner, string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText, string radioButtons, ESysIcons mainIcon, ESysIcons footerIcon, int defaultIndex) { var res = ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, radioButtons, "", ETaskDialogButtons.OkCancel, mainIcon, footerIcon, defaultIndex); @@ -154,6 +163,7 @@ namespace mRemoteNG.UI.TaskDialog //-------------------------------------------------------------------------------- // Overloaded versions... //-------------------------------------------------------------------------------- + [SupportedOSPlatform("windows")] public static int ShowRadioBox(string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText, string radioButtons, ESysIcons mainIcon, ESysIcons footerIcon, int defaultIndex) { var res = ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, radioButtons, "", ETaskDialogButtons.OkCancel, mainIcon, footerIcon, defaultIndex); @@ -162,21 +172,25 @@ namespace mRemoteNG.UI.TaskDialog return -1; } + [SupportedOSPlatform("windows")] public static int ShowRadioBox(IWin32Window owner, string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText, string radioButtons, ESysIcons mainIcon, ESysIcons footerIcon) { return ShowRadioBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, radioButtons, ESysIcons.Question, ESysIcons.Information, 0); } + [SupportedOSPlatform("windows")] public static int ShowRadioBox(IWin32Window owner, string title, string mainInstruction, string content, string radioButtons, int defaultIndex) { return ShowRadioBox(owner, title, mainInstruction, content, "", "", "", radioButtons, ESysIcons.Question, ESysIcons.Information, defaultIndex); } + [SupportedOSPlatform("windows")] public static int ShowRadioBox(IWin32Window owner, string title, string mainInstruction, string content, string radioButtons) { return ShowRadioBox(owner, title, mainInstruction, content, "", "", "", radioButtons, ESysIcons.Question, ESysIcons.Information, 0); } + [SupportedOSPlatform("windows")] public static int ShowRadioBox(string title, string mainInstruction, string content, string radioButtons) { return ShowRadioBox(null, title, mainInstruction, content, "", "", "", radioButtons, ESysIcons.Question, ESysIcons.Information, 0); @@ -189,6 +203,7 @@ namespace mRemoteNG.UI.TaskDialog #region ShowCommandBox //-------------------------------------------------------------------------------- + [SupportedOSPlatform("windows")] public static int ShowCommandBox(IWin32Window owner, string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText,string commandButtons, bool showCancelButton, ESysIcons mainIcon, ESysIcons footerIcon) { var res = ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, "", commandButtons, showCancelButton ? ETaskDialogButtons.Cancel : ETaskDialogButtons.None, mainIcon, footerIcon); @@ -200,6 +215,7 @@ namespace mRemoteNG.UI.TaskDialog //-------------------------------------------------------------------------------- // Overloaded versions... //-------------------------------------------------------------------------------- + [SupportedOSPlatform("windows")] public static int ShowCommandBox(string title, string mainInstruction, string content, string expandedInfo, string footer, string verificationText, string commandButtons, bool showCancelButton, ESysIcons mainIcon, ESysIcons footerIcon) { var res = ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText,"", commandButtons, showCancelButton ? ETaskDialogButtons.Cancel : ETaskDialogButtons.None, mainIcon, footerIcon); @@ -208,11 +224,13 @@ namespace mRemoteNG.UI.TaskDialog return -1; } + [SupportedOSPlatform("windows")] public static int ShowCommandBox(IWin32Window owner, string title, string mainInstruction, string content, string commandButtons, bool showCancelButton) { return ShowCommandBox(owner, title, mainInstruction, content, "", "", "", commandButtons, showCancelButton, ESysIcons.Question, ESysIcons.Information); } + [SupportedOSPlatform("windows")] public static int ShowCommandBox(string title, string mainInstruction, string content, string commandButtons, bool showCancelButton) { return ShowCommandBox(null, title, mainInstruction, content, "", "", "", commandButtons, showCancelButton, ESysIcons.Question, ESysIcons.Information);