Exemple #1
0
        private PasswordSheet CreateSheet()
        {
            string fileLocation = SheetStorage.GetFileLocation();

            if (File.Exists(fileLocation))
            {
                var           decryptor = new SheetDecryptor(_password, fileLocation);
                PasswordSheet sheet     = decryptor.DecryptFile();

                if (sheet != null)
                {
                    return(sheet);
                }
            }

            return(new PasswordSheet());
        }
Exemple #2
0
        public bool LoadSheet(string password)
        {
            _password = password;

            try
            {
                lock (_currentLock)
                {
                    _current = CreateSheet();
                }

                return(true);
            }
            catch (Exception)
            {
            }

            return(false);
        }
        public bool LoadSheet(string password)
        {
            _password = password;

            try
            {
                lock (_currentLock)
                {
                    _current = CreateSheet();
                }

                return true;
            }
            catch (Exception)
            {
            }

            return false;
        }