private void LoadProfiles() { cboProfile.Items.Clear(); foreach (DeobfProfile profile in ProfileFile.Default.Profiles) { cboProfile.Items.Add(profile); } if (cboProfile.Items.Count > 0) { DeobfProfile profile = ProfileFile.Default.GetProfile("Flow without Boolean Function"); if (profile != null && cboProfile.Items.Contains(profile)) { cboProfile.SelectedItem = profile; } else if (Config.DeobfProfile < cboProfile.Items.Count) { cboProfile.SelectedIndex = Config.DeobfProfile; } else { cboProfile.SelectedIndex = 0; } } }
void cboProfile_SelectedIndexChanged(object sender, EventArgs e) { DeobfProfile profile = cboProfile.SelectedItem as DeobfProfile; if (profile != null) { profile.Options.ApplyTo(this); } }
public void ApplyFrom(string profileName) { DeobfProfile profile = ProfileFile.Default.GetProfile(profileName); if (profile == null) { return; } ApplyFrom(profile.Options); }