diff --git a/ExternalConnectors/ExternalConnectors.csproj b/ExternalConnectors/ExternalConnectors.csproj index c6c49b4a..9177e336 100644 --- a/ExternalConnectors/ExternalConnectors.csproj +++ b/ExternalConnectors/ExternalConnectors.csproj @@ -1,13 +1,13 @@  - net9.0-windows10.0.26100.0 + net10.0-windows10.0.26100.0 enable enable Library True x64;arm64 Debug;Release;Debug Portable;Release Portable;Deploy to github - 10.0.26100.0 + 10.0.22621.0 True diff --git a/ObjectListView/ObjectListView.NetCore.csproj b/ObjectListView/ObjectListView.NetCore.csproj index 7edf3164..0fd9d02b 100644 --- a/ObjectListView/ObjectListView.NetCore.csproj +++ b/ObjectListView/ObjectListView.NetCore.csproj @@ -1,6 +1,6 @@  - net9.0-windows10.0.26100.0 + net10.0-windows10.0.26100.0 false BrightIdeasSoftware ObjectListView @@ -35,8 +35,4 @@ - - - - diff --git a/ObjectListView/ObjectListView.cs b/ObjectListView/ObjectListView.cs index 6603a12c..7081280b 100644 --- a/ObjectListView/ObjectListView.cs +++ b/ObjectListView/ObjectListView.cs @@ -1906,7 +1906,7 @@ namespace BrightIdeasSoftware [Category("ObjectListView"), Description("The image list from which group header will take their images"), DefaultValue(null)] - public ImageList GroupImageList + public new ImageList GroupImageList { get { return this.groupImageList; } set diff --git a/ObjectListView/VirtualObjectListView.cs b/ObjectListView/VirtualObjectListView.cs index fd32888b..8611d970 100644 --- a/ObjectListView/VirtualObjectListView.cs +++ b/ObjectListView/VirtualObjectListView.cs @@ -101,7 +101,7 @@ namespace BrightIdeasSoftware /// /// Although it isn't documented, .NET virtual lists cannot have checkboxes. This class codes around this limitation, /// but you must use the functions provided by ObjectListView: CheckedObjects, CheckObject(), UncheckObject() and their friends. - /// If you use the normal check box properties (CheckedItems or CheckedIndicies), they will throw an exception, since the + /// If you use the normal check box properties (CheckedItems or CheckedIndicie), they will throw an exception, since the /// list is in virtual mode, and .NET "knows" it can't handle checkboxes in virtual mode. /// /// Due to the limits of the underlying Windows control, virtual lists do not trigger ItemCheck/ItemChecked events. @@ -155,7 +155,7 @@ namespace BrightIdeasSoftware /// /// This property returns a simple collection. Changes made to the returned /// collection do NOT affect the list. This is different to the behaviour of - /// CheckedIndicies collection. + /// CheckedIndicie collection. /// /// /// When getting CheckedObjects, the performance of this method is O(n) where n is the number of checked objects. @@ -405,8 +405,6 @@ namespace BrightIdeasSoftware [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_virtualListSize")] private static extern ref int GetVirtualListSizeField(ListView listView); - static private FieldInfo virtualListSizeFieldInfo; - #endregion #region OLV accessing diff --git a/mRemoteNG/App/ProgramRoot.cs b/mRemoteNG/App/ProgramRoot.cs index e1216993..8a215ec7 100644 --- a/mRemoteNG/App/ProgramRoot.cs +++ b/mRemoteNG/App/ProgramRoot.cs @@ -24,7 +24,6 @@ namespace mRemoteNG.App public static class ProgramRoot { private static Mutex? _mutex; - private static FrmSplashScreenNew _frmSplashScreen = null; private static string customResourcePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Languages"); private static System.Threading.Thread? _wpfSplashThread; diff --git a/mRemoteNG/Connection/PuttySessionInfo.cs b/mRemoteNG/Connection/PuttySessionInfo.cs index f8eb72dc..3aee8381 100644 --- a/mRemoteNG/Connection/PuttySessionInfo.cs +++ b/mRemoteNG/Connection/PuttySessionInfo.cs @@ -92,7 +92,7 @@ namespace mRemoteNG.Connection #region IComponent [Browsable(false)] - public ISite Site + public ISite? Site { get => new PropertyGridCommandSite(this); set => throw (new NotImplementedException()); diff --git a/mRemoteNG/UI/Controls/mrngIpTextBox.cs b/mRemoteNG/UI/Controls/mrngIpTextBox.cs index 0c81acdb..dfb5b1bf 100644 --- a/mRemoteNG/UI/Controls/mrngIpTextBox.cs +++ b/mRemoteNG/UI/Controls/mrngIpTextBox.cs @@ -27,7 +27,7 @@ namespace mRemoteNG.UI.Controls private MrngLabel label2; private MrngLabel label3; private ToolTip toolTip1; - private System.ComponentModel.IContainer components; + private System.ComponentModel.Container components; /* Sets and Gets the tooltiptext on toolTip1 */ public string ToolTipText @@ -46,7 +46,7 @@ namespace mRemoteNG.UI.Controls } /* Set or Get the string that represents the value in the box */ - public override string? Text + public override string Text { get => (Octet1.Text ?? string.Empty) + @"." + (Octet2.Text ?? string.Empty) + @"." + (Octet3.Text ?? string.Empty) + @"." + (Octet4.Text ?? string.Empty); set @@ -119,9 +119,7 @@ namespace mRemoteNG.UI.Controls { if (disposing) { - // ReSharper disable once UseNullPropagation - if (components != null) - components.Dispose(); + components?.Dispose(); } base.Dispose(disposing); diff --git a/mRemoteNG/UI/Forms/FrmAbout.cs b/mRemoteNG/UI/Forms/FrmAbout.cs index a884c35e..b3570372 100644 --- a/mRemoteNG/UI/Forms/FrmAbout.cs +++ b/mRemoteNG/UI/Forms/FrmAbout.cs @@ -9,6 +9,8 @@ using mRemoteNG.Properties; using System.Runtime.InteropServices; using System.Runtime.Versioning; using mRemoteNG.UI.Window; +using mRemoteNG.App; +using mRemoteNG.Messages; namespace mRemoteNG.UI.Forms { @@ -42,7 +44,7 @@ namespace mRemoteNG.UI.Forms [Conditional("PORTABLE")] private void AddPortableString() => lblTitle.Text += $@" {Language.PortableEdition}"; - private void ApplyTheme() + private new void ApplyTheme() { if (!ThemeManager.getInstance().ThemingActive) return; if (!ThemeManager.getInstance().ActiveAndExtended) return; @@ -60,23 +62,41 @@ namespace mRemoteNG.UI.Forms private void llLicense_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Properties.OptionsUpdatesPage.Default.CurrentUpdateChannelType + "/COPYING.txt"); + var version = Assembly.GetExecutingAssembly().GetName().Version; + var updateChannel = Properties.OptionsUpdatesPage.Default.CurrentUpdateChannelType; + if (version != null && updateChannel != null) + { + var versionString = version.ToString(); + OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + versionString[..^2] + "-" + updateChannel + "/COPYING.txt"); + } Close(); } private void llChangelog_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Properties.OptionsUpdatesPage.Default.CurrentUpdateChannelType + "/CHANGELOG.md"); + var version = Assembly.GetExecutingAssembly().GetName().Version; + var updateChannel = Properties.OptionsUpdatesPage.Default.CurrentUpdateChannelType; + if (version != null && updateChannel != null) + { + var versionString = version.ToString(); + OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + versionString[..^2] + "-" + updateChannel + "/CHANGELOG.md"); + } Close(); } private void llCredits_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Properties.OptionsUpdatesPage.Default.CurrentUpdateChannelType + "/CREDITS.md"); + var version = Assembly.GetExecutingAssembly().GetName().Version; + var updateChannel = Properties.OptionsUpdatesPage.Default.CurrentUpdateChannelType; + if (version != null && updateChannel != null) + { + var versionString = version.ToString(); + OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + versionString[..^2] + "-" + updateChannel + "/CREDITS.md"); + } Close(); } - private void OpenUrl(string url) + private static void OpenUrl(string url) { // Validate URL format to prevent injection if (string.IsNullOrWhiteSpace(url)) diff --git a/mRemoteNG/UI/Forms/frmMain.cs b/mRemoteNG/UI/Forms/frmMain.cs index a9f61096..e4a4af11 100644 --- a/mRemoteNG/UI/Forms/frmMain.cs +++ b/mRemoteNG/UI/Forms/frmMain.cs @@ -398,6 +398,11 @@ namespace mRemoteNG.UI.Forms private async void FrmMain_Shown(object sender, EventArgs e) { + // Bring the main window to the front after splash screen closes + Activate(); + BringToFront(); + NativeMethods.SetForegroundWindow(Handle); + PromptForUpdatesPreference(); await CheckForUpdates(); } diff --git a/mRemoteNG/UI/TaskDialog/CommandButton.cs b/mRemoteNG/UI/TaskDialog/CommandButton.cs index 7fd67066..d1ba8ac0 100644 --- a/mRemoteNG/UI/TaskDialog/CommandButton.cs +++ b/mRemoteNG/UI/TaskDialog/CommandButton.cs @@ -109,13 +109,16 @@ namespace mRemoteNG.UI.TaskDialog //-------------------------------------------------------------------------------- string GetLargeText() { + if (string.IsNullOrEmpty(Text)) + return string.Empty; + string[] lines = Text.Split('\n'); return lines[0]; } string GetSmallText() { - if (Text.IndexOf('\n') < 0) + if (string.IsNullOrEmpty(Text) || Text.IndexOf('\n') < 0) return ""; string s = Text; diff --git a/mRemoteNG/mRemoteNG.csproj b/mRemoteNG/mRemoteNG.csproj index 6c6818f7..0b85b569 100644 --- a/mRemoteNG/mRemoteNG.csproj +++ b/mRemoteNG/mRemoteNG.csproj @@ -22,7 +22,7 @@ Header_dark.png {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} True - 10.0.26100.0 + 10.0.22621.0 False Multi-Remote Next Generation Connection Manager https://github.com/mRemoteNG/mRemoteNG.git