public FlinchVMData(IEventAggregator aggregator, CommandContainer command)
 {
     Deck1       = new DeckObservablePile <FlinchCardInformation>(aggregator, command);
     Pile1       = new PileObservable <FlinchCardInformation>(aggregator, command);
     PlayerHand1 = new HandObservable <FlinchCardInformation>(command);
     StockPile   = new StockViewModel(command, aggregator);
     PublicPiles = new PublicPilesViewModel(command);
 }
 public SkipboVMData(IEventAggregator aggregator, CommandContainer command)
 {
     Deck1       = new DeckObservablePile <SkipboCardInformation>(aggregator, command);
     Pile1       = new PileObservable <SkipboCardInformation>(aggregator, command);
     PlayerHand1 = new HandObservable <SkipboCardInformation>(command);
     StockPile   = new StockViewModel(command, aggregator);
     //DiscardPiles = new DiscardPilesVM<SkipboCardInformation>(command, aggregator);
     //DiscardPiles.Init(HowManyDiscards); //hopefully this simple (?)
     PublicPiles = new PublicPilesViewModel(command, aggregator);
 }
예제 #3
0
 public void UpdateLists(PublicPilesViewModel mod)
 {
     _thisMod = mod;
     _thisStack !.Children.Clear(); //best to just redo this time.
     _pileList !.CollectionChanged -= PileList_CollectionChanged;
     _pileList = _thisMod.PileList;
     _pileList.CollectionChanged += PileList_CollectionChanged;
     foreach (var thisPile in _pileList)
     {
         IndividualPileXF thisCon = new IndividualPileXF();
         thisCon.ThisPile = thisPile;
         thisCon.MainMod  = _thisMod;
         thisCon.Init(); // i think i needed this as well
         _thisStack.Children.Add(thisCon);
     }
 }
예제 #4
0
        public void Init(PublicPilesViewModel mod)
        {
            _thisMod    = mod;
            _parentGrid = new Grid();
            _thisStack  = new StackLayout();
            var tempCard = new FlinchCardInformation();
            var thisP    = Resolve <IProportionImage>();

            _sizeUsed = tempCard.DefaultSize.GetSizeUsed(thisP.Proportion);
            _thisStack.Orientation = StackOrientation.Horizontal; // start out horizontally
            _pileList = _thisMod.PileList;                        // i think its that simple.
            _pileList.CollectionChanged += PileList_CollectionChanged;
            HeightRequest = _sizeUsed.Height;
            foreach (var thisPile in _pileList)
            {
                IndividualPileXF thisCon = new IndividualPileXF();
                thisCon.ThisPile = thisPile;
                thisCon.MainMod  = _thisMod;
                thisCon.Init(); // i think i needed this as well
                _thisStack.Children.Add(thisCon);
            }
            _parentGrid.Children.Add(_thisStack);
            Content = _parentGrid;
        }