/// <summary> /// A load new series command has been initiated. Reload the models from the files. /// </summary> /// <param name="message"></param> private void LoadNewSeries(LoadNewSeriesMessage message) { this.Seasons = this.seasonIo.GetSeasons(); this.Athletes = this.athleteData.ReadAthleteData(); this.Clubs = this.clubData.LoadClubData(); this.GlobalSummary = this.summaryData.LoadSummaryData(); }
/// <summary> /// A new series has loaded, check the local validity. /// </summary> /// <param name="message">load series message</param> private void LoadNewSeries(LoadNewSeriesMessage message) { this.IsValid = this.generalIo.DataFolderExists && this.generalIo.ConfigurationFolderExists; ValidLocationMessage locationMessage = new ValidLocationMessage(this.IsValid); Messenger.Default.Send(locationMessage); }
/// <summary> /// Create new series data in the current folder. /// </summary> public void CreateNewSeries() { HandicapProgressMessage progress = new HandicapProgressMessage("New Series Created"); CreateNewSeriesMessage createNew = new CreateNewSeriesMessage(); LoadNewSeriesMessage loadNewMessage = new LoadNewSeriesMessage(); NewSeriesLoadedMessage newLoadedMessage = new NewSeriesLoadedMessage(); Messenger.Default.Send(createNew); Messenger.Default.Send(loadNewMessage); Messenger.Default.Send(newLoadedMessage); Messenger.Default.Send(progress); }
/// <summary> /// Gets a new location and load it. /// </summary> public void LoadNewSeries() { FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.SelectedPath = this.businessLayerManager.ModelRootDirectory; DialogResult result = dialog.ShowDialog(); this.businessLayerManager.SaveRootDirectory(dialog.SelectedPath); LoadNewSeriesMessage loadNewMessage = new LoadNewSeriesMessage(); NewSeriesLoadedMessage newLoadedMessage = new NewSeriesLoadedMessage(); HandicapProgressMessage progress = new HandicapProgressMessage("New Series Loaded"); Messenger.Default.Send(loadNewMessage); Messenger.Default.Send(newLoadedMessage); Messenger.Default.Send(progress); }
/// <summary> /// Load a new series into the model. /// </summary> /// <param name="message">load a new series</param> private void LoadNewSeries(LoadNewSeriesMessage message) { this.ResultsConfigurationDetails = this.configurationReader.LoadResultsConfigData( this.generalIo.ResultsConfigurationFile); }