void ShowSessionReviewFor(IHandHistoriesViewModel handHistoriesViewModel) { if (handHistoriesViewModel == null) { return; } // All need to get same HandHistoriesViewModel var childContainer = _container.CreateChildContainer(); childContainer.RegisterInstance(handHistoriesViewModel); var reviewView = childContainer.Resolve <SessionReviewView>(); var handHistoriesView = childContainer.Resolve <IHandHistoriesView>(); var settingsView = childContainer.Resolve <SessionReviewSettingsView>(); var region = _regionManager.Regions[ApplicationProperties.ShellMainRegion]; var scopedRegionManager = region.Add(reviewView, null, true); scopedRegionManager.Regions[ApplicationProperties.HandHistoriesRegion].Add(handHistoriesView); scopedRegionManager.Regions["ReviewSettingsRegion"].Add(settingsView); region.Activate(reviewView); }
public HandHistoriesView(IHandHistoriesViewModel viewModel) : this() { DataContext = viewModel; viewModel.PageTurn += () => HandsScrollViewer.ScrollToHome(); InitializeComponent(); }
public void _Init() { _container = new UnityContainer() .RegisterConstructor <IHandHistoryViewModel, HandHistoryViewModel>() .RegisterType <IItemsPagesManager <IHandHistoryViewModel>, ItemsPagesManager <IHandHistoryViewModel> >() .RegisterType <IHandHistoriesFilter, HandHistoriesFilter>() .RegisterType <IHandHistoriesViewModel, FakeHandHistoriesViewModel>(); _viewModel = _container.Resolve <IHandHistoriesViewModel>(); }
public SessionReviewViewModel(IRegionManager regionManager, IHandHistoriesViewModel handHistoriesViewModel) { _regionManager = regionManager; _handHistoriesViewModel = handHistoriesViewModel; _handHistoriesViewModel.ShowSelectOption = true; _handHistoriesViewModel.ShowHandNotes = true; Commands.SaveSessionReviewCommand.RegisterCommand(SaveCommand); Commands.CreateSessionReviewReportCommand.RegisterCommand(CreateReportCommand); SetHeaderInfo(); }
public SessionReviewSettingsViewModel( IHandHistoriesViewModel handHistoriesViewModel, IInvestedMoneyCondition investedMoneyCondition, ISawFlopCondition sawFlopCondition, IAlwaysTrueCondition alwaysTrueCondition) { _alwaysTrueCondition = alwaysTrueCondition; _sawFlopCondition = sawFlopCondition; _investedMoneyCondition = investedMoneyCondition; _handHistoriesViewModel = handHistoriesViewModel; HandHistoriesViewModel.ShowSelectOption = true; ConnectToHandHistoryFilterEvents(); }