VixenApplication.SelectProfile.PopulateProfileList C# (CSharp) 메소드

PopulateProfileList() 개인적인 메소드

private PopulateProfileList ( ) : void
리턴 void
        private void PopulateProfileList()
        {
            XMLProfileSettings profile = new XMLProfileSettings();

            //Make sure we start with an empty listbox since we may repopulate after editing profiles
            listBoxProfiles.Items.Clear();
            int profileCount = profile.GetSetting(XMLProfileSettings.SettingType.Profiles, "ProfileCount", 0);
            for (int i = 0; i < profileCount; i++)
            {
                var dataFolder = profile.GetSetting(XMLProfileSettings.SettingType.Profiles, "Profile" + i.ToString() + "/DataFolder", string.Empty);
                if (!VixenApplication.IsProfileLocked(dataFolder)) //Only add the profile if it is not locked.
                {
                    ProfileItem item = new ProfileItem();
                    item.Name = profile.GetSetting(XMLProfileSettings.SettingType.Profiles, "Profile" + i.ToString() + "/Name",
                        "New Profile");
                    item.DataFolder = dataFolder;
                    listBoxProfiles.Items.Add(item);
                }
            }
        }