public void DelInstance(SerializedSettingsContainer pContainer) { if (Settings.data.mContainers.Contains(pContainer)) { Settings.data.mContainers.Remove(pContainer); } }
public SerializedSettingsContainer AddInstance(System.Type pType, string pInstance) { SerializedSettingsContainer ssc = new SerializedSettingsContainer(); ssc.mConcerningType = pType; ssc.mInstanceName = pInstance; Settings.data.mContainers.Add(ssc); return(ssc); }
public SerializedSettingsContainer DupInstance(SerializedSettingsContainer mSelectedContainer) { var nContainer = AddInstance(mSelectedContainer.mConcerningType, mSelectedContainer.mInstanceName + " dup"); nContainer.mSettings = new List <Setting>(); foreach (var s in mSelectedContainer.mSettings) { nContainer.mSettings.Add(new Setting(s)); } return(nContainer); }