private void selectPhoto(object i_Sender) { IPhotoComponent photoProxy = (PhotoProxy)(i_Sender as ListView).SelectedItems[0].Tag; try { r_AlbumScanner.SelectedPhotosList[r_AlbumScanner.SelectedPhotosList.Count - 1].Add(photoProxy); } catch (NotImplementedException) { if (!photoProxy.Equals(r_AlbumScanner.SelectedPhotosList[r_AlbumScanner.SelectedPhotosList.Count - 1])) { r_AlbumScanner.SelectedPhotosList[r_AlbumScanner.SelectedPhotosList.Count - 1] = photoProxy; } else { r_AlbumScanner.SelectedPhotosList[r_AlbumScanner.SelectedPhotosList.Count - 1] = new PhotoProxy(); } } m_NumberOfPhotosToLike = 0; foreach (IPhotoComponent photoComponent in r_AlbumScanner.SelectedPhotosList) { m_NumberOfPhotosToLike += photoComponent.GetChildren().Count; } labelNumberOfPhotosToLike.Text = m_NumberOfPhotosToLike.ToString(); commandButtonLikeSelectedPhotos.Enabled = m_NumberOfPhotosToLike > 0; }
private void OnComponentRemoved(IPhotoComponent i_Param) { if (i_Param is PhotoComponent) { Nodes.Remove((i_Param as PhotoComponent).Node); } else { Nodes.Remove((i_Param as PhotoComposite).Node); } }
public void Add(IPhotoComponent i_PhotoComponent) { if (!r_Components.Contains(i_PhotoComponent)) { r_Components.Add(i_PhotoComponent); } else { Remove(i_PhotoComponent); } }
private void OnComponentAdded(IPhotoComponent i_Param) { if (i_Param is PhotoComponent) { Nodes.Add((i_Param as PhotoComponent).Node = new TreeNodeWrapper(i_Param.ItemName, i_Param)); } else { Nodes.Add((i_Param as PhotoComposite).Node = new TreeNodeWrapper(i_Param.ItemName, i_Param)); } }
public BlackAndWhite(IPhotoComponent i_Photo) : base(i_Photo) { ColorMatrix cmPicture = new ColorMatrix(new float[][] { new float[] { 1.5f, 1.5f, 1.5f, 0, 0 }, new float[] { 1.5f, 1.5f, 1.5f, 0, 0 }, new float[] { 1.5f, 1.5f, 1.5f, 0, 0 }, new float[] { 0, 0, 0, 1, 0 }, new float[] { -1, -1, -1, 0, 1 } }); filter(cmPicture); }
public Polaroid(IPhotoComponent i_Photo) : base(i_Photo) { ColorMatrix cmPicture = new ColorMatrix(new float[][] { new float[] { 1.438f, -0.062f, -0.062f, 0, 0 }, new float[] { -0.122f, 1.378f, -0.122f, 0, 0 }, new float[] { -0.016f, -0.016f, 1.483f, 0, 0 }, new float[] { 0, 0, 0, 1, 0 }, new float[] { -0.03f, 0.05f, -0.02f, 0, 1 } }); filter(cmPicture); }
public Grayscale(IPhotoComponent i_Photo) : base(i_Photo) { ColorMatrix cmPicture = new ColorMatrix(new float[][] { new float[] { 0.33f, 0.33f, 0.33f, 0, 0 }, new float[] { 0.59f, 0.59f, 0.59f, 0, 0 }, new float[] { 0.11f, 0.11f, 0.11f, 0, 0 }, new float[] { 0, 0, 0, 1, 0 }, new float[] { 0, 0, 0, 0, 1 } }); filter(cmPicture); }
public Sepia(IPhotoComponent i_Photo) : base(i_Photo) { ColorMatrix cmPicture = new ColorMatrix(new float[][] { new float[] { 0.393f, 0.349f, 0.272f, 0, 0 }, new float[] { 0.769f, 0.686f, 0.534f, 0, 0 }, new float[] { 0.189f, 0.168f, 0.131f, 0, 0 }, new float[] { 0, 0, 0, 1, 0 }, new float[] { 0, 0, 0, 0, 1 } }); filter(cmPicture); }
public BGR(IPhotoComponent i_Photo) : base(i_Photo) { m_ColorMatrix = new ColorMatrix(new float[][] { new float[] { 0, 0, 1, 0, 0 }, new float[] { 0, 1, 0, 0, 0 }, new float[] { 1, 0, 0, 0, 0 }, new float[] { 0, 0, 0, 1, 0 }, new float[] { 0, 0, 0, 0, 1 } }); filter(m_ColorMatrix); }
public Invert(IPhotoComponent i_Photo) : base(i_Photo) { ColorMatrix cmPicture = new ColorMatrix(new float[][] { new float[] { -1, 0, 0, 0, 0 }, new float[] { 0, -1, 0, 0, 0 }, new float[] { 0, 0, -1, 0, 0 }, new float[] { 0, 0, 0, 1, 0 }, new float[] { 1, 1, 1, 0, 1 } }); filter(cmPicture); }
public TreeNodeWrapper(string i_Name, IPhotoComponent i_Node) : base(i_Name) { m_Node = i_Node; m_Node.PhotoComponentAdded += OnComponentAdded; m_Node.PhotoComponentRemoved += OnComponentRemoved; }
public void Remove(IPhotoComponent i_PhotoComponent) { throw new NotImplementedException(); }
public void Remove(IPhotoComponent i_PhotoComponent) { r_Components.Remove(i_PhotoComponent); }
public void OnPhotoComponentRemoved(IPhotoComponent i_ComponentToRemove) { PhotoComponentRemoved.Invoke(i_ComponentToRemove); }
public void OnPhotoComponentAdded(IPhotoComponent i_ComponentToAdd) { PhotoComponentAdded.Invoke(i_ComponentToAdd); }
public void OnPhotoComponentAdded(IPhotoComponent i_ComponentToAdd) { throw new Exception("You can't add a photo to a photo!"); }
public ThugLifeDecorator(IPhotoComponent i_Photo) : base(i_Photo) { }
public ColorChangerDecorator(IPhotoComponent i_Photo) : base(i_Photo) { }
public PhotoDecorator(IPhotoComponent i_Photo) { m_PhotoComponent = i_Photo; }