Example #1
0
        public async void AddAlbum()
        {
            var albumName = await InputService.GetString(UINotifications.AddAlbum, UINotifications.EnterNewAlbumName);

            if (string.IsNullOrEmpty(albumName))
            {
                NotificationService.ShowAlert(UINotifications.Error, UINotifications.AlbumsNameCanNotBeEmpty);
                return;
            }
            try
            {
                StartBusiness();
                var result = await SocialNetworkService.AddAlbumAsync(UserInfo.Id, albumName);

                if (result)
                {
                    LoadData();
                }
            }
            catch (Exception ex)
            {
                Log.Write(string.Format("AddAlbumAsync Error: {0}", ex.Message));
            }
            finally
            {
                StopBusiness();
            }
        }