GetTitle() public method

public GetTitle ( ) : string
return string
Ejemplo n.º 1
0
        private SyncItem CreateSyncItem(SyncFolder sf, FileInfo fi, ImageInfo ii, SyncItem.Actions action, string name, long max_size)
        {
            var si = new SyncItem();

            si.Action = action;

            if (fi.Length > max_size)
            {
                si.Action = SyncItem.Actions.ActionNone;
            }

            si.Filename = fi.FullName;
            si.SetId = sf.SetId;
            si.SetTitle = sf.SetTitle;
            si.SetDescription = sf.SetDescription;
            si.NoDeleteTags = sf.NoDeleteTags;

            if (!string.IsNullOrEmpty(ii.GetTitle()) && sf.SyncMethod != SyncFolder.Methods.SyncFilename)
            {
                si.Title = ii.GetTitle();
            }
            else
            {
                si.Title = name;
            }

            si.Description = ii.GetDescription();
            si.Tags = ii.GetTagsArray();

            if (!string.IsNullOrEmpty(ii.GetCity()))
            {
                si.Tags.Add(ii.GetCity());
            }

            if (!string.IsNullOrEmpty(ii.GetCountry()))
            {
                si.Tags.Add(ii.GetCountry());
            }

            si.GeoLat = ii.GetGeo(true);
            si.GeoLong = ii.GetGeo(false);

            si.FolderPath = sf.FolderPath;
            si.Permission = sf.Permission;

            return si;
        }
Ejemplo n.º 2
0
        private bool IsPhotoMatch(SyncFolder sf, PhotoInfo pi, ImageInfo ii, string name)
        {
            if (sf.SyncMethod == SyncFolder.Methods.SyncFilename && pi.Title == name)
            {
                return true;
            }

            if (sf.SyncMethod == SyncFolder.Methods.SyncDateTaken && pi.DateTaken == ii.GetDateTaken())
            {
                return true;
            }

            if (sf.SyncMethod == SyncFolder.Methods.SyncTitleOrFilename)
            {
                string title = ii.GetTitle();
                if (string.IsNullOrEmpty(title))
                {
                    title = name;
                }

                if (pi.Title == title)
                {
                    return true;
                }
            }

            return false;
        }