private void HandleCameraSelect(object sender, CameraEventArgs e) { IPhotoModel photoModel = transform.GetComponent <PhotoController>().GETPhotoModel(); model.ChangeVisibility(false); photoModel.ChangeVisibility(true); }
public async Task AddPhotoToCachesAsync(IPhotoModel photo) { //Add to list of all user photos await RedisCache.ListLeftPushAsync <IPhotoModel>(_cache, RedisConfig.AllUsersCache, photo); //Add to list of user-specific photos await RedisCache.ListLeftPushAsync <IPhotoModel>(_cache, RedisConfig.PhotosForUserCache(photo.Owner), photo); //Add single item to cache await RedisCache.SetAsync <IPhotoModel>(_cache, RedisConfig.PhotoByIDCache(photo.ID), photo); }
public PhotoEntity(IPhotoModel model) { this.PartitionKey = model.Owner; this.RowKey =model.ID; this.StorageAccountName = model.StorageAccountName; this.ServerFileName = model.ServerFileName; this.Owner = model.Owner; this.OwnerName = model.OwnerName; this.BlobURL = model.BlobURL; this.ThumbnailURL = model.ThumbnailURL; this.DateAdded = model.DateAdded; this.OriginRegion = model.OriginRegion; }
public PhotoEntity(IPhotoModel model) { this.PartitionKey = model.Owner; this.RowKey = model.ID; this.StorageAccountName = model.StorageAccountName; this.ServerFileName = model.ServerFileName; this.Owner = model.Owner; this.OwnerName = model.OwnerName; this.BlobURL = model.BlobURL; this.ThumbnailURL = model.ThumbnailURL; this.DateAdded = model.DateAdded; this.OriginRegion = model.OriginRegion; }
public IPhotoViewModel Build(IPhotoModel model) { var viewModel = new PhotoViewModel { Image = model.Image, Camera = _cameraViewModelBuilder.Build(model.Camera), Comment = model.Comment, DateTaken = model.DateTaken, Name = model.Name, Path = model.Path, Similarity = model.Similarity }; return(viewModel); }
//Initialize Model, view and Listeners private void Start() { model = new PhotoModel(); model.Photo = new Texture2D(100, 100); view = transform.GetChild(3).GetComponent <PhotoView>(); // Listen to input from the view view.OnReceived += HandleInputReceived; view.OnTakePhoto += HandleTakePhoto; view.OnBack += HandleBack; // Listen to changes in the model model.OnPictureChanged += HandlePictureChanged; model.VisibilityChange += MenuStatusVisibility; }
public IPhotoViewModel Create(IPhotoModel model) { if (model is IPhotoViewModel viewModel) { return(viewModel); } var photoViewModel = new PhotoViewModel(_messenger, _navigationService) { Model = (PhotoModel)model }; photoViewModel.RedundantPhotos.Cast(Create); return(photoViewModel); }
public async Task AddPhotoToAllUsersCacheAsync(IPhotoModel photo) { //Add to list of user-specific photos await RedisCache.ListLeftPushAsync <IPhotoModel>(_cache, RedisConfig.AllUsersCache, photo); }
public async Task AddPhotoToUserCacheAsync(IPhotoModel photo) { //Add to list of user-specific photos await RedisCache.ListLeftPushAsync <IPhotoModel>(_cache, RedisConfig.PhotosForUserCache(photo.Owner), photo); }