Beispiel #1
0
 public bool OnMenuItemClick(IMenuItem item)
 {
     if (item.ItemId == Resource.Id.search)
     {
         SearchActivity.Start(this);
     }
     else
     {
         //是否登录
         var user = UserShared.GetAccessToken(this);
         if (user.access_token == "" || user.RefreshTime.AddSeconds(user.expires_in) < DateTime.Now)
         {
             ShowLogin();
         }
         else
         {
             switch (lastSelecteID)
             {
                 case Resource.Id.Statuses:
                     StartActivityForResult(new Intent(this, typeof(StatusAddActivity)), (int)RequestCode.StatusAddCode);
                     break;
                 case Resource.Id.Question:
                     StartActivityForResult(new Intent(this, typeof(QuestionAddActivity)), (int)RequestCode.QuestionAddCode);
                     break;
                 case Resource.Id.bookmarks:
                     StartActivityForResult(new Intent(this, typeof(BookmarkAddActivity)), (int)RequestCode.BookmarkAddCode);
                     break;
             }
         }
     }
     return true;
 }
 public DialogUser(SearchActivity activity, string userid, UserDataObject item)
 {
     try
     {
         ActivityContext = activity;
         Userid          = userid;
         Item            = item;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
Beispiel #3
0
        public async void GetCitiesList(SearchActivity activity, string query)
        {
            var response = await _httpHelper.GetCities(query, Constants.ApiKey);

            response.ForEach(x => activity.SearchCityList.Add(new CityWeather {
                CityKey = x.Key, CityName = x.LocalizedName
            }));

            activity.CityList.Adapter = new ArrayAdapter
                                        (
                activity, Android.Resource.Layout.SimpleListItem1,
                Android.Resource.Id.Text1,
                response.Select(x => x.LocalizedName).ToArray()
                                        );
        }
 public override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     // Create your fragment here
     ContextSearch = (SearchActivity)Activity;
 }
 public GamesearchListAdapter(SearchActivity SearchActivity, List <GameSearch> lstGamesearch)
 {
     this.searchActivity = SearchActivity;
     this.lstGamesearch  = lstGamesearch;
 }
 public void Inject(SearchActivity activity)
 {
     var container = Container.Create(modules);
     container.Inject(activity);
 }
 public override void OnClick(View v)
 {
     SearchActivity.startActivity(context, name.Replace("》", "").Replace("《", ""));
 }
        public void Inject(SearchActivity activity)
        {
            var container = Container.Create(modules);

            container.Inject(activity);
        }
Beispiel #9
0
 public SearchAdapter(SearchActivity searchActivity, List <Game> games)
 {
     this.searchActivity = searchActivity;
     this.games          = games;
 }
Beispiel #10
0
 public LibraryGridAdapter(SearchActivity searchactivity, List <OwnedGameModel> ownedgames)
 {
     SearchActivity = searchactivity;
     OwnedGames     = ownedgames;
 }