public FakeHandHistoriesViewModel( IConstructor <IHandHistoryViewModel> handHistoryViewModelMake, IItemsPagesManager <IHandHistoryViewModel> itemsPagesManager, IHandHistoriesFilter handHistoriesFilter) : base(handHistoryViewModelMake, itemsPagesManager, handHistoriesFilter) { InterceptOnSetMethods = false; }
public HandHistoriesViewModel( IConstructor <IHandHistoryViewModel> handHistoryViewModelMake, IItemsPagesManager <IHandHistoryViewModel> itemsPagesManager, IHandHistoriesFilter handHistoriesFilter) { _handHistoriesFilter = handHistoriesFilter; _itemsPagesManager = itemsPagesManager; _handHistoryViewModelMake = handHistoryViewModelMake; _pageNumbers = new ObservableCollection <int>(); }
void ReflectChangedRadioButtonIn(IHandHistoriesFilter filter) { if (filter.ShowAll != (bool)radShowAll.IsChecked) { filter.ShowAll = (bool)radShowAll.IsChecked; } if (filter.ShowMoneyInvested != (bool)radShowMoneyInvested.IsChecked) { filter.ShowMoneyInvested = (bool)radShowMoneyInvested.IsChecked; } if (filter.ShowSawFlop != (bool)radShowSawFlop.IsChecked) { filter.ShowSawFlop = (bool)radShowSawFlop.IsChecked; } if (filter.ShowSelectedOnly != (bool)radShowSelectedOnly.IsChecked) { filter.ShowSelectedOnly = (bool)radShowSelectedOnly.IsChecked; } }
string BuildHtmlText() { IHandHistoriesFilter filter = _handHistoriesViewModel.HandHistoriesFilter; string heroName = filter.SelectHero ? filter.HeroName : null; string htmlHandHistories = HtmlStringBuilder.BuildFrom( _handHistoriesViewModel.SelectedHandHistories, filter.ShowPreflopFolds, heroName); Encoding enc = Encoding.UTF8; string htmlBegin = "<html>\r\n<head>\r\n" + "<meta http-equiv=\"Content-Type\"" + " content=\"text/html; charset=" + enc.WebName + "\">\r\n" + "<title>Poker Game Report</title>\r\n</head>\r\n<body>\r\n"; const string htmlEnd = "\r\n</body>\r\n</html>\r\n"; return(htmlBegin + htmlHandHistories + htmlEnd); }
public HandHistoriesViewModel( IConstructor <IHandHistoryViewModel> handHistoryViewModelMake, IItemsPagesManager <IHandHistoryViewModel> itemsPageManager, IHandHistoriesFilter handHistoriesFilter) : base(handHistoryViewModelMake, itemsPageManager, handHistoriesFilter) { var designHelper = new DesignHelper(); var hands = new List <IConvertedPokerHand>(); for (int i = 0; i < 100; i++) { var hand = designHelper.CreateSamplePokerHand(i); if (i % 3 == 0) { hand[0].Name = "hero"; } hands.Add(hand); } InitializeWith(hands, 10); }