Пример #1
0
        void SendBufferUpdate(object param)
        {
            if (!TrialInformation.IsFullFeatured)
            {
                TrialInformation.ShowBuyDialog();
                return;
            }

            if (Config.BufferProfiles.Count == 0)
            {
                AskBufferLogin();
                return;
            }

            List <string> profiles = new List <string>();

            foreach (var account in SelectedAccounts.Cast <UserToken>())
            {
                var profile = Config.BufferProfiles.Where(x => x.ServiceUsername == account.ScreenName).FirstOrDefault();

                if (profile != null)
                {
                    profiles.Add(profile.Id);
                }
            }

            var service = ServiceDispatcher.GetBufferService();

            if (service != null)
            {
                IsLoading = true;
                service.PostUpdate(TweetText, profiles, ReceiveBufferResponse);
            }
        }