public void SaveChanges()
        {
            this.SetInProgress(true, "");
            this.IsFormEnabled = false;
            GroupsService current        = GroupsService.Current;
            long          communityId    = this._communityId;
            long          countryId      = this._countryId;
            long          cityId         = this._cityId;
            string        address        = this.Address;
            string        place1         = this.Place;
            GeoCoordinate geoCoordinate1 = this.GeoCoordinate;
            double        latitude       = (object)geoCoordinate1 != null ? geoCoordinate1.Latitude : 0.0;
            GeoCoordinate geoCoordinate2 = this.GeoCoordinate;
            double        longitude      = (object)geoCoordinate2 != null ? geoCoordinate2.Longitude : 0.0;
            Action <BackendResult <PlacementEditingResult, ResultCode> > callback = (Action <BackendResult <PlacementEditingResult, ResultCode> >)(result => Execute.ExecuteOnUIThread((Action)(() =>
            {
                if (result.ResultCode == ResultCode.Succeeded)
                {
                    VKClient.Common.Backend.DataObjects.Place place2 = new VKClient.Common.Backend.DataObjects.Place()
                    {
                        country_id = this._countryId,
                        country_name = this.Country,
                        city_id = this._cityId,
                        city_name = this.City,
                        address = this.Address,
                        title = this.Place,
                        latitude = this.GeoCoordinate.Latitude,
                        longitude = this.GeoCoordinate.Longitude,
                        group_id = this._communityId
                    };
                    Navigator.Current.GoBack();
                    EventAggregator.Current.Publish((object)new CommunityPlacementEdited()
                    {
                        Place = place2
                    });
                }
                else
                {
                    this.SetInProgress(false, "");
                    this.IsFormEnabled = true;
                    GenericInfoUC.ShowBasedOnResult((int)result.ResultCode, "", null);
                }
            })));

            current.SetCommunityPlacement(communityId, countryId, cityId, address, place1, latitude, longitude, callback);
        }
 public PlacementSelectionViewModel(long communityId, VKClient.Common.Backend.DataObjects.Place place)
 {
     this._communityId = communityId;
     if (place == null)
     {
         return;
     }
     if (place.country_name != null)
     {
         this._countryId = place.country_id;
         this.Country    = place.country_name;
     }
     if (place.city_name != null)
     {
         this._cityId = place.city_id;
         this.City    = place.city_name;
     }
     this.Address       = place.address;
     this.Place         = place.title;
     this.GeoCoordinate = new GeoCoordinate(place.latitude, place.longitude);
 }