private void UpdateObjectFromFields() { selectedItem.Name = Name.Text; selectedItem.Description = Description.Text; selectedItem.SefTitle = StringHelper.CreateSlug(selectedItem.Name); selectedItem.ThumbnailPath = ThumbnailPath.GetValue().ToString(); }
public Photo(string imagePath) { Url = imagePath; FullPath = imagePath.Replace(@"Thumbnails\", string.Empty); Name = Path.GetFileNameWithoutExtension(Url); Month = Path.GetFileNameWithoutExtension(Path.GetDirectoryName(Url)); Year = Path.GetFileNameWithoutExtension(Path.GetDirectoryName((Path.GetDirectoryName(Url)))); string substring; int index, length; length = imagePath.Length; index = imagePath.IndexOf("OutputDir"); substring = imagePath.Substring(index, length - index); ThumbnailPath = @"~\" + substring; ImagePath = ThumbnailPath.Replace(@"Thumbnails\", string.Empty); }
private void UpdateFieldsFromObject() { Name.Text = selectedItem.Name; Description.Text = selectedItem.Description; ThumbnailPath.SetValue(selectedItem.ThumbnailPath); }