Exemple #1
0
        /// <summary>Import sessions from older version of SuperPuTTY from the Windows Registry</summary>
        public static void ImportSessionsFromSuperPutty1030()
        {
            try
            {
                List <SessionData> sessions = SessionData.LoadSessionsFromRegistry();
                if (sessions != null && sessions.Count > 0)
                {
                    foreach (SessionData session in sessions)
                    {
                        AddSession(session);
                    }
                    SaveSessions();

                    Log.InfoFormat("Imported {0} old sessions from registry.", sessions.Count);
                }
            }
            catch (Exception ex)
            {
                Log.WarnFormat("Could not import old sessions, msg={0}", ex.Message);
            }
        }