public void SetSession(SessionInfo info)
        {
            var data = JsonConvert.SerializeObject(info);

            Properties.Settings.Default.SessionEnc = Encryptions.Encrypt(data);
            Properties.Settings.Default.Save();
        }
        public void SetSessions(List <SessionInfo> sessions)
        {
            var value = JsonConvert.SerializeObject(sessions);

            value = Encryptions.Encrypt(value);
            Properties.Settings.Default.SessionEnc = value;
            Properties.Settings.Default.Save();
        }
        public SessionInfo GetSession()
        {
            Properties.Settings.Default.Reload();

            try
            {
                var value = Encryptions.Decrypt(Properties.Settings.Default.SessionEnc);
                var info  = JsonConvert.DeserializeObject <SessionInfo>(value);
                return(info);
            }
            catch
            {
                return(null);
            }
        }