예제 #1
0
        public int CompareTo(object obj)
        {
            GallerySource source = obj as GallerySource;

            if (source == null)
            {
                return(-1);
            }
            return(GetIDBase().CompareTo(source.GetIDBase()));
        }
예제 #2
0
        public bool AddSource(GallerySource source)
        {
            if (Sources.Contains(source))
            {
                return(false);
            }

            Sources.Add(source);
            Sources.Sort();
            return(true);
        }
예제 #3
0
 protected FileSystemEntry(string name, string relativePath, MediaFolder parent, GallerySource source)
 {
     ID           = null;
     Name         = name;
     RelativePath = relativePath;
     Parent       = parent;
     Source       = source;
     if (!(string.IsNullOrEmpty(RelativePathName) && string.IsNullOrEmpty(Name)) && Source != null)
     {
         CreateID();
     }
 }
예제 #4
0
 public ImageFile(string name, string relativePath, MediaFolder parent, GallerySource source)
     : base(name, relativePath, parent, source)
 {
     Initialize();
 }
예제 #5
0
 public void RemoveSource(GallerySource source)
 {
     Sources.Remove(source);
 }
예제 #6
0
        public override bool Equals(object obj)
        {
            GallerySource source = obj as GallerySource;

            return(source != null && source.GetIDBase().Equals(GetIDBase(), StringComparison.CurrentCultureIgnoreCase));
        }
예제 #7
0
 public MediaFolder(string name, string relativePath, MediaFolder parent, GallerySource source)
     : base(name, relativePath, parent, source)
 {
     Initialize(false);
 }