private void LoadProfile(string profilename) { ProfileManager pm = new ProfileManager(profilename + ".xml"); txtHost.Text = pm.ReadValue("Hostname"); txtPort.Text = pm.ReadValue("ListenPort"); txtPassword.Text = pm.ReadValue("Password"); txtDelay.Text = pm.ReadValue("Delay"); txtMutex.Text = pm.ReadValue("Mutex"); chkInstall.Checked = bool.Parse(pm.ReadValueSafe("InstallClient", "False")); txtInstallname.Text = pm.ReadValue("InstallName"); GetInstallPath(int.Parse(pm.ReadValue("InstallPath"))).Checked = true; txtInstallsub.Text = pm.ReadValue("InstallSub"); chkHide.Checked = bool.Parse(pm.ReadValueSafe("HideFile", "False")); chkStartup.Checked = bool.Parse(pm.ReadValueSafe("AddStartup", "False")); txtRegistryKeyName.Text = pm.ReadValue("RegistryName"); chkElevation.Checked = bool.Parse(pm.ReadValueSafe("AdminElevation", "False")); chkIconChange.Checked = bool.Parse(pm.ReadValueSafe("ChangeIcon", "False")); chkChangeAsmInfo.Checked = bool.Parse(pm.ReadValueSafe("ChangeAsmInfo", "False")); chkKeylogger.Checked = bool.Parse(pm.ReadValueSafe("Keylogger", "False")); txtProductName.Text = pm.ReadValue("ProductName"); txtDescription.Text = pm.ReadValue("Description"); txtCompanyName.Text = pm.ReadValue("CompanyName"); txtCopyright.Text = pm.ReadValue("Copyright"); txtTrademarks.Text = pm.ReadValue("Trademarks"); txtOriginalFilename.Text = pm.ReadValue("OriginalFilename"); txtProductVersion.Text = pm.ReadValue("ProductVersion"); txtFileVersion.Text = pm.ReadValue("FileVersion"); _profileLoaded = true; }
private void LoadProfile(string profilename) { ProfileManager pm = new ProfileManager(profilename + ".xml"); var rawHosts = pm.ReadValueSafe("Hosts"); foreach (var host in HostHelper.GetHostsList(rawHosts)) _hosts.Add(host); lstHosts.DataSource = new BindingSource(_hosts, null); txtPassword.Text = pm.ReadValue("Password"); txtDelay.Text = pm.ReadValue("Delay"); txtMutex.Text = pm.ReadValue("Mutex"); chkInstall.Checked = bool.Parse(pm.ReadValueSafe("InstallClient", "False")); txtInstallname.Text = pm.ReadValue("InstallName"); GetInstallPath(int.Parse(pm.ReadValue("InstallPath"))).Checked = true; txtInstallsub.Text = pm.ReadValue("InstallSub"); chkHide.Checked = bool.Parse(pm.ReadValueSafe("HideFile", "False")); chkStartup.Checked = bool.Parse(pm.ReadValueSafe("AddStartup", "False")); txtRegistryKeyName.Text = pm.ReadValue("RegistryName"); chkElevation.Checked = bool.Parse(pm.ReadValueSafe("AdminElevation", "False")); chkIconChange.Checked = bool.Parse(pm.ReadValueSafe("ChangeIcon", "False")); chkChangeAsmInfo.Checked = bool.Parse(pm.ReadValueSafe("ChangeAsmInfo", "False")); chkKeylogger.Checked = bool.Parse(pm.ReadValueSafe("Keylogger", "False")); txtProductName.Text = pm.ReadValue("ProductName"); txtDescription.Text = pm.ReadValue("Description"); txtCompanyName.Text = pm.ReadValue("CompanyName"); txtCopyright.Text = pm.ReadValue("Copyright"); txtTrademarks.Text = pm.ReadValue("Trademarks"); txtOriginalFilename.Text = pm.ReadValue("OriginalFilename"); txtProductVersion.Text = pm.ReadValue("ProductVersion"); txtFileVersion.Text = pm.ReadValue("FileVersion"); _profileLoaded = true; }