Ejemplo n.º 1
0
        public void RemoveSavedProperty(string canonicalName)
        {
            var index = SavedProperties.FindIndex(p => p.CanonicalName == canonicalName);

            if (index != -1)
            {
                SavedProperties.RemoveAt(index);
            }
            DictSavedProperties.Remove(canonicalName);
        }
Ejemplo n.º 2
0
        private void LoadSavedProperties()
        {
            if (DataFolder == null)
            {
                return;
            }

            var di = new DirectoryInfo(DataFolder);

            foreach (var fi in di.GetFiles().Where(f => f.Extension == ".xml"))
            {
                var pc = LoadPropertyConfig(fi.FullName);
                if (pc != null) // Occurs when property cannot be loaded
                {
                    SavedProperties.Add(pc);
                    DictSavedProperties.Add(pc.CanonicalName, pc);
                }
            }
        }