This commit is contained in:
Dimitrij
2025-06-11 23:38:36 +01:00
parent 5c48f13a27
commit e85cee752d
2 changed files with 16 additions and 15 deletions

View File

@@ -15,9 +15,8 @@ namespace mRemoteNG.Connection
[SupportedOSPlatform("windows")]
public sealed class PuttySessionInfo : ConnectionInfo, IComponent
{
#region Properties
[Browsable(false)] public RootPuttySessionsNodeInfo RootRootPuttySessionsInfo { get; set; }
[Browsable(false)]
public RootPuttySessionsNodeInfo RootRootPuttySessionsInfo { get; set; } = default!;
[ReadOnly(true)] public override string PuttySession { get; set; } = string.Empty;
@@ -35,7 +34,7 @@ namespace mRemoteNG.Connection
[ReadOnly(true), Browsable(false)]
public override string Panel
{
get => Parent?.Panel;
get => Parent?.Panel ?? string.Empty; // Provide a default value to handle null cases
set { }
}
@@ -58,7 +57,7 @@ namespace mRemoteNG.Connection
[ReadOnly(true), Browsable(false)] public override string UserField { get; set; } = string.Empty;
#endregion
[Command(), LocalizedAttributes.LocalizedDisplayName("strPuttySessionSettings")]
public void SessionSettings()

View File

@@ -245,17 +245,19 @@ namespace mRemoteNG.Tools
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public class WINTRUST_FILE_INFO
{
public WINTRUST_FILE_INFO()
{
cbStruct = (uint)Marshal.SizeOf(typeof(WINTRUST_FILE_INFO));
}
{
public WINTRUST_FILE_INFO()
{
cbStruct = (uint)Marshal.SizeOf(typeof(WINTRUST_FILE_INFO));
pcwszFilePath = string.Empty; // Initialize to an empty string to satisfy non-nullable property
}
private uint cbStruct;
[MarshalAs(UnmanagedType.LPTStr)]public string pcwszFilePath;
public IntPtr hFile;
public IntPtr pgKnownSubject;
}
private uint cbStruct;
[MarshalAs(UnmanagedType.LPTStr)]
public string pcwszFilePath;
public IntPtr hFile;
public IntPtr pgKnownSubject;
}
public const int CRYPT_E_NO_MATCH = unchecked ((int) 0x80092009);