/// <summary>
        /// Selects a scenario in the scenario list
        /// </summary>
        /// <param name="scenarioId">ID of the selected scenario</param>
        public void SelectScenario(string scenarioId)
        {
            if (State.SelectedScenarioId == scenarioId)
            {
                return;
            }
            var oldState = State;

            State = State.Clone(s => s.SelectedScenarioId = scenarioId);
            var args = new StateChangedEventArgs(oldState, State);

            AppStateChanged?.Invoke(this, args);
            SelectedScenarioChanged?.Invoke(this, args);
        }
        /// <summary>
        /// Sets the list of scenarios
        /// </summary>
        /// <param name="scenarios">List of scenarios</param>
        public void SetScenarioList(List <ComboDataItem> scenarios)
        {
            if (State.Scenarios == scenarios)
            {
                return;
            }
            var oldState = State;

            State = State.Clone(s =>
            {
                s.Scenarios          = scenarios;
                s.SelectedScenarioId = scenarios.Count > 0 ? scenarios[0].Id : null;
            });
            var args = new StateChangedEventArgs(oldState, State);

            AppStateChanged?.Invoke(this, args);
            ScenarioListChanged?.Invoke(this, args);
            SelectedScenarioChanged?.Invoke(this, args);
        }