예제 #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;
 }