예제 #1
0
 public LiveTrackerMenuItemFactory(
     IWindowManager liveTrackerSettingsWindow, IGamesTracker gamesTracker, ILiveTrackerSettingsViewModel liveTrackerSettings)
 {
     _liveTrackerSettings       = liveTrackerSettings;
     _liveTrackerSettingsWindow = liveTrackerSettingsWindow;
     _gamesTracker = gamesTracker;
 }
예제 #2
0
        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))));
 }
예제 #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);
        }
예제 #6
0
 public IGamesTracker InitializeWith(ILiveTrackerSettingsViewModel liveTrackerSettings)
 {
     AdjustToNewLiveTrackerSettings(liveTrackerSettings);
     RegisterEvents();
     return(this);
 }
 public LiveTrackerSettingsView(ILiveTrackerSettingsViewModel viewModel)
     : this()
 {
     viewModel.LoadSettings();
     DataContext = viewModel;
 }