Task IUIView.TryActivateAsync() { PokerMainViewModel model = (PokerMainViewModel)DataContext; _deckGPile.Init(model.DeckPile, ts.TagUsed); return(Task.CompletedTask); }
public Task NewGameAsync(PokerMainViewModel model) { _model = model; GameGoing = true; _model.Round = 0; _model.Money = 200; return(base.NewGameAsync(_model.DeckPile)); }
Task IHandleAsync <LoadEventModel> .HandleAsync(LoadEventModel message) { PokerMainViewModel model = (PokerMainViewModel)BindingContext; _hand.Init(model); _bet.Init(model); return(Task.CompletedTask); }
Task IHandleAsync <LoadEventModel> .HandleAsync(LoadEventModel message) { PokerMainViewModel model = (PokerMainViewModel)DataContext; _hand.Init(model); _bet.Init(model); return(Task.CompletedTask); //return this.RefreshBindingsAsync(_aggregator); }
public void Init(PokerMainViewModel thisMod) { NumberChooserXF thisNumber = new NumberChooserXF(); thisNumber.Columns = 3; thisNumber.Rows = 1; thisNumber.TotalRows = 1; thisNumber.LoadLists(thisMod.Bet1 !); Text = "Bet Information"; SetUpMarginsOnParentControl(thisNumber); Grid thisGrid = new Grid(); thisGrid.Children.Add(ThisDraw); thisGrid.Children.Add(thisNumber); Content = thisGrid; }
public void Init(PokerMainViewModel thisMod) { NumberChooserWPF thisNumber = new NumberChooserWPF(); thisNumber.Columns = 3; thisNumber.Rows = 1; thisNumber.LoadLists(thisMod.Bet1 !); Text = "Bet Information"; var thisRect = ThisFrame.GetControlArea(); SetUpMarginsOnParentControl(thisNumber, thisRect); Grid thisGrid = new Grid(); thisGrid.Children.Add(ThisDraw); thisGrid.Children.Add(thisNumber); Content = thisGrid; }
public void Init(PokerMainViewModel thisMod) { _thisMod = thisMod; Type type = _thisMod !.GetType(); MethodInfo? method = type.GetMethod(nameof(PokerMainViewModel.HoldUnhold)); PropertyInfo?fun = type.GetProperty(nameof(PokerMainViewModel.CanHoldUnhold)); if (method == null) { throw new BasicBlankException("Method not found for hand. Rethink"); } if (fun == null) { throw new BasicBlankException("Function not found for hand. Rethink"); } _command = new PlainCommand(_thisMod, method, fun, _thisMod.CommandContainer); _thisGrid = new Grid(); GridHelper.AddAutoColumns(_thisGrid, 5); GridHelper.AddAutoRows(_thisGrid, 2); _thisList = thisMod.PokerList; _thisList.CollectionChanged += ThisList_CollectionChanged; Content = _thisGrid; PopulateControls(); }