コード例 #1
0
 public Connections(CacheCredentials credentials, ICredentialsPersistence credentialsPersistence)
 {
     _storedCredentials      = credentials;
     _credentials            = credentials.Copy(); //copy the object so we don't affect the main copy
     _credentialsPersistence = credentialsPersistence;
     InitializeComponent();
 }
コード例 #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            _storedCredentials = _credentials; //save the working credentials over the top of the stored ones
            _credentialsPersistence.Save(_credentials);

            this.Close();
        }
コード例 #3
0
 public void Load()
 {
     _credentials = _peristence.Load();
     if (string.IsNullOrWhiteSpace(_credentials.CacheName))
     {
         _credentials.CacheName = "default";
     }
 }