private void SynoReportClient_Load(object sender, EventArgs e) { try { FileInfo source = null; string entropy = "Is a gift a gift without wrapping?"; if (!string.IsNullOrEmpty(Default.DPAPIVector) && !string.IsNullOrWhiteSpace(Default.DPAPIVector)) { try { source = new FileInfo(Default.DPAPIVector); } catch (ArgumentException) { //don't care if it's not a filename } if (source != null && source.Exists) { using (var sr = new StreamReader(source.FullName)) { entropy = sr.ReadToEnd(); } } else { entropy = Default.DPAPIVector; } } WrappedPassword <DSMAuthentication> .SetEntropy(entropy); WrappedPassword <DSMAuthenticationKeyFile> .SetEntropy(entropy); WrappedPassword <DefaultProxy> .SetEntropy(entropy); CustomSettings.Initialize(GetSection <CustomSettings>); PopulateServerTree(); volumeHistoricChart1.Configuration = Profile; chartGrid1.Configuration = Profile; duplicateCandidatesView1.MaximumComparable = Default.MaximumComparable; if (string.IsNullOrEmpty(Default.AutoRefreshServer) == false) { string tag = Default.AutoRefreshServer; if (Profile.DSMHosts.Items.ContainsKey(tag)) { Task.Factory.StartNew(() => SynoReportClient_CacheUpdate(tag)); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public DefaultProxy() { wrapped = new WrappedPassword <DefaultProxy>("WrappedPassword", this); }
public DSMAuthenticationKeyFile() : base() { wrapped = new WrappedPassword <DSMAuthenticationKeyFile>("WrappedPassPhrase", this); }
public DSMAuthentication() : base() { wrapped = new WrappedPassword <DSMAuthentication>("WrappedPassword", this); }