private void SaveProfile(string profilename) { var profile = new BuilderProfile(profilename); profile.Tag = txtTag.Text; profile.Hosts = HostHelper.GetRawHosts(_hosts); profile.Password = txtPassword.Text; profile.Delay = (int)numericUpDownDelay.Value; profile.Mutex = txtMutex.Text; profile.InstallClient = chkInstall.Checked; profile.InstallName = txtInstallname.Text; profile.InstallPath = GetInstallPath(); profile.InstallSub = txtInstallsub.Text; profile.HideFile = chkHide.Checked; profile.AddStartup = chkStartup.Checked; profile.RegistryName = txtRegistryKeyName.Text; profile.ChangeIcon = chkChangeIcon.Checked; profile.IconPath = txtIconPath.Text; profile.ChangeAsmInfo = chkChangeAsmInfo.Checked; profile.Keylogger = chkKeylogger.Checked; profile.LogDirectoryName = txtLogDirectoryName.Text; profile.HideLogDirectory = chkHideLogDirectory.Checked; profile.ProductName = txtProductName.Text; profile.Description = txtDescription.Text; profile.CompanyName = txtCompanyName.Text; profile.Copyright = txtCopyright.Text; profile.Trademarks = txtTrademarks.Text; profile.OriginalFilename = txtOriginalFilename.Text; profile.ProductVersion = txtProductVersion.Text; profile.FileVersion = txtFileVersion.Text; }
private void LoadProfile(string profilename) { var profile = new BuilderProfile(profilename); foreach (var host in HostHelper.GetHostsList(profile.Hosts)) _hosts.Add(host); lstHosts.DataSource = new BindingSource(_hosts, null); txtTag.Text = profile.Tag; txtPassword.Text = profile.Password; numericUpDownDelay.Value = profile.Delay; txtMutex.Text = profile.Mutex; chkInstall.Checked = profile.InstallClient; txtInstallname.Text = profile.InstallName; GetInstallPath(profile.InstallPath).Checked = true; txtInstallsub.Text = profile.InstallSub; chkHide.Checked = profile.HideFile; chkStartup.Checked = profile.AddStartup; txtRegistryKeyName.Text = profile.RegistryName; chkChangeIcon.Checked = profile.ChangeIcon; txtIconPath.Text = profile.IconPath; chkChangeAsmInfo.Checked = profile.ChangeAsmInfo; chkKeylogger.Checked = profile.Keylogger; txtLogDirectoryName.Text = profile.LogDirectoryName; chkHideLogDirectory.Checked = profile.HideLogDirectory; txtProductName.Text = profile.ProductName; txtDescription.Text = profile.Description; txtCompanyName.Text = profile.CompanyName; txtCopyright.Text = profile.Copyright; txtTrademarks.Text = profile.Trademarks; txtOriginalFilename.Text = profile.OriginalFilename; txtProductVersion.Text = profile.ProductVersion; txtFileVersion.Text = profile.FileVersion; _profileLoaded = true; }