public void getDeviceInfo()
{
RegistryKey rkHKCU = Registry.CurrentUser;
RegistryKey rkSettingsPath = null;
try
{
rkSettingsPath = rkHKCU.CreateSubKey("Software\\BlackBerry\\BlackBerryVSPlugin");
object pwd = rkSettingsPath.GetValue("device_password");
if (pwd != null)
DevicePassword = GlobalFunctions.Decrypt(pwd.ToString());
object ip = rkSettingsPath.GetValue("device_IP");
if (ip != null)
DeviceIP = ip.ToString();
}
catch
{
}
rkSettingsPath.Close();
rkHKCU.Close();
}
/// <summary> /// Settings Dialog Constructor /// </summary> public SettingsDialog() { InitializeComponent(); _data = new SettingsData(); gridMain.DataContext = _data; _data.getSimulatorInfo(); _data.getDeviceInfo(); tbDevicePassword.Password = _data.DevicePassword; tbSimulatorPassword.Password = _data.SimulatorPassword; }