Пример #1
0
        void SetState(UsersState state, string url, Boolean ignoreState)
        {
            if (state == user_state && !ignoreState)
            {
                return;
            }

            switch (state)
            {
            case UsersState.Featured:
                UserSourceFlyoutText.Text = "Featured";
                SearchTextBox.Text        = "";
                // Create a Following URL
                string featured_url = Config.VidmeUrlClass.FeaturedUserURL;
                MainView.ItemsSource = new IncrementalLoadingUserList(featured_url + "?", http_client_semaphore, httpClient);


                break;

            case UsersState.Following:
                UserSourceFlyoutText.Text = "Following";
                SearchTextBox.Text        = "";
                // Create  a Following List
                string following_user_url = Config.VidmeUrlClass.FollowingUserURL(id);
                MainView.ItemsSource = new IncrementalLoadingUserList(following_user_url + "?", http_client_semaphore, httpClient);

                break;

            case UsersState.Search:

                // create users list
                if (user_state != UsersState.Search)
                {
                    last_state = user_state;
                }
                if (url != null)
                {
                    MainView.ItemsSource = new IncrementalLoadingUserList(url + "&", http_client_semaphore, httpClient);
                }

                break;
            }

            user_state = state;
        }
Пример #2
0
 public CallbackController(IVkApi vkApi, IConfiguration configuration, UsersState usersState)
 {
     _vkApi         = vkApi;
     _configuration = configuration;
     _usersState    = usersState;
 }
Пример #3
0
 public MessageController(ILogger <MessageController> logger, UsersState context)
 {
     _logger = logger;
     db      = context;
 }
Пример #4
0
 public ApplyFilterRequestController(UsersState context)
 {
     db         = context;
     account    = new Account(AppSettings.CloudName, AppSettings.CloudKey, AppSettings.CloudSecret);
     cloudinary = new Cloudinary(account);
 }
Пример #5
0
 public static UsersState ReduceAddAction(UsersState state, UsersAddAction action) =>
Пример #6
0
 public static UsersState Reduce(UsersState state, GetUsersAction action) =>
Пример #7
0
 void SetState(UsersState state, string url)
 {
     SetState(state, url, false);
 }
 public MicroStickerRequestController(UsersState context)
 {
     db = context;
 }
Пример #9
0
 public UserController(UsersState context, ILogger <UserController> logger)
 {
     db      = context;
     _logger = logger;
 }