internal static Dictionary <string, string> GetHistoricConnections()
        {
            // Load all options as necessary.
            RegistryHelper registryHelper = new RegistryHelper();

            CheckEncryption(registryHelper);
            var HistoricConnectionStrings = registryHelper.GetSubKeys(SavedConnectionKey);

            return(HistoricConnectionStrings);
        }
        private static void CheckEncryption(RegistryHelper registryHelper)
        {
            var HistoricConnectionStrings = registryHelper.GetSubKeys(SavedConnectionKey);

            // Do the encrption if the strings were not encrypted already.

            foreach (var x in HistoricConnectionStrings)
            {
                if (x.Value.Contains("Data"))
                {
                    RegistryHelper helper = new RegistryHelper();
                    if (!string.IsNullOrEmpty(x.Key))
                    {
                        helper.Delete(ConnectionHelper.SavedConnectionKey, x.Key);
                    }
                    helper.Write(ConnectionHelper.SavedConnectionKey, x.Key,
                                 EncriptionHelper.EncryptString(x.Value, ConnectionHelper.Salt));
                }
            }
        }
 internal static Dictionary<string, string> GetHistoricConnections()
 {
     // Load all options as necessary.
     RegistryHelper registryHelper = new RegistryHelper();
     CheckEncryption(registryHelper);
        var HistoricConnectionStrings = registryHelper.GetSubKeys(SavedConnectionKey);
     return HistoricConnectionStrings;
 }
        private static void CheckEncryption(RegistryHelper registryHelper)
        {
            var HistoricConnectionStrings = registryHelper.GetSubKeys(SavedConnectionKey);

            // Do the encrption if the strings were not encrypted already.

            foreach (var x in HistoricConnectionStrings)
            {
                if (x.Value.Contains("Data"))
                {
                    RegistryHelper helper = new RegistryHelper();
                    if (!string.IsNullOrEmpty(x.Key))
                    {
                        helper.Delete(ConnectionHelper.SavedConnectionKey, x.Key);
                    }
                    helper.Write(ConnectionHelper.SavedConnectionKey, x.Key,
                                 EncriptionHelper.EncryptString(x.Value, ConnectionHelper.Salt));
                }
            }
        }