diff --git a/mRemoteNG/App/ProgramRoot.cs b/mRemoteNG/App/ProgramRoot.cs index a9215c16..c6410494 100644 --- a/mRemoteNG/App/ProgramRoot.cs +++ b/mRemoteNG/App/ProgramRoot.cs @@ -23,36 +23,65 @@ namespace mRemoteNG.App [STAThread] public static void Main(string[] args) { - // Set path for assembly resolution - // This is needed for the application to find the assemblies in the Assemblies folder - AppDomain.CurrentDomain.AssemblyResolve += (sender, resolveArgs) => + Trace.WriteLine("!!!!!!=============== TEST ==================!!!!!!!!!!!!!"); + // Forcing to load System.Configuration.ConfigurationManager before any other assembly to be able to check settings + try { - string assemblyName = new AssemblyName(resolveArgs.Name).Name.Replace(".resources", string.Empty); - string assemblyFile = assemblyName + ".dll"; + string assemblyFile = "System.Configuration.ConfigurationManager" + ".dll"; string assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assemblies", assemblyFile); + if (File.Exists(assemblyPath)) { - return Assembly.LoadFrom(assemblyPath); + Assembly.LoadFrom(assemblyPath); } - return null; - }; + } + catch (FileNotFoundException ex) + { + Trace.WriteLine("Error occured: " + ex.Message); + } - LocalSettingsDBManager settingsManager = new LocalSettingsDBManager(dbPath: "mRemoteNG.appSettings", useEncryption: false, schemaFilePath: ""); + //Subscribe to AssemblyResolve event + AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve; - + //Check if local settings DB exist or accessible + CheckLockalDB(); - if (Properties.OptionsStartupExitPage.Default.SingleInstance) + Lazy singleInstanceOption = new Lazy(() => Properties.OptionsStartupExitPage.Default.SingleInstance); + + if (singleInstanceOption.Value) + { StartApplicationAsSingleInstance(); + } else + { StartApplication(); + } } + private static void CheckLockalDB() + { + LocalSettingsDBManager settingsManager = new LocalSettingsDBManager(dbPath: "mRemoteNG.appSettings", useEncryption: false, schemaFilePath: ""); + } + private static Assembly OnAssemblyResolve(object sender, ResolveEventArgs resolveArgs) + { + string assemblyName = new AssemblyName(resolveArgs.Name).Name.Replace(".resources", string.Empty); + string assemblyFile = assemblyName + ".dll"; + string assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assemblies", assemblyFile); + + + if (File.Exists(assemblyPath)) + { + return Assembly.LoadFrom(assemblyPath); + } + return null; + } + private static void StartApplication() { CatchAllUnhandledExceptions(); - System.Windows.Forms.Application.EnableVisualStyles(); - System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); _frmSplashScreen = FrmSplashScreenNew.GetInstance(); @@ -62,12 +91,12 @@ namespace mRemoteNG.App _frmSplashScreen.Top = viewport.Top; _frmSplashScreen.Left = viewport.Left; // normally it should be screens[1] however due DPI apply 1 size "same" as default with 100% - _frmSplashScreen.Left = viewport.Left + (targetScreen.Bounds.Size.Width / 2) - (_frmSplashScreen.Width / 2); - _frmSplashScreen.Top = viewport.Top + (targetScreen.Bounds.Size.Height / 2) - (_frmSplashScreen.Height / 2); + _frmSplashScreen.Left = viewport.Left + (targetScreen.Bounds.Size.Width - _frmSplashScreen.Width) / 2; + _frmSplashScreen.Top = viewport.Top + (targetScreen.Bounds.Size.Height - _frmSplashScreen.Height) / 2; _frmSplashScreen.ShowInTaskbar = false; _frmSplashScreen.Show(); - - System.Windows.Forms.Application.Run(FrmMain.Default); + + Application.Run(FrmMain.Default); } public static void CloseSingletonInstanceMutex() @@ -140,5 +169,6 @@ namespace mRemoteNG.App FrmUnhandledException window = new(e.ExceptionObject as Exception, e.IsTerminating); window.ShowDialog(FrmMain.Default); } + } } \ No newline at end of file diff --git a/mRemoteNG/Language/Language.Designer.cs b/mRemoteNG/Language/Language.Designer.cs index e3dcbc1d..062d57ad 100644 --- a/mRemoteNG/Language/Language.Designer.cs +++ b/mRemoteNG/Language/Language.Designer.cs @@ -546,6 +546,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to AutoSaveInMinutes. + /// + internal static string AutoSaveInMinutes { + get { + return ResourceManager.GetString("AutoSaveInMinutes", resourceCulture); + } + } + /// /// Looks up a localized string similar to Latest version. /// @@ -1699,6 +1708,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to Do Not Warn Me When Closing Connections. + /// + internal static string DoNotWarnMeWhenClosingConnections { + get { + return ResourceManager.GetString("DoNotWarnMeWhenClosingConnections", resourceCulture); + } + } + /// /// Looks up a localized string similar to Don't connect to console session. /// @@ -2450,6 +2468,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to Gateway. + /// + internal static string Gateway { + get { + return ResourceManager.GetString("Gateway", resourceCulture); + } + } + /// /// Looks up a localized string similar to General. /// @@ -4828,6 +4855,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to RDP connection timeout. + /// + internal static string RdpConnectionTimeout { + get { + return ResourceManager.GetString("RdpConnectionTimeout", resourceCulture); + } + } + /// /// Looks up a localized string similar to Couldn't create RDP control, please check mRemoteNG requirements.. /// @@ -5090,7 +5126,7 @@ namespace mRemoteNG.Resources.Language { } /// - /// Looks up a localized string similar to RDP reconnection count:. + /// Looks up a localized string similar to RDP reconnect count:. /// internal static string RdpReconnectCount { get { @@ -5098,6 +5134,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to RDP reconnection count:. + /// + internal static string RdpReconnectionCount { + get { + return ResourceManager.GetString("RdpReconnectionCount", resourceCulture); + } + } + /// /// Looks up a localized string similar to RDP SetAuthenticationLevel failed!. /// @@ -5305,6 +5350,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to ReconnectToPreviouslyOpenedSessionsOnStartup. + /// + internal static string ReconnectToPreviouslyOpenedSessionsOnStartup { + get { + return ResourceManager.GetString("ReconnectToPreviouslyOpenedSessionsOnStartup", resourceCulture); + } + } + /// /// Looks up a localized string similar to Redirect. /// @@ -5541,6 +5595,24 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to SaveConnectionsOnExit. + /// + internal static string SaveConnectionsOnExit { + get { + return ResourceManager.GetString("SaveConnectionsOnExit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SaveConsOnExit. + /// + internal static string SaveConsOnExit { + get { + return ResourceManager.GetString("SaveConsOnExit", resourceCulture); + } + } + /// /// Looks up a localized string similar to Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png. /// @@ -5649,6 +5721,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to SetHostnameLikeDisplayNameNewConnection. + /// + internal static string SetHostnameLikeDisplayNameNewConnection { + get { + return ResourceManager.GetString("SetHostnameLikeDisplayNameNewConnection", resourceCulture); + } + } + /// /// Looks up a localized string similar to Couldn't save settings or dispose SysTray Icon!. /// @@ -6009,6 +6090,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to Start Full Screen. + /// + internal static string StartFullScreen { + get { + return ResourceManager.GetString("StartFullScreen", resourceCulture); + } + } + /// /// Looks up a localized string similar to Start minimized. /// @@ -6261,6 +6351,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to Track Active Connection In The Connection Tree. + /// + internal static string TrackActiveConnectionInTheConnectionTree { + get { + return ResourceManager.GetString("TrackActiveConnectionInTheConnectionTree", resourceCulture); + } + } + /// /// Looks up a localized string similar to Transfer. /// @@ -6712,6 +6811,33 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to WarnMeOnlyWhenClosingMultipleConnections. + /// + internal static string WarnMeOnlyWhenClosingMultipleConnections { + get { + return ResourceManager.GetString("WarnMeOnlyWhenClosingMultipleConnections", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WarnMeOnlyWhenExitingProgram. + /// + internal static string WarnMeOnlyWhenExitingProgram { + get { + return ResourceManager.GetString("WarnMeOnlyWhenExitingProgram", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WarnMeWhenClosingConnections. + /// + internal static string WarnMeWhenClosingConnections { + get { + return ResourceManager.GetString("WarnMeWhenClosingConnections", resourceCulture); + } + } + /// /// Looks up a localized string similar to Website. /// @@ -6721,6 +6847,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to WebView2InitializationFailed. + /// + internal static string WebView2InitializationFailed { + get { + return ResourceManager.GetString("WebView2InitializationFailed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Weekly. /// @@ -6730,6 +6865,15 @@ namespace mRemoteNG.Resources.Language { } } + /// + /// Looks up a localized string similar to WhenClosingConnections. + /// + internal static string WhenClosingConnections { + get { + return ResourceManager.GetString("WhenClosingConnections", resourceCulture); + } + } + /// /// Looks up a localized string similar to Windows. /// diff --git a/mRemoteNG/Language/Language.cs-CZ.resx b/mRemoteNG/Language/Language.cs-CZ.resx index 283c8879..d175fd9c 100644 --- a/mRemoteNG/Language/Language.cs-CZ.resx +++ b/mRemoteNG/Language/Language.cs-CZ.resx @@ -231,9 +231,6 @@ Zobrazení - - Brána - Různé @@ -607,6 +604,9 @@ Otevírám nový prázdný soubor seznamu spojení. Nastavení vlast. HTTP selhalo! + + Zavřít záložku dvojklikem na ní + Import z Active Directory @@ -1463,9 +1463,6 @@ Zpráva: Přejete si uložit stávající soubor seznamu připojení před načtením jiného? - - Ukládat spojení při ukončení aplikace - Soubor Graphics Interchange Format (.gif)|*.gif|Soubor Joint Photographic Experts Group (.jpeg)|*.jpeg|Soubor Joint Photographic Experts Group (.jpg)|*.jpg|Soubor Portable Network Graphics (.png)|*.png @@ -1800,30 +1797,50 @@ mRemoteNG se nyní ukončí a zahájí instalaci. Logovat do adresáře kde je aplikace umístěna. -+ -+ -+ - Přiřazené přihlašovací informace - - - Po spuštění minimalizovat - - Otevřít prázdný panel při startu aplikace - - - Zavřít záložku dvojklikem na ní - - - Zavřít do oznamovací oblasti + + Přiřazené přihlašovací informace Nový název šablony + + Nepodařilo se vytvořit šablonu, buď již existuje šablona se stejným názvem nebo vámi zadaný název obsahuje speciální znaky. + Zadejte nový název šablony - - Nepodařilo se vytvořit šablonu, buď již existuje šablona se stejným názvem nebo vámi zadaný název obsahuje speciální znaky. + + Uložit připojení při každé úpravě + + + Filtrovat shody vyhledávání v seznamu připojení + + + Test spojení + + + Použít kódování UTF8 pro vlastnost RDP "Load Balance Info" + + + Otevřít prázdný panel při startu aplikace + + + Umístit vyhledávací pole nad seznam připojení + + + Nezkracovat uživatelské jméno + + + Po spuštění minimalizovat + + + Zavřít do oznamovací oblasti + + + Brána + + + Ukládat spojení při ukončení aplikace Při vytváření nového připojení nastaví stejný název zobrazení jako je název počítače @@ -1834,51 +1851,34 @@ mRemoteNG se nyní ukončí a zahájí instalaci. Časová prodleva připojení k RDP - + Když se ukončí připojení: - + Upozornit mě na ukončení připojení - - Upozornit mě pouze při ukončení několika připojení - - + Upozornit mě pouze při ukončení programu - + Neupozorňovat na ukončení připojení - - Uložit připojení při každé úpravě - - + Při spuštění zobrazit na celou obrazovku - - Filtrovat shody vyhledávání v seznamu připojení - - + Obnovit dříve spuštěná připojení po startu - + Uložit připojení při ukončení programu - - Umístit vyhledávací pole nad seznam připojení - - + Označovat aktivní připojení v seznamu - - - Nezkracovat uživatelské jméno Kliknutím na již otevřené připojení v seznamu otevře jeho záložku - - Použít kódování UTF8 pro vlastnost RDP "Load Balance Info" + + Upozornit mě pouze při ukončení několika připojení - - Test spojení - + \ No newline at end of file diff --git a/mRemoteNG/Language/Language.resx b/mRemoteNG/Language/Language.resx index dbaa0e57..6f1a9330 100644 --- a/mRemoteNG/Language/Language.resx +++ b/mRemoteNG/Language/Language.resx @@ -1424,7 +1424,7 @@ If you run into such an error, please create a new connection file! RDP Gateway is not supported! - RDP reconnection count: + RDP reconnect count: RDP SetAuthenticationLevel failed! @@ -2289,7 +2289,7 @@ Nightly Channel includes Alphas, Betas & Release Candidates. Delinea Secret Server - + Clickstudios Passwordstate @@ -2368,4 +2368,52 @@ Nightly Channel includes Alphas, Betas & Release Candidates. *Some settings are determined by your company. For further information, please contact your administrator + + Gateway + + + SaveConsOnExit + + + SetHostnameLikeDisplayNameNewConnection + + + RDP reconnection count: + + + RDP connection timeout + + + WhenClosingConnections + + + WarnMeWhenClosingConnections + + + WarnMeOnlyWhenExitingProgram + + + Do Not Warn Me When Closing Connections + + + Start Full Screen + + + ReconnectToPreviouslyOpenedSessionsOnStartup + + + SaveConnectionsOnExit + + + Track Active Connection In The Connection Tree + + + AutoSaveInMinutes + + + WebView2InitializationFailed + + + WarnMeOnlyWhenClosingMultipleConnections + \ No newline at end of file diff --git a/mRemoteNG/Properties/AssemblyInfo.cs b/mRemoteNG/Properties/AssemblyInfo.cs index 3a396bbf..397c663b 100644 --- a/mRemoteNG/Properties/AssemblyInfo.cs +++ b/mRemoteNG/Properties/AssemblyInfo.cs @@ -18,10 +18,10 @@ using System.Resources; [assembly: AssemblyCulture("")] // Version information -[assembly: AssemblyVersion("1.77.3.2694")] -[assembly: AssemblyFileVersion("1.77.3.2694")] +[assembly: AssemblyVersion("1.77.3.2697")] +[assembly: AssemblyFileVersion("1.77.3.2697")] [assembly: NeutralResourcesLanguageAttribute("en-US")] -[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build 2694)")] +[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build 2697)")] // Logging [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")] diff --git a/mRemoteNG/mRemoteNG.csproj b/mRemoteNG/mRemoteNG.csproj index 72b35d41..acaf144b 100644 --- a/mRemoteNG/mRemoteNG.csproj +++ b/mRemoteNG/mRemoteNG.csproj @@ -526,12 +526,21 @@ true - + + + + + + + \ No newline at end of file