public RegistrySettings() { try { using (RegistryKey rkcu = Registry.CurrentUser) using (RegistryKey rkSettings = rkcu.OpenSubKey("Software\\Scott Alfter\\CoinProfitability")) { foreach (string i in rkSettings.GetSubKeyNames()) { RegistryKey k = rkSettings.OpenSubKey(i); CoinInfo t = new CoinInfo(); t.ExplorerBaseURL = (string)k.GetValue("ExplorerBaseURL"); t.ExplorerType = (string)k.GetValue("ExplorerType"); t.ExplorerChain = (string)k.GetValue("ExplorerChain"); t.DefaultHashRateUnit = (string)k.GetValue("DefaultHashRateUnit"); t.Exchange = (string)k.GetValue("Exchange"); t.ExchangeExtraData = (string)k.GetValue("ExchangeExtraData"); t.Abbreviation = (string)k.GetValue("Abbreviation"); t.DefaultHashRate = (string)k.GetValue("DefaultHashRate"); Coins.Add(i, t); } } } catch { } }
public RegistrySettings() { try { using (RegistryKey rkcu = Registry.CurrentUser) using (RegistryKey rkSettings = rkcu.OpenSubKey("Software\\Scott Alfter\\CoinProfitability")) { foreach (string i in rkSettings.GetSubKeyNames()) { RegistryKey k = rkSettings.OpenSubKey(i); CoinInfo t = new CoinInfo(); t.ExplorerBaseURL = (string)k.GetValue("ExplorerBaseURL"); t.ExplorerType = (string)k.GetValue("ExplorerType"); t.ExplorerChain = (string)k.GetValue("ExplorerChain"); t.DefaultHashRateUnit = (string)k.GetValue("DefaultHashRateUnit"); t.Exchange = (string)k.GetValue("Exchange"); t.ExchangeExtraData = (string)k.GetValue("ExchangeExtraData"); t.Abbreviation = (string)k.GetValue("Abbreviation"); t.DefaultHashRate = (string)k.GetValue("DefaultHashRate"); Coins.Add(i, t); } } } catch { } }