mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
fix CA1416: Validate platform compatibility
https://learn.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/quality-rules/ca1416
This commit is contained in:
@@ -39,7 +39,6 @@ Global
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.Build.0 = Debug|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.Build.0 = Release|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.Build.0 = Release Portable|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.ActiveCfg = Release|x64
|
||||
@@ -68,6 +67,7 @@ Global
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.Build.0 = Release|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x64.ActiveCfg = Release|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x64.Build.0 = Release|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Installer|x64.ActiveCfg = Debug|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
@@ -81,7 +81,6 @@ Global
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.Build.0 = Debug|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.Build.0 = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.Build.0 = Release Portable|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release|x64.ActiveCfg = Release|x64
|
||||
|
||||
@@ -8,9 +8,11 @@ using mRemoteNG.Properties;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class CompatibilityChecker
|
||||
{
|
||||
public static void CheckCompatibility(MessageCollector messageCollector)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Management;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Messages;
|
||||
@@ -7,6 +8,7 @@ using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.App.Initialization
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class StartupDataLogger
|
||||
{
|
||||
private readonly MessageCollector _messageCollector;
|
||||
|
||||
@@ -17,9 +17,11 @@ using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class Runtime
|
||||
{
|
||||
public static bool IsPortableEdition
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
@@ -8,6 +9,7 @@ using mRemoteNG.Messages;
|
||||
|
||||
namespace mRemoteNG.Config.Connections.Multiuser
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SqlConnectionsUpdateChecker : IConnectionsUpdateChecker
|
||||
{
|
||||
private readonly IDatabaseConnector _dbConnector;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Management;
|
||||
using System.Net;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security.Principal;
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App;
|
||||
@@ -12,6 +13,7 @@ using mRemoteNG.Messages;
|
||||
|
||||
namespace mRemoteNG.Config.Putty
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class PuttySessionsRegistryProvider : AbstractPuttySessionsProvider
|
||||
{
|
||||
private const string PuttySessionsKey = "Software\\SimonTatham\\PuTTY\\Sessions";
|
||||
|
||||
@@ -10,9 +10,11 @@ using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.MiscSerializers
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ActiveDirectoryDeserializer
|
||||
{
|
||||
private readonly string _ldapPath;
|
||||
|
||||
@@ -10,10 +10,12 @@ using mRemoteNG.Container;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.MiscSerializers
|
||||
{
|
||||
public class RemoteDesktopConnectionManagerDeserializer : IDeserializer<string, ConnectionTreeModel>
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class RemoteDesktopConnectionManagerDeserializer : IDeserializer<string, ConnectionTreeModel>
|
||||
{
|
||||
private static int _schemaVersion; /* 1 = RDCMan v2.2
|
||||
3 = RDCMan v2.7 */
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.App.Info;
|
||||
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ConnectionIcon : StringConverter
|
||||
{
|
||||
public static string[] Icons = { };
|
||||
|
||||
@@ -12,10 +12,11 @@ using mRemoteNG.UI.Tabs;
|
||||
using mRemoteNG.UI.Window;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using mRemoteNG.Resources.Language;
|
||||
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ConnectionInitiator : IConnectionInitiator
|
||||
{
|
||||
private readonly PanelAdder _panelAdder = new PanelAdder();
|
||||
|
||||
@@ -19,10 +19,12 @@ using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.UI;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
{
|
||||
public class ConnectionsService
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ConnectionsService
|
||||
{
|
||||
private static readonly object SaveLock = new object();
|
||||
private readonly PuttySessionsManager _puttySessionsManager;
|
||||
|
||||
@@ -4,11 +4,13 @@ using System;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Tabs;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// ReSharper disable UnusedMember.Local
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public abstract class ProtocolBase : IDisposable
|
||||
{
|
||||
#region Private Variables
|
||||
|
||||
@@ -12,11 +12,13 @@ using System.Windows.Forms;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class PuttyBase : ProtocolBase
|
||||
{
|
||||
private const int IDM_RECONF = 0x50; // PuTTY Settings Menu ID
|
||||
|
||||
@@ -17,9 +17,11 @@ using MSTSCLib;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
using System.DirectoryServices.ActiveDirectory;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class RdpProtocol6 : ProtocolBase, ISupportsViewOnly
|
||||
{
|
||||
/* RDP v8 requires Windows 7 with:
|
||||
|
||||
@@ -1,129 +1,129 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using AxMSTSCLib;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
using MSTSCLib;
|
||||
using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
/* RDP v8 requires Windows 7 with:
|
||||
* https://support.microsoft.com/en-us/kb/2592687
|
||||
* OR
|
||||
* https://support.microsoft.com/en-us/kb/2923545
|
||||
*
|
||||
* Windows 8+ support RDP v8 out of the box.
|
||||
*/
|
||||
public class RdpProtocol8 : RdpProtocol7
|
||||
{
|
||||
private MsRdpClient8NotSafeForScripting RdpClient8 => (MsRdpClient8NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
private Size _controlBeginningSize;
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc8;
|
||||
|
||||
public override bool SmartSize
|
||||
{
|
||||
get => base.SmartSize;
|
||||
protected set
|
||||
{
|
||||
base.SmartSize = value;
|
||||
DoResizeClient();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Fullscreen
|
||||
{
|
||||
get => base.Fullscreen;
|
||||
protected set
|
||||
{
|
||||
base.Fullscreen = value;
|
||||
DoResizeClient();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ResizeBegin(object sender, EventArgs e)
|
||||
{
|
||||
_controlBeginningSize = Control.Size;
|
||||
}
|
||||
|
||||
public override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (DoResizeControl() && _controlBeginningSize.IsEmpty)
|
||||
{
|
||||
DoResizeClient();
|
||||
}
|
||||
base.Resize(sender, e);
|
||||
}
|
||||
|
||||
public override void ResizeEnd(object sender, EventArgs e)
|
||||
{
|
||||
DoResizeControl();
|
||||
if (!(Control.Size == _controlBeginningSize))
|
||||
{
|
||||
DoResizeClient();
|
||||
}
|
||||
_controlBeginningSize = Size.Empty;
|
||||
}
|
||||
|
||||
protected override AxHost CreateActiveXRdpClientControl()
|
||||
{
|
||||
return new AxMsRdpClient8NotSafeForScripting();
|
||||
}
|
||||
|
||||
private void DoResizeClient()
|
||||
{
|
||||
if (!loginComplete)
|
||||
return;
|
||||
|
||||
if (!InterfaceControl.Info.AutomaticResize)
|
||||
return;
|
||||
|
||||
if (!(InterfaceControl.Info.Resolution == RDPResolutions.FitToWindow ||
|
||||
InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen))
|
||||
return;
|
||||
|
||||
if (SmartSize)
|
||||
return;
|
||||
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg,
|
||||
$"Resizing RDP connection to host '{connectionInfo.Hostname}'");
|
||||
|
||||
try
|
||||
{
|
||||
var size = Fullscreen
|
||||
? Screen.FromControl(Control).Bounds.Size
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using AxMSTSCLib;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
using MSTSCLib;
|
||||
using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
/* RDP v8 requires Windows 7 with:
|
||||
* https://support.microsoft.com/en-us/kb/2592687
|
||||
* OR
|
||||
* https://support.microsoft.com/en-us/kb/2923545
|
||||
*
|
||||
* Windows 8+ support RDP v8 out of the box.
|
||||
*/
|
||||
public class RdpProtocol8 : RdpProtocol7
|
||||
{
|
||||
private MsRdpClient8NotSafeForScripting RdpClient8 => (MsRdpClient8NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
private Size _controlBeginningSize;
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc8;
|
||||
|
||||
public override bool SmartSize
|
||||
{
|
||||
get => base.SmartSize;
|
||||
protected set
|
||||
{
|
||||
base.SmartSize = value;
|
||||
DoResizeClient();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Fullscreen
|
||||
{
|
||||
get => base.Fullscreen;
|
||||
protected set
|
||||
{
|
||||
base.Fullscreen = value;
|
||||
DoResizeClient();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ResizeBegin(object sender, EventArgs e)
|
||||
{
|
||||
_controlBeginningSize = Control.Size;
|
||||
}
|
||||
|
||||
public override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (DoResizeControl() && _controlBeginningSize.IsEmpty)
|
||||
{
|
||||
DoResizeClient();
|
||||
}
|
||||
base.Resize(sender, e);
|
||||
}
|
||||
|
||||
public override void ResizeEnd(object sender, EventArgs e)
|
||||
{
|
||||
DoResizeControl();
|
||||
if (!(Control.Size == _controlBeginningSize))
|
||||
{
|
||||
DoResizeClient();
|
||||
}
|
||||
_controlBeginningSize = Size.Empty;
|
||||
}
|
||||
|
||||
protected override AxHost CreateActiveXRdpClientControl()
|
||||
{
|
||||
return new AxMsRdpClient8NotSafeForScripting();
|
||||
}
|
||||
|
||||
private void DoResizeClient()
|
||||
{
|
||||
if (!loginComplete)
|
||||
return;
|
||||
|
||||
if (!InterfaceControl.Info.AutomaticResize)
|
||||
return;
|
||||
|
||||
if (!(InterfaceControl.Info.Resolution == RDPResolutions.FitToWindow ||
|
||||
InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen))
|
||||
return;
|
||||
|
||||
if (SmartSize)
|
||||
return;
|
||||
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg,
|
||||
$"Resizing RDP connection to host '{connectionInfo.Hostname}'");
|
||||
|
||||
try
|
||||
{
|
||||
var size = Fullscreen
|
||||
? Screen.FromControl(Control).Bounds.Size
|
||||
: Control.Size;
|
||||
UpdateSessionDisplaySettings((uint)size.Width, (uint)size.Height);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage(
|
||||
string.Format(Language.ChangeConnectionResolutionError,
|
||||
connectionInfo.Hostname),
|
||||
ex, MessageClass.WarningMsg, false);
|
||||
}
|
||||
}
|
||||
|
||||
private bool DoResizeControl()
|
||||
{
|
||||
Control.Location = InterfaceControl.Location;
|
||||
// kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently...
|
||||
if (!(Control.Size == InterfaceControl.Size) && !(InterfaceControl.Size == Size.Empty))
|
||||
{
|
||||
Control.Size = InterfaceControl.Size;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void UpdateSessionDisplaySettings(uint width, uint height)
|
||||
{
|
||||
UpdateSessionDisplaySettings((uint)size.Width, (uint)size.Height);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage(
|
||||
string.Format(Language.ChangeConnectionResolutionError,
|
||||
connectionInfo.Hostname),
|
||||
ex, MessageClass.WarningMsg, false);
|
||||
}
|
||||
}
|
||||
|
||||
private bool DoResizeControl()
|
||||
{
|
||||
Control.Location = InterfaceControl.Location;
|
||||
// kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently...
|
||||
if (!(Control.Size == InterfaceControl.Size) && !(InterfaceControl.Size == Size.Empty))
|
||||
{
|
||||
Control.Size = InterfaceControl.Size;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void UpdateSessionDisplaySettings(uint width, uint height)
|
||||
{
|
||||
RdpClient8.Reconnect(width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security;
|
||||
using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.Credential
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class PlaceholderCredentialRecord : ICredentialRecord
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
@@ -15,8 +15,8 @@ using System.Resources;
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("1.77.3.1803")]
|
||||
[assembly: AssemblyFileVersion("1.77.3.1803")]
|
||||
[assembly: AssemblyVersion("1.77.3.1812")]
|
||||
[assembly: AssemblyFileVersion("1.77.3.1812")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
||||
[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build: 1803)")]
|
||||
[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build: 1812)")]
|
||||
|
||||
|
||||
6
mRemoteNG/Properties/rbac.Designer.cs
generated
6
mRemoteNG/Properties/rbac.Designer.cs
generated
@@ -8,9 +8,11 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Properties {
|
||||
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
|
||||
internal sealed partial class rbac : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Resources
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
class ImageConverter
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
using System.Collections;
|
||||
using System.DirectoryServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class AdHelper
|
||||
{
|
||||
private DirectoryEntry _dEntry;
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
@@ -15,6 +16,7 @@ using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ExternalTool : INotifyPropertyChanged
|
||||
{
|
||||
private string _displayName;
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security.AccessControl;
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class IeBrowserEmulation
|
||||
{
|
||||
// found this here:
|
||||
|
||||
@@ -14,9 +14,11 @@ using MySql.Data.Types;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using static System.String;
|
||||
using System.Windows;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class MiscTools
|
||||
{
|
||||
public static Icon GetIconFromFile(string FileName)
|
||||
|
||||
@@ -7,10 +7,12 @@ using mRemoteNG.Container;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class NotificationAreaIcon
|
||||
{
|
||||
private readonly NotifyIcon _nI;
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
using System.Drawing;
|
||||
using mRemoteNG.App;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// ReSharper disable MemberCanBeMadeStatic.Global
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public sealed class WindowMenu : SafeHandleZeroOrMinusOneIsInvalid, IDisposable
|
||||
{
|
||||
[Flags]
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace mRemoteNG.Tools.WindowsRegistry
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class WindowsRegistry : IRegistry
|
||||
{
|
||||
public string[] GetSubKeyNames(RegistryHive hive, string keyPath)
|
||||
|
||||
@@ -11,12 +11,14 @@ using mRemoteNG.Tools.Clipboard;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public sealed class ConnectionContextMenu : ContextMenuStrip
|
||||
{
|
||||
private ToolStripMenuItem _cMenTreeAddConnection;
|
||||
|
||||
@@ -16,11 +16,13 @@ using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.ClickHandlers;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.UI.Controls.ConnectionTree
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public partial class ConnectionTree : TreeListView, IConnectionTree
|
||||
{
|
||||
private readonly ConnectionTreeDragAndDropHandler _dragAndDropHandler = new ConnectionTreeDragAndDropHandler();
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class HeadlessTabControl : TabControl
|
||||
{
|
||||
protected override void WndProc(ref Message m)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls.PageSequence
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SequencedControl : UserControl, ISequenceChangingNotifier
|
||||
{
|
||||
public event EventHandler Next;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
@@ -8,6 +9,7 @@ using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class QuickConnectComboBox : ToolStripComboBox
|
||||
{
|
||||
private readonly ComboBox _comboBox;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Text;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
[ToolboxBitmap(typeof(Button))]
|
||||
//Extended button class, the button onPaint completely repaint the control
|
||||
public class MrngButton : Button
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
//Extended CheckBox class, the NGCheckBox onPaint completely repaint the control
|
||||
|
||||
//
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
//Extended ComboBox class, the NGComboBox onPaint completely repaint the control as does the item painting
|
||||
//warning: THe DropDown style rendering is glitchy in this control, only use DropDownList or correct the rendering method
|
||||
internal class MrngComboBox : ComboBox
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
//Groupbox is colored using the innerTab colors as the vstheme doesnt have explicit groupbox palettes (at least completes)
|
||||
//This clas completely repaints the control
|
||||
public class MrngGroupBox : GroupBox
|
||||
|
||||
@@ -7,9 +7,11 @@ using System;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
/* class IPTextBox
|
||||
* An IP Address Box
|
||||
* A TextBox that only allows entry of a valid ip address
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
using mRemoteNG.Themes;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
//Themable label to overide the winforms behavior of drawing the forecolor of disabled with a system color
|
||||
//This class repaints the control to avoid Disabled state mismatch of the theme
|
||||
[ToolboxBitmap(typeof(Label))]
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using BrightIdeasSoftware;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
//Simple coloring of ObjectListView
|
||||
//This is subclassed to avoid repeating the code in multiple places
|
||||
internal class MrngListView : ObjectListView
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
@@ -7,6 +8,7 @@ using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
//Repaint of the NumericUpDown, the composite control buttons are replaced because the
|
||||
//original ones cannot be themed due to protected inheritance
|
||||
internal class MrngNumericUpDown : NumericUpDown
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using mRemoteNG.Themes;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
// Repaint of a ProgressBar on a flat style
|
||||
internal class MrngProgressBar : ProgressBar
|
||||
{
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using mRemoteNG.Themes;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
// total replace of RadioButton to avoid disabled state inconsistency on the themes
|
||||
// and glyph color inconsistency
|
||||
class MrngRadioButton : RadioButton
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
//This class is only minimally themed as textboxes onPaint are hard to theme (system wm paint control most of the drawing process
|
||||
//There are some glitches on the initial draw of some controls
|
||||
public class MrngTextBox : TextBox
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.GraphicsUtilities;
|
||||
|
||||
namespace mRemoteNG.UI
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class DisplayProperties
|
||||
{
|
||||
private readonly IGraphicsProvider _graphicsProvider;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.UI
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class FontOverrider
|
||||
{
|
||||
public static void FontOverride(Control ctlParent)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
|
||||
namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class OptionsPage : UserControl
|
||||
{
|
||||
protected OptionsPage()
|
||||
|
||||
@@ -32,12 +32,14 @@ using mRemoteNG.UI.Panels;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using mRemoteNG.UI.Controls;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
#endregion
|
||||
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
namespace mRemoteNG.UI.Forms
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public partial class FrmMain
|
||||
{
|
||||
public static FrmMain Default { get; } = new FrmMain();
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.UI.GraphicsUtilities
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
/// <summary>
|
||||
/// Gets environment graphics information using the Windows GDI+ API.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Properties;
|
||||
@@ -9,6 +10,7 @@ using mRemoteNG.UI.Window;
|
||||
|
||||
namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ViewMenu : ToolStripMenuItem
|
||||
{
|
||||
private ToolStripMenuItem _mMenViewConnectionPanels;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
@@ -8,6 +9,7 @@ using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.UI
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class StatusImageList : IDisposable
|
||||
{
|
||||
public ImageList ImageList { get; }
|
||||
|
||||
@@ -8,9 +8,11 @@ using mRemoteNG.Connection;
|
||||
using mRemoteNG.Properties;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.UI.Tabs
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
/// <summary>
|
||||
/// This class is lifted from VS2013DockPaneStrip from DockPanelSuite and customized for MremoteNG
|
||||
/// </summary>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace mRemoteNG.UI.Tabs
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
internal sealed class MremoteNGAutoHideStrip : AutoHideStripBase
|
||||
{
|
||||
private class TabNG : Tab
|
||||
|
||||
@@ -3,10 +3,12 @@ using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.UI.TaskDialog
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public sealed partial class CommandButton : Button
|
||||
{
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
@@ -5,9 +5,11 @@ using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Controls;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.UI.TaskDialog
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public partial class frmTaskDialog : Form
|
||||
{
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.Themes;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class BaseWindow : DockContent
|
||||
{
|
||||
#region Private Variables
|
||||
|
||||
@@ -15,10 +15,12 @@ using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ConfigWindow : BaseWindow
|
||||
{
|
||||
private bool _originalPropertyGridToolStripItemCountValid;
|
||||
|
||||
@@ -19,9 +19,11 @@ using mRemoteNG.UI.Tabs;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public partial class ConnectionWindow : BaseWindow
|
||||
{
|
||||
private VisualStudioToolStripExtender vsToolStripExtender;
|
||||
|
||||
@@ -9,9 +9,11 @@ using mRemoteNG.Messages;
|
||||
using mRemoteNG.UI.Controls;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SSHTransferWindow : BaseWindow
|
||||
{
|
||||
#region Form Init
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
using mRemoteNG.App;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class UltraVNCWindow : BaseWindow
|
||||
{
|
||||
#region Form Init
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<Title>Multi-Remote Next Generation Connection Manager</Title>
|
||||
<RepositoryUrl>https://github.com/mRemoteNG/mRemoteNG.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<StartupObject>mRemoteNG.App.ProgramRoot</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
|
||||
@@ -130,9 +130,6 @@
|
||||
<File Id="filAC4D49028FDDA1626E5B006C9D1ED57E" KeyPath="yes" Source="$(var.HarvestPath)\mRemoteNG.dll.config" />
|
||||
</Component>
|
||||
|
||||
<Component Id="cmp67313C6B4CE3487E9A8165EFFE369D16" Directory="INSTALLDIR" Guid="*">
|
||||
<File Id="fil5F0524AF62166FF3C4DAE07F1113C0D9" KeyPath="yes" Source="$(var.HarvestPath)\mRemoteNG.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp9FF194CCD09E9797444CF95F7C37C75A" Directory="INSTALLDIR" Guid="*">
|
||||
<File Id="fil09655B2FCDF14CBBA2E03BBD3F6C58EE" KeyPath="yes" Source="$(var.HarvestPath)\mRemoteNG.runtimeconfig.json" />
|
||||
</Component>
|
||||
|
||||
Reference in New Issue
Block a user