Ejemplo n.º 1
0
        public async Task <ActionResult> Index(CardSearchModel searchModel)
        {
            // Generate data for drop down list
            var allUsers = await SearchService.QuickSearchAsync();

            searchModel.UserIdList = allUsers.Documents.Select(x => new SelectListItem {
                Value = x.Id.ToString(), Text = x.DisplayName
            });

            // Perform search
            var filteredUsersResponse = await SearchService.SearchAsync(new UserSearchDto
            {
                Query           = searchModel.Query?.Trim().ToLower(),
                FollowerMinimum = searchModel.FollowerMinimum,
                UserId          = searchModel.UserId,
                Distance        = searchModel.Distance,
                Latitude        = searchModel.Latitude,
                Longitude       = searchModel.Longitude
            });

            var model = new CardListView
            {
                Results     = filteredUsersResponse.Documents,
                SearchModel = searchModel
            };

            return(View(model));
        }
Ejemplo n.º 2
0
        protected override void OnClosing(CancelEventArgs e)
        {
            CardListView CLV = new CardListView();

            CLV.DataContext = DataContext;
            CLV.Show();
        }
Ejemplo n.º 3
0
    public void RemoveCardFromListView(CardListView list, Card card)
    {
        var holder = list.GetItemViewsHolderIfVisible(card.m_thisInListView.transform.parent as RectTransform);

        list.RemoveItemFrom(holder.ItemIndex, 1);
        card.m_thisInListView = card;
    }
Ejemplo n.º 4
0
    public override void Init(IModule module)
    {
        base.Init(module);

        _view = (CardListView)InstantiateView <CardListView>("Recollection/Prefabs/CardListView");
        RegisterView(_view);
        NetWorkManager.Instance.Send <DrawProbRes>(CMD.DRAWC_DRAW_PROBS, null, OnGetCardTotalNum, null, true, GlobalData.VersionData.VersionDic[CMD.DRAWC_DRAW_PROBS]);
    }
        private void ShowCardDetails(CardListView card)
        {
            _shownCard = Cards.GetFromDbfId(card.Dbfid);
            string      imageSource = Path.Combine(Config.CardImagesFolder(), $"{card.Dbfid}.png");
            BitmapImage image;

            if (!File.Exists(Path.Combine(Config.CardImagesFolder(), $"{card.Dbfid}.png")))
            {
                imageSource = Path.Combine(Config.CardImagesFolder(), "1688.png");
            }
            image = new BitmapImage(new Uri(imageSource));

            TxtBoxCardName.Text   = card.Name;
            TxtBoxCardType.Text   = card.Type;
            TxtBoxCardRarity.Text = card.Rarity;
            TxtBoxCardSet.Text    = card.Set;
            CardImage.Source      = image;
        }
        public async void Initialize()
        {
            if (IsBusy)
            {
                return;
            }
            IsBusy = true;
            try
            {
                //Subscribe to filterchanged events
                FilterSettings.FilterChanged += OnFilterChanged;
                //Do not await anything here
                searchPosition = App.CurrentPosition;

                _items = new ObservableRangeCollection <ContentView>();
                int index = 0;
                foreach (var type in Constants.PartyTypes)
                {
                    CardListView cardListView = new CardListView();
                    cardListView.index      = index;
                    cardListView.Title      = type;
                    cardListView.Refreshed += RefreshPage;
                    _items.Add(cardListView);
                    index++;
                }

                await((CardListView)_items[0]).Refresh();
            }catch (Exception ex)
            {
                Console.WriteLine("[$] Error Occured! " + ex.Message);
                throw new Exception(ex.Message);
            }
            finally
            {
                IsBusy = false;
            }
        }
Ejemplo n.º 7
0
 internal Xamarin.Forms.View GetCardForPopup(Vehicle vehicle)
 {
     return(CardListView.BuildCard(CreateDataSource(vehicle)));
 }
        private void ShowCardDetails(Card card)
        {
            CardListView cardView = new CardListView(card);

            ShowCardDetails(cardView);
        }