//---------------------------- public settings() { InitializeComponent(); //read registry values wStart = Reg.regKey_Read(keyName, "wStart"); apiKey = Reg.regKey_Read(keyName, "WeatherAPIKey"); cmdPrefix = Reg.regKey_Read(keyName, "cmdPrefix"); cmdPrefixXT.Text = cmdPrefix; weatherTXT.Password = Encryption._decryptData(apiKey); try { d_Token = Encryption._decryptData(Reg.regKey_Read(keyName, "d_Token")); d_TokenTXT.Password = d_Token; } catch (Exception e) { CLog.LogWriteError("Settigns - decrypt oAuth Key: " + e.ToString()); } //------------------------------ //set reboot checkbox based on registry value if (wStart == "1") { startWinCKB.Content = "Open on Windows Startup: ON"; startWinCKB.IsChecked = true; } else { startWinCKB.Content = "Open on Windows Startup: OFF"; startWinCKB.IsChecked = false; } //------------------------------ }