コード例 #1
0
        /// <summary>
        /// Méthode appelée lors du chargement
        /// </summary>
        protected override Task OnLoading()
        {
            _timeService = ServiceBus.Get <ITimeTicksFormatService>();
            IProjectManagerService pms = ServiceBus.Get <IProjectManagerService>();
            RestitutionState       restitutionState = pms.RestitutionState[pms.CurrentProject.ProjectId];

            switch (restitutionState.ViewMode.Value)
            {
            case RestitutionStateViewMode.Global:
                SelectedViewIndex = 0;
                break;

            case RestitutionStateViewMode.PerOperator:
                SelectedViewIndex = 1;
                break;

            case RestitutionStateViewMode.PerEquipment:
                SelectedViewIndex = 2;
                break;
            }

            SelectedValueMode = (RestitutionValueMode)restitutionState.RestitutionValueMode.Value;

            return(Task.CompletedTask);
        }
コード例 #2
0
        /// <summary>
        /// Méthode appelée lors du chargement
        /// </summary>
        protected override Task OnLoading()
        {
            IProjectManagerService pms = ServiceBus.Get <IProjectManagerService>();

            _currentProjectId = pms.CurrentProject.ProjectId;

            if (!pms.RestitutionState.TryGetValue(_currentProjectId, out _restitutionState))
            {
                _restitutionState = new RestitutionState
                {
                    Referential          = ProcessReferentialIdentifier.Category,
                    RestitutionValueMode = (int)Core.Behaviors.RestitutionValueMode.Absolute,
                    ViewMode             = RestitutionStateViewMode.Global,
                };
                pms.RestitutionState[_currentProjectId] = _restitutionState;
            }

            return(LoadData(true));
        }