예제 #1
0
 public void DelInstance(SerializedSettingsContainer pContainer)
 {
     if (Settings.data.mContainers.Contains(pContainer))
     {
         Settings.data.mContainers.Remove(pContainer);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }