public OpponentCardsView(OldMaidVMData model)
        {
            BaseHandXF <RegularSimpleCard, ts, DeckOfCardsXF <RegularSimpleCard> > hand = new BaseHandXF <RegularSimpleCard, ts, DeckOfCardsXF <RegularSimpleCard> >();

            hand.Divider = 2;
            hand.LoadList(model.OpponentCards1, ts.TagUsed);
            Content = hand;
        }
        public MailListView(PaydayVMData model)
        {
            BaseHandXF <MailCard, CardGraphicsCP, MailCardXF> hand = new BaseHandXF <MailCard, CardGraphicsCP, MailCardXF>();

            hand.HandType          = HandObservable <MailCard> .EnumHandList.Vertical;
            hand.HeightRequest     = 500;
            hand.HorizontalOptions = LayoutOptions.Start;
            hand.LoadList(model.CurrentMailList, "");
            Content = hand;
        }
Exemple #3
0
        Task IHandleAsync <LoadEventModel> .HandleAsync(LoadEventModel message)
        {
            //todo:  most of the time needs this.  if in a case its not needed, then delete then.
            EightOffSolitaireMainViewModel model = (EightOffSolitaireMainViewModel)BindingContext;
            var tempWaste = (WastePiles)model.WastePiles1 !;

            _waste.Init(tempWaste.Piles);
            var tempMain = (MainPilesCP)model.MainPiles1 !;

            _main.Init(tempMain.Piles, ts.TagUsed);
            _reserve.LoadList(model.ReservePiles1, ts.TagUsed);
            return(Task.CompletedTask);
        }
Exemple #4
0
        Task IHandleAsync <LoadEventModel> .HandleAsync(LoadEventModel message)
        {
            CribbagePatienceMainViewModel model = (CribbagePatienceMainViewModel)BindingContext;
            var hand1 = model.GetScoreHand(EnumHandCategory.Hand1);
            var hand2 = model.GetScoreHand(EnumHandCategory.Hand2);
            var crib  = model.GetScoreHand(EnumHandCategory.Crib);

            _hand1Score.Init(hand1);
            _hand2Score.Init(hand2);
            _cribScore.Init(crib);
            _cribHand.LoadList(model.TempCrib, ts.TagUsed);
            _yourHand.LoadList(model.Hand1, ts.TagUsed);
            _score1.Init(model);
            return(Task.CompletedTask);
        }
        public PickelBidView(PickelCardGameVMData model, IEventAggregator aggregator)
        {
            StackLayout stack = new StackLayout();
            BidControl  bid   = new BidControl();

            bid.LoadLists(model);
            BaseHandXF <PickelCardGameCardInformation, ts, DeckOfCardsXF <PickelCardGameCardInformation> > hand = new BaseHandXF <PickelCardGameCardInformation, ts, DeckOfCardsXF <PickelCardGameCardInformation> >();

            stack.Children.Add(bid);
            stack.Children.Add(hand);
            hand.LoadList(model.PlayerHand1, ts.TagUsed);

            Content     = stack;
            _aggregator = aggregator;
            _aggregator.Subscribe(this);
        }
        public ChooseColorView(IEventAggregator aggregator, UnoVMData model)
        {
            _aggregator = aggregator;
            _aggregator.Subscribe(this);
            StackLayout stack = new StackLayout();
            EnumPickerXF <CheckerChoiceCP <EnumColorTypes>,
                          CheckerChooserXF <EnumColorTypes>, EnumColorTypes> picker = new EnumPickerXF <CheckerChoiceCP <EnumColorTypes>, CheckerChooserXF <EnumColorTypes>, EnumColorTypes>();

            stack.Children.Add(picker);
            BaseHandXF <UnoCardInformation, UnoGraphicsCP, CardGraphicsXF> hand = new BaseHandXF <UnoCardInformation, UnoGraphicsCP, CardGraphicsXF>();

            stack.Children.Add(hand);
            hand.Margin = new Thickness(5);
            hand.LoadList(model.PlayerHand1, ts.TagUsed);
            picker.LoadLists(model.ColorPicker);
            Content = stack;
        }
        public void Init(TempSetsObservable <SU, CO, RU> thisMod, string tagUsed)
        {
            StackLayout thisStack = new StackLayout();

            thisStack.Orientation = StackOrientation.Horizontal;
            BaseHandXF <RU, GC, GW> thisHand;

            _handList = new CustomBasicList <BaseHandXF <RU, GC, GW> >();
            foreach (var thisSet in thisMod.SetList)
            {
                thisHand = new BaseHandXF <RU, GC, GW>();
                thisHand.ExtraControlSpace = 40;
                thisHand.HandType          = HandObservable <RU> .EnumHandList.Vertical;
                thisHand.Divider           = Divider;
                thisHand.Additionals       = Additionals;
                thisHand.LoadList(thisSet, tagUsed);
                _handList.Add(thisHand);
                thisHand.VerticalOptions = LayoutOptions.Fill; //try this way.
                thisStack.Children.Add(thisHand);
            }
            Content = thisStack;
        }