protected override PresetDto CreateNewDto(ExecutionEvent executionEvent)
        {
            PresetDto presetDto = base.CreateNewDto(executionEvent);

            presetDto.TypeId    = executionEvent.GetFirstSelectedTreeNavigationItem().Id;
            presetDto.ProjectId = executionEvent.GetFirstSelectedTreeNavigationItem().ProjectId;
            presetDto.State     = State.NEW;
            return(presetDto);
        }
Beispiel #2
0
        protected override CompositeTypeElementDto CreateNewDto(ExecutionEvent executionEvent)
        {
            CompositeTypeElementDto compositeTypeElementDto = base.CreateNewDto(executionEvent);

            compositeTypeElementDto.OwningTypeId = executionEvent.GetFirstSelectedTreeNavigationItem().Id;
            compositeTypeElementDto.ProjectId    = executionEvent.GetFirstSelectedTreeNavigationItem().ProjectId;
            compositeTypeElementDto.State        = State.NEW;
            return(compositeTypeElementDto);
        }
Beispiel #3
0
        protected override void DoExecute(ExecutionEvent executionEvent)
        {
            IPresetCRUDService presetCRUDService = ServiceActivator.Get <IPresetCRUDService>();

            presetCRUDService.SetAsDefault(executionEvent.GetFirstSelectedTreeNavigationItem().Id, executionEvent.GetMasterTreeNavigationItem().Id);
            OnSuccessful(executionEvent, IdConstants.PRESET_FOLDER_ID);
        }
 protected override void DoExecute(ExecutionEvent executionEvent)
 {
     _projectId = executionEvent.GetFirstSelectedTreeNavigationItem().ProjectId;
     try
     {
         ProgressCounter progressCounter = new ProgressCounter("Generate", "Generating the CSV files...", 1);
         LongRunningJob <GenerateDto> projectCreationJob = new LongRunningJob <GenerateDto>(GenerateAction, progressCounter);
         projectCreationJob.AddAction(delegate {
             _generateWindow.Dispatcher.Invoke(AfterGenerateAction, DispatcherPriority.Normal);
         });
         projectCreationJob.Execute(_generateDto);
     }
     catch (Exception ex)
     {
         OnFailure(executionEvent);
     }
 }
        protected override FolderDto CreateNewDto(ExecutionEvent executionEvent)
        {
            FolderDto folderDto = base.CreateNewDto(executionEvent);

            folderDto.State = State.NEW;
            TreeNavigationItem selectedTreeNavigationItem = executionEvent.GetFirstSelectedTreeNavigationItem();

            if (NavigationType.PROJECT.Equals(selectedTreeNavigationItem.Type))
            {
                folderDto.ProjectId = selectedTreeNavigationItem.Id;
                folderDto.ParentId  = null;
            }
            else
            {
                folderDto.ProjectId = selectedTreeNavigationItem.ProjectId;
                folderDto.ParentId  = selectedTreeNavigationItem.Id;
            }
            return(folderDto);
        }
Beispiel #6
0
 protected override void DoExecute(ExecutionEvent executionEvent)
 {
     WindowsManager.GetInstance().ShowDialog <GenerateCodeWindow>(new GenerateCodeWindowModelView(executionEvent.GetFirstSelectedTreeNavigationItem()));
     OnSuccessful(executionEvent, Guid.Empty);
 }
 protected override void OnSuccessful(ExecutionEvent executionEvent, Guid affectedObjectId)
 {
     Publisher.GetInstance().Publish(PublishEvent.CreateCreationEvent(IdConstants.PRESET_FOLDER_ID, executionEvent.GetFirstSelectedTreeNavigationItem().Id));
 }