protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (e.NavigationMode != System.Windows.Navigation.NavigationMode.Back)
            {
                Current = bitmapGetter == null ? new PictureInfo() : bitmapGetter();
                ImageViewModel.SelectedPicture = Current.Content;
               
                //HeightTextbox.Text = bitMap.PixelHeight.ToString();
                //WidthTextbox.Text = bitMap.PixelWidth.ToString();
                PageTitle.Text = Current.Comments;
            }
        }
Ejemplo n.º 2
0
 private void AddPictureInPhone(System.IO.Stream stream)
 {
     PictureInfo info2 = new PictureInfo {
         AttachedId = this.CurrentAttachedObjectId
     };
     PictureInfo item = info2;
     BitmapImage image = new BitmapImage();
     item.Tag = this.TagName;
     image.SetSource(stream);
     item.PictureId = System.Guid.NewGuid();
     item.Content = image;
     item.SetFileName();
     item.ContentSource = stream;
     this.Pictures.Add(item);
     PictureHandler.OnAfterAdd(item);
 }
        /// <summary>
        /// Adds the picture in phone.
        /// </summary>
        /// <param name="stream">The stream.</param>
        private void AddPictureInPhone(System.IO.Stream stream)
        {
            if (stream == null)
            {
            }
            else
            {
                var picInfo = new PictureInfo()
                {
                    AttachedId = CurrentAttachedObjectId,
                };

                BitmapImage bi = new BitmapImage();
                picInfo.Tag = TagName;
                bi.SetSource(stream);
                picInfo.PictureId = Guid.NewGuid();
                picInfo.Content = bi;
                picInfo.SetFileName();
                //picInfo.FullPath = pictureViewModel.GetFullPath(picInfo);
                picInfo.ContentSource = stream;
                Pictures.Add(picInfo);
                PictureHandler.OnAfterAdd(picInfo);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Adds the picture.
        /// </summary>
        /// <param name="pic">The pic.</param>
        public void AddPicture(PictureInfo pic)
        {
            if (this.PicturesOutOfDatabase == null)
            {
                this.PicturesOutOfDatabase = new List<PictureInfo>();
            }

            if (this.PicturesOutOfDatabase != null)
            {
                this.PicturesOutOfDatabase.Add(pic);
                OnNotifyPropertyChanged(PictureTotalInfoForEditProperty);
            }
        }
Ejemplo n.º 5
0
 public void RemovePicture(PictureInfo pic)
 {
     if (this.PicturesOutOfDatabase != null)
     {
         this.PicturesOutOfDatabase.Remove(pic);
         OnNotifyPropertyChanged(PictureTotalInfoForEditProperty);
     }
 }
Ejemplo n.º 6
0
 private void attach_ToDo(PictureInfo toDo)
 {
     this.OnNotifyPropertyChanging("AccountItem");
     toDo.AccountItem = this;
 }