Esempio n. 1
0
        //used by ui
        public void Add(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return;
            }

            //no dupes
            if (_buildSettings.FindIndex(o => o.Name == name) > -1)
            {
                return;
            }

            BaseBuildSettingEntry newEntry = CreateBuildSettingEntry(name);

            _buildSettings.Add(newEntry);
        }
Esempio n. 2
0
        public void EditCustomBuildSetting(string currentName, string newName)
        {
            if (string.IsNullOrEmpty(currentName))
            {
                return;
            }

            //current must exist
            int index = _buildSettings.FindIndex(o => o.Name == currentName);

            if (index < 0)
            {
                return;
            }

            //must be custom
            var entry = _buildSettings[index] as CustomStringBuildSettingEntry;

            if (entry == null)
            {
                return;
            }

            //remove if new name is empty
            if (string.IsNullOrEmpty(newName))
            {
                RemoveAt(index);
                return;
            }

            //new must not exist
            if (_buildSettings.FindIndex(o => o.Name == newName) > -1)
            {
                return;
            }

            //remove old setting
            _buildSettings.RemoveAt(index);
            //add in new setting
            BaseBuildSettingEntry newEntry = CreateBuildSettingEntry(newName);

            _buildSettings.Insert(index, newEntry);
        }
Esempio n. 3
0
 protected BaseBuildSettingEntry(BaseBuildSettingEntry other)
 {
     Name = other.Name;
 }