ScanMaster.ProfileManager.ProfilesInGroup C# (CSharp) Method

ProfilesInGroup() public method

public ProfilesInGroup ( String group ) : ArrayList
group String
return System.Collections.ArrayList
        public ArrayList ProfilesInGroup(String group)
        {
            ArrayList groupProfiles = new ArrayList();
            foreach (Profile p in profiles) if (p.Group == group) groupProfiles.Add(p);
            return groupProfiles;
        }

Usage Example

Example #1
0
        // change a parameter in the current profile. The way that the plugin is selected is a cheesy hack -
        // clearly the commandProcessor/pluginManager/settingsReflector design is inadequate
        // The group mode flag is also a cheesy hack, but might be quite useful
        public void AdjustProfileParameter(String plugin, String parameter, String newValue, bool groupMode)
        {
            SettingsReflector sr = new SettingsReflector();

            if (!groupMode)
            {
                sr.SetField(profileManager.Processor.PluginForString(profileManager.CurrentProfile, plugin),
                            parameter, newValue);
            }
            else
            {
                ArrayList profiles = profileManager.ProfilesInGroup(profileManager.CurrentProfile.Group);
                foreach (Profile p in profiles)
                {
                    sr.SetField(profileManager.Processor.PluginForString(p, plugin), parameter, newValue);
                }
            }
        }
All Usage Examples Of ScanMaster.ProfileManager::ProfilesInGroup