private ProjectPlanDto BuildProjectPlanDto() { lock (m_Lock) { return(new ProjectPlanDto() { ProjectStart = ProjectStart, DependentActivities = Activities.Select(x => DtoConverter.ToDto(x)).ToList(), ResourceSettings = ResourceSettingsDto.Copy(), ArrowGraphSettings = ArrowGraphSettingsDto.Copy(), GraphCompilation = DtoConverter.ToDto(GraphCompilation, CyclomaticComplexity.GetValueOrDefault(), Duration.GetValueOrDefault()), ArrowGraph = ArrowGraphDto != null?ArrowGraphDto.Copy() : new ArrowGraphDto() { Edges = new List <ActivityEdgeDto>(), Nodes = new List <EventNodeDto>(), IsStale = false }, HasStaleOutputs = HasStaleOutputs }); } }
public async Task DoOpenResourceSettingsAsync() { try { IsBusy = true; lock (m_Lock) { var confirmation = new ResourceSettingsManagerConfirmation(ResourceSettingsDto.Copy()) { Title = Properties.Resources.Title_ResourceSettings }; m_ResourceSettingsManagerInteractionRequest.Raise(confirmation); if (!confirmation.Confirmed) { return; } ResourceSettingsDto = confirmation.ResourceSettingsDto; m_CoreViewModel.UpdateActivitiesTargetResources(); } HasStaleOutputs = true; IsProjectUpdated = true; await RunAutoCompileAsync(); m_CoreViewModel.UpdateActivitiesAllocatedToResources(); } catch (Exception ex) { DispatchNotification( Properties.Resources.Title_Error, ex.Message); } finally { IsBusy = false; RaiseCanExecuteChangedAllCommands(); } }