Exemple #1
0
        public async void UploadResidentPhoto()
        {
            _vm.ResidentTemplate.Picture = await ImgurPhotoUploader.UploadPhotoAsync();

            var tmp = _vm.ResidentTemplate;

            _vm.ResidentTemplate = new Resident();
            _vm.ResidentTemplate = tmp;
        }
Exemple #2
0
 /// <summary>
 /// USER HANDLERS
 /// </summary>
 ///
 public async void UploadUserPhoto()
 {
     try
     {
         ApartmentViewModel.UserSingleton.CurrentUser.Picture = await ImgurPhotoUploader.UploadPhotoAsync();
     }
     catch (Exception e)
     {
         new MessageDialog(e.Message).ShowAsync();
     }
 }
Exemple #3
0
        public async void UploadUserPhoto()
        {
            var picture = await ImgurPhotoUploader.UploadPhotoAsync();

            if (picture != "")
            {
                _vm.UserTemplate.Picture = picture;
                var tmp = _vm.UserTemplate;
                _vm.UserTemplate = new User();
                _vm.UserTemplate = tmp;
            }
        }
        public async void UploadChangeDocument()
        {
            if (_vm.ChangeTemplate.Documents == null)
            {
                _vm.ChangeTemplate.Documents = new ObservableCollection <ChangeDocument>();
            }
            var document = new ChangeDocument()
            {
                Document = await ImgurPhotoUploader.UploadPhotoAsync()
            };

            _vm.ChangeTemplate.Documents.Add(document);
            _vm.AddedChangeDocuments.Add(document);
        }
        public async void UploadDefectPicture()
        {
            if (_vm.DefectTemplate.Pictures == null)
            {
                _vm.DefectTemplate.Pictures = new ObservableCollection <DefectPicture>();
            }
            var picture = new DefectPicture()
            {
                Picture = await ImgurPhotoUploader.UploadPhotoAsync()
            };

            _vm.DefectTemplate.Pictures.Add(picture);
            _vm.AddedDefectPictures.Add(picture);
        }
Exemple #6
0
        ///////////////////////////////////////////////////////////////////////////////////////////////////
        public async void UploadResidentPhoto()
        {
            try
            {
                ApartmentViewModel.NewResident.Picture = await ImgurPhotoUploader.UploadPhotoAsync();

                var tmp = ApartmentViewModel.NewResident;
                ApartmentViewModel.NewResident = new Resident();
                ApartmentViewModel.NewResident = tmp;
            }
            catch (Exception e)
            {
                new MessageDialog(e.Message).ShowAsync();
            }
        }
Exemple #7
0
 public async void UploadChangePicture()
 {
     try
     {
         if (ApartmentViewModel.NewChange.Documents == null)
         {
             ApartmentViewModel.NewChange.Documents = new ObservableCollection <ChangeDocument>();
         }
         var picture = new ChangeDocument()
         {
             Document = await ImgurPhotoUploader.UploadPhotoAsync()
         };
         ApartmentViewModel.NewChange.Documents.Add(picture);
     }
     catch (Exception e)
     {
         new MessageDialog(e.Message).ShowAsync();
     }
 }
Exemple #8
0
 public async void UploadDefectPhoto()
 {
     try
     {
         if (ApartmentViewModel.NewDefect.Pictures == null)
         {
             ApartmentViewModel.NewDefect.Pictures = new ObservableCollection <DefectPicture>();
         }
         var picture = new DefectPicture()
         {
             Picture = await ImgurPhotoUploader.UploadPhotoAsync()
         };
         ApartmentViewModel.NewDefect.Pictures.Add(picture);
     }
     catch (Exception e)
     {
         new MessageDialog(e.Message).ShowAsync();
     }
 }
 public async void UploadApartmentPlan()
 {
     _vm.ApartmentTemplate.PlanPicture = await ImgurPhotoUploader.UploadPhotoAsync();
 }