Example #1
0
 public LiveTrackerMenuItemFactory(
     IWindowManager liveTrackerSettingsWindow, IGamesTracker gamesTracker, ILiveTrackerSettingsViewModel liveTrackerSettings)
 {
     _liveTrackerSettings       = liveTrackerSettings;
     _liveTrackerSettingsWindow = liveTrackerSettingsWindow;
     _gamesTracker = gamesTracker;
 }
        void AdjustToNewLiveTrackerSettings(ILiveTrackerSettingsViewModel updatedLiveTrackerSettings)
        {
            _liveTrackerSettings = updatedLiveTrackerSettings;

            GameControllers.Values.ForEach(gc => gc.LiveTrackerSettings = _liveTrackerSettings);

            _newHandsTracker.TrackFolders(_liveTrackerSettings.HandHistoryFilesPaths);
        }
        public TableOverlayViewModel(ILiveTrackerSettingsViewModel liveTrackerSettings, IOverlayBoardViewModel boardViewModel, IOverlaySettingsAidViewModel overlaySettingsAid, IConstructor <IPlayerOverlayViewModel> playerOverlayViewModelMake)
        {
            _liveTrackerSettings = liveTrackerSettings;
            _board                      = boardViewModel;
            OverlaySettingsAid          = overlaySettingsAid;
            _playerOverlayViewModelMake = playerOverlayViewModelMake;

            GameHistoryIsPoppedIn = _liveTrackerSettings.LoadSettings().GameHistoryIsPoppedIn;
        }
 public static XDocument CreateXDocumentFor(ILiveTrackerSettingsViewModel lts)
 {
     return
         (new XDocument(
              new XElement(LiveTrackerSettings,
                           new XElement(AutoTrackElement, lts.AutoTrack),
                           new XElement(ShowHoleCardsDurationElement, lts.ShowHoleCardsDuration),
                           new XElement(ShowLiveStatsWindowOnStartupElement, lts.ShowLiveStatsWindowOnStartup),
                           new XElement(ShowTableOverlayElement, lts.ShowTableOverlay),
                           new XElement(ShowMyStatisticsElement, lts.ShowMyStatistics),
                           new XElement(GameHistoryIsPoppedInElement, lts.GameHistoryIsPoppedIn),
                           Utils.XElementForCollection(HandHistoryFilesPathsElement, lts.HandHistoryFilesPaths))));
 }
Example #5
0
        public ImportHandHistoriesViewModel(
            IEventAggregator eventAggregator,
            ILiveTrackerSettingsViewModel liveTrackerSettings,
            IHandHistoriesDirectoryImporter handHistoriesDirectoryImporter)
        {
            _eventAggregator = eventAggregator;
            _handHistoriesDirectoryImporter = handHistoriesDirectoryImporter;

            var firstHandHistoryFolderDefinedInLiveTrackerSettings = liveTrackerSettings
                                                                     .LoadSettings()
                                                                     .HandHistoryFilesPaths
                                                                     .FirstOrDefault();

            HandHistoriesDirectory = firstHandHistoryFolderDefinedInLiveTrackerSettings ?? Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
        }
 public IGamesTracker InitializeWith(ILiveTrackerSettingsViewModel liveTrackerSettings)
 {
     AdjustToNewLiveTrackerSettings(liveTrackerSettings);
     RegisterEvents();
     return(this);
 }
 public LiveTrackerSettingsView(ILiveTrackerSettingsViewModel viewModel)
     : this()
 {
     viewModel.LoadSettings();
     DataContext = viewModel;
 }