コード例 #1
0
        public static void Save()
        {
            // Save account keys
            EncryptedFileManager.WriteObject(_accountInfo, accountInfoFile);

            // Set account file as hidden
            File.SetAttributes(accountInfoFile, File.GetAttributes(accountInfoFile) | FileAttributes.Hidden);

            // Save other properties
            Properties.Settings.Default.Save();
        }
コード例 #2
0
 static UserSettings()
 {
     try
     {
         // load the account info from a file
         _accountInfo = EncryptedFileManager.ReadObject <AccountInfo>(accountInfoFile);
     }
     catch (Exception)
     {
         // do nothing
     }
 }