Пример #1
0
        void ReceiveProfiles(IEnumerable<BufferProfile> profiles, BufferResponse response)
        {
            if (response.StatusCode != System.Net.HttpStatusCode.OK || profiles == null)
            {
                MessageService.ShowError(Localization.Resources.ErrorBufferProfiles);
                GoBack();
                return;
            }

            bool added = false;

            foreach (var profile in profiles.Where(x => x.Service.ToLowerInvariant() == "twitter"))
            {
                if (Config.Accounts.Any(x => x.ScreenName == profile.ServiceUsername))
                {
                    added = true;
                    Config.BufferProfiles.Add(profile);
                }
            }

            Config.SaveBufferProfiles();

            if (!added)
            {
                MessageService.ShowWarning(Localization.Resources.NoBufferProfilesAdded);
            }

            GoBack();
        }
Пример #2
0
        void ReceiveProfiles(IEnumerable <BufferProfile> profiles, BufferResponse response)
        {
            if (response.StatusCode != System.Net.HttpStatusCode.OK || profiles == null)
            {
                MessageService.ShowError(Localization.Resources.ErrorBufferProfiles);
                GoBack();
                return;
            }

            bool added = false;

            foreach (var profile in profiles.Where(x => x.Service.ToLowerInvariant() == "twitter"))
            {
                if (Config.Accounts.Any(x => x.ScreenName == profile.ServiceUsername))
                {
                    added = true;
                    Config.BufferProfiles.Add(profile);
                }
            }

            Config.SaveBufferProfiles();

            if (!added)
            {
                MessageService.ShowWarning(Localization.Resources.NoBufferProfilesAdded);
            }

            GoBack();
        }
Пример #3
0
        public void ReceiveBufferResponse(BufferUpdateCreation updates, BufferResponse response)
        {
            IsLoading = false;
            if (response.StatusCode != HttpStatusCode.OK || updates == null || !updates.Success)
            {
                MessageService.ShowError(Resources.ErrorCreatingBuffer);
                return;
            }

            TweetText         = "";
            DataTransfer.Text = "";
            MessageService.ShowMessage(Resources.BufferUpdateSent);
            GoBack();
        }
Пример #4
0
        public void ReceiveBufferResponse(BufferUpdateCreation updates, BufferResponse response)
        {
            IsLoading = false;
            if (response.StatusCode != HttpStatusCode.OK || updates == null || !updates.Success)
            {
                MessageService.ShowError(Resources.ErrorCreatingBuffer);
                return;
            }

            TweetText = "";
            DataTransfer.Text = "";
            MessageService.ShowMessage(Resources.BufferUpdateSent);
            GoBack();
        }