private async Task ImageDetailCommandCommandExecute(BindingModel parm)
 {
     if (parm.GetType() == typeof(VisualProjectLocationPhoto))
     {
         VisualProjectLocationPhoto = parm as VisualProjectLocationPhoto;
         // VisualProjectLocationPhoto = parm;
         ImgData.Path     = VisualProjectLocationPhoto.ImageUrl;
         ImgData.ParentID = VisualProjectLocationPhoto.VisualLocationId;
         ImgData.VisualProjectLocationPhoto = VisualProjectLocationPhoto;
         ImgData.IsEditVisual = IsEdit;
         //ImgData.VisualProjectLocationPhotos = VisualProjectLocationPhotoItems;
         ImgData.FormType = "VP";
         await CurrentWithoutDetail.EditImage(ImgData, GetImage);
     }
     if (parm.GetType() == typeof(VisualBuildingLocationPhoto))
     {
         VisualBuildingLocationPhoto = parm as VisualBuildingLocationPhoto;
         ImgData.Path         = VisualBuildingLocationPhoto.ImageUrl;
         ImgData.FormType     = "VB";
         ImgData.IsEditVisual = IsEdit;
         ImgData.VisualBuildingLocationPhoto = VisualBuildingLocationPhoto;
         await CurrentWithoutDetail.EditImage(ImgData, GetImage);
     }
     if (parm.GetType() == typeof(VisualApartmentLocationPhoto))
     {
         VisualApartmentLocationPhoto = parm as VisualApartmentLocationPhoto;
         ImgData.Path         = VisualApartmentLocationPhoto.ImageUrl;
         ImgData.FormType     = "VA";
         ImgData.IsEditVisual = IsEdit;
         ImgData.VisualApartmentLocationPhoto = VisualApartmentLocationPhoto;
         await CurrentWithoutDetail.EditImage(ImgData, GetImage);
     }
 }
        private async Task ImageDetailCommandCommandExecute(VisualBuildingLocationPhoto parm)
        {
            ImgData.Path     = parm.ImageUrl;
            ImgData.ParentID = parm.VisualBuildingId;
            ImgData.VisualBuildingLocationPhoto = parm;
            ImgData.IsEditVisual = true;

            ImgData.FormType = "VB";
            await CurrentWithoutDetail.EditImage(ImgData, GetImage);
        }
        void imagebackground_ImageSaving(System.Object sender, Syncfusion.SfImageEditor.XForms.ImageSavingEventArgs args)
        {
            CurrentWithoutDetail vm = (CurrentWithoutDetail)this.BindingContext;

            MemoryStream m = new MemoryStream();

            args.Stream.CopyTo(m);

            byte[] data = m.ToArray();
            vm.Save(data);
            // args.Cancel = true;
        }
        async Task ExecuteImageDetailCommand(BuildingCommonLocationImages parm)
        {
            BuildingCommonLocationImage = parm;
            ImgData.Path = parm.ImageUrl;

            ImgData.BuildingCommonLocationImages = parm;
            ImgData.FormType = "B";
            await CurrentWithoutDetail.EditImage(ImgData, GetImageFromEditor);

            //  await Shell.Current.Navigation.PushAsync(new EditBuildingLocationImage() { BindingContext = new EditBuildingLocationImageViewModel() { Title = "Edit Building Common Location Image", BuildingCommonLocationImages = parm, BuildingLocation = BuildingLocation } });

            // await App.Current.MainPage.Navigation.PushModalAsync(new ShowImage() { BindingContext = new ShowImageViewModel(parm.Image,parm.Name,parm.Description,parm.CreatedOn) });
        }
Пример #5
0
        async Task ExecuteImageDetailCommand(BuildingApartmentImages parm)
        {
            BuildingApartmentImage = parm;
            ImgData.Path           = parm.ImageUrl;

            ImgData.BuildingApartmentImages = parm;
            ImgData.FormType = "A";
            await CurrentWithoutDetail.EditImage(ImgData, GetImageFromEditor);

            // await Shell.Current.Navigation.PushAsync(new EditBuildingApartmentImage() { BindingContext = new EditBuildingApartmentImageViewModel() { Title = "Edit Building Apartment Image", BuildingApartmentImages = parm, BuildingApartment = BuildingApartment } });

            // ShellNavigationState state = Shell.Current.CurrentState;
            //    await App.Current.MainPage.Navigation.PushModalAsync(new ShowImage() { BindingContext = new ShowImageViewModel(parm.Image,parm.Name,parm.Description,parm.CreatedOn) });
            //await App.Current.MainPage.Navigation.PushModalAsync(new NavigationPage(new ProjectDetail() ));

            //  await Application.Current.MainPage.DisplayAlert("Selected Peron", project.ProjectName, "Ok", "cancel");
            // await Shell.Current.GoToAsync("projectdetail");
        }
        async Task ExecuteImageDetailCommand(ProjectCommonLocationImages parm)
        {
            ProjectCommonLocationImages = parm;
            ImgData.Path = parm.ImageUrl;
            ImgData.ProjectCommonLocationImages = parm;
            ImgData.FormType = "P";
            await CurrentWithoutDetail.EditImage(ImgData, GetImageProjectCommonLocationImages);

            // await Shell.Current.Navigation.PushAsync(new EditProjectLocationImage() { BindingContext = new EditProjectLocationImageViewModel() { Title = "New Project Common Location", ProjectCommonLocationImages = parm , ProjectLocation = ProjectLocation } });
            // await Shell.Current.Navigation.PushModalAsync(new EditProjectLocationImage() { BindingContext = new EditProjectLocationImageViewModel() { Title = "New Project Common Location", ProjectCommonLocationImages = parm } });
            //await Shell.Current.Navigation.PushAsync(new AddProjectLocation()
            //{
            //    BindingContext = new ProjectLocationAddEditViewModel()
            //    { Title = "New Project Common Location", ProjectLocation = new ProjectLocation() { LocationImage = "blank.png" }, Project = Project }
            //});
            // ShellNavigationState state = Shell.Current.CurrentState;
            //     await Shell.Current.Navigation.PushModalAsync(new ShowImage() { BindingContext = new ShowImageViewModel(parm.ImageUrl, parm.Name,parm.Description,parm.CreatedOn) });
            //await App.Current.MainPage.Navigation.PushModalAsync(new NavigationPage(new ProjectDetail() ));

            //  await Application.Current.MainPage.DisplayAlert("Selected Peron", project.ProjectName, "Ok", "cancel");
            // await Shell.Current.GoToAsync("projectdetail");
        }
        private async Task ImageDetailCommandCommandExecute(VisualApartmentLocationPhoto parm)
        {
            //if (parm.GetType() == typeof(VisualProjectLocationPhoto))
            //{
            //  VisualProjectLocationPhoto = parm as VisualProjectLocationPhoto;
            // VisualProjectLocationPhoto = parm;
            ImgData.Path     = parm.ImageUrl;
            ImgData.ParentID = parm.VisualApartmentId;
            ImgData.VisualApartmentLocationPhoto = parm;
            ImgData.IsEditVisual = true;
            //ImgData.VisualProjectLocationPhotos = VisualProjectLocationPhotoItems;
            ImgData.FormType = "VA";
            await CurrentWithoutDetail.EditImage(ImgData, GetImage);



            //}
            //if (parm.GetType() == typeof(VisualBuildingLocationPhoto))
            //{
            //    VisualBuildingLocationPhoto = parm as VisualBuildingLocationPhoto;
            //    ImgData.Path = VisualBuildingLocationPhoto.ImageUrl;
            //    ImgData.FormType = "VB";
            //    ImgData.IsEditVisual = IsEdit;
            //    ImgData.VisualBuildingLocationPhoto = VisualBuildingLocationPhoto;
            //    await CurrentWithoutDetail.EditImage(ImgData, GetImage);

            //}
            //if (parm.GetType() == typeof(VisualApartmentLocationPhoto))
            //{
            //    VisualApartmentLocationPhoto = parm as VisualApartmentLocationPhoto;
            //    ImgData.Path = VisualApartmentLocationPhoto.ImageUrl;
            //    ImgData.FormType = "VA";
            //    ImgData.IsEditVisual = IsEdit;
            //    ImgData.VisualApartmentLocationPhoto = VisualApartmentLocationPhoto;
            //    await CurrentWithoutDetail.EditImage(ImgData, GetImage);

            //}
        }