示例#1
0
 public TaskController(ITasksService tasksService, IWebHostEnvironment host, ILogger <ProductsController> logger, ISubmissionsService submissionService)
 {
     _logger            = logger;
     _host              = host;
     _tasksService      = tasksService;
     _submissionService = submissionService;
 }
示例#2
0
 public UpdateTaskInfoHandler(ITasksService taskService, IMapper mapper,
                              IEmailService emailService)
 {
     _taskService  = taskService;
     _mapper       = mapper;
     _emailService = emailService;
 }
示例#3
0
 public HomeController(UserManager <AppUser> userManager, IVacationsService vacationsService,
                       ITasksService tasksService)
 {
     this.userManager      = userManager;
     this.vacationsService = vacationsService;
     this.tasksService     = tasksService;
 }
 public TasksController(
     ITasksService tasksService,
     IUserManagerService userManagerService)
 {
     _tasksService       = tasksService;
     _userManagerService = userManagerService;
 }
 public RemoveUserFromTaskHandler(ITasksService taskService, ITokenAuthenticationService authService,
                                  IEmailService emailService)
 {
     _taskService  = taskService;
     _authService  = authService;
     _emailService = emailService;
 }
示例#6
0
        public ReportService(IRepository <ReportDAL> repository, IStaffService staffService, ITasksService tasksService)
        {
            _staffService = staffService;
            _tasksService = tasksService;

            _repository = repository;
        }
示例#7
0
        private static RunViewModel GivenARunViewModel(ITasksService tasksService = null, ITestService testService = null)
        {
            tasksService = tasksService ?? Mock.Of <ITasksService>();
            testService  = testService ?? Mock.Of <ITestService>();

            return(new RunViewModel(tasksService, testService, new MvcConfiguration()));
        }
示例#8
0
 public DARController(IDARService DarService, IUserTeamService UserTeamService, ITasksService TaskService, IExceptionHandler Exception)
 {
     _DarService      = DarService;
     _UserTeamService = UserTeamService;
     _TaskService     = TaskService;
     _exception       = Exception;
 }
示例#9
0
        public TasksViewModel(ITasksService tasksService, IPlaybackControl playbackControl, IEventLog eventLog, ILogger logger)
        {
            this.tasksService    = tasksService;
            this.playbackControl = playbackControl;
            this.eventLog        = eventLog;
            this.logger          = logger;

            this.ModalitiesSelection = Selection <Modality> .FromEnum();

            this.Genders = Selection <Gender> .FromEnum();

            this.Proband = new Proband();

            this.Tasks = new ReactiveList <TvControlTaskViewModel> {
                ChangeTrackingEnabled = true
            };

            this.Reset       = ReactiveCommand.Create(ResetImplementation);
            this.Save        = ReactiveCommand.CreateFromTask(this.SaveAsync);
            this.Add         = ReactiveCommand.Create(this.AddImpl);
            this.StartStop   = ReactiveCommand.Create(this.StartStopImpl);
            this.SetFinished = ReactiveCommand.Create <bool, Unit>(this.SetFinishedImpl, this.WhenAnyValue(model => model.CurrentTask).Select(model => model != null));

            this.InitAsync();
        }
示例#10
0
 public AssignUserToTaskHandler(ITasksService taskService, ITokenAuthenticationService authService,
                                IMapper mapper)
 {
     _taskService = taskService;
     _authService = authService;
     _mapper      = mapper;
 }
示例#11
0
 public TaskController
     (ITasksService taskSrv,
     IClaimsHelper helper)
 {
     _taskSrv = taskSrv;
     _helper  = helper;
 }
示例#12
0
 public GetSingleTaskForTeamHandler(ITasksService taskService, ITokenAuthenticationService authService,
                                    IMapper mapper)
 {
     _taskService = taskService;
     _authService = authService;
     _mapper      = mapper;
 }
示例#13
0
 public TasksController(ITasksService tasksService, ITeachersService teachersService, IStudentsService studentsService, ILogger <AssignmentsController> logger)
 {
     _tasksService    = tasksService;
     _teachersService = teachersService;
     _studentsService = studentsService;
     _logger          = logger;
 }
示例#14
0
        public ActionsController(UmbracoContext umbracoContext) : base(umbracoContext)
        {
            _instancesService = new InstancesService();
            _tasksService     = new TasksService();

            _utility = new Utility();
        }
示例#15
0
 public GroupsService(IGroupsRepository groupsRepository, IUserRepository userRepository, IAppConfigurationProvider configurationProvider, ITasksService tasksService)
 {
     _groupsRepository = groupsRepository;
     _userRepository = userRepository;
     _tasksService = tasksService;
     _configurationProvider = configurationProvider;
 }
示例#16
0
        public MemberViewModel(
            [Import(typeof(IAuthorizationService))] IAuthorizationService authorizator,
            [Import(typeof(IBackgroundExecutor))] IBackgroundExecutor executor,
            [Import(typeof(IEventAggregator))] IEventAggregator aggregator,
            [Import] IDialogService dialogs,
            [Import(typeof(ITasksService))] ITasksService taskService,
            [Import(typeof(ITeamService))] ITeamService teamService)
        {
            this.taskService = taskService;
            this.authorizator = authorizator;
            this.executor = executor;
            this.aggregator = aggregator;
            this.teamService = teamService;
            this.dialogs = dialogs;

            aggregator.Subscribe(ScrumFactoryEvent.ShowProfile, Show);
            aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);

            ChangeAvatarCommand = new DelegateCommand(ChangeMemberImage);
            RemoveAvatarCommand = new DelegateCommand(RemoveMemberImage);
            CloseWindowCommand = new DelegateCommand(Close);
            CreateAvatarCommand = new DelegateCommand(CreateAvatar);

            UpdateAvatarCommand = new DelegateCommand(() => {
                executor.StartBackgroundTask(
                () => {
                    teamService.UpdateMember(authorizator.SignedMemberProfile.MemberUId, MemberProfile);
                }, () => {
                    myProfileNocache = new Random().Next().ToString();
                    DefineMemberAvatarUrl();
                });
            });
        }
示例#17
0
        public ActionsController()
        {
            _instancesService = new InstancesService();
            _tasksService     = new TasksService();

            _utility = new Utility();
        }
示例#18
0
 public TasksController(ITasksService tasksService, INotificationService notificationService,
                        IHubContext <NotificationHub> hubContext)
 {
     this.tasksService        = tasksService;
     this.notificationService = notificationService;
     _hubContext = hubContext;
 }
 public TasksController(ITasksService taskService, IWebHostEnvironment host, ILogger <TasksController> logger, IMembersService memService)
 {
     _logger      = logger;
     _host        = host;
     _taskService = taskService;
     _memService  = memService;
 }
        public UserTasksSelectorViewModel(
            [Import]IBackgroundExecutor executor,
            [Import]IEventAggregator aggregator,
            [Import]ITasksService tasksService,
            [Import] IDialogService dialogs,
            [Import]IAuthorizationService authorizator)
        {
            this.executor = executor;
                this.aggregator = aggregator;
                this.tasksService = tasksService;
                this.dialogs = dialogs;

                this.authorizator = authorizator;

                tasksViewSource = new System.Windows.Data.CollectionViewSource();
                notMineTasksViewSource = new System.Windows.Data.CollectionViewSource();

                TrackingTaskInfo = null;

                aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, m => { OnPropertyChanged("SignedMemberUId"); });

                aggregator.Subscribe(ScrumFactoryEvent.ApplicationWhentForeground, () => { LoadTasks(true); });

                aggregator.Subscribe(ScrumFactoryEvent.ShowUserTasksSelector, Show);

                aggregator.Subscribe<Task>(ScrumFactoryEvent.TaskAssigneeChanged, OnTaskChanged);
                aggregator.Subscribe<Task>(ScrumFactoryEvent.TaskChanged, OnTaskChanged);

                ShowTaskDetailCommand = new DelegateCommand<TaskViewModel>(ShowTaskDetail);

                TrackTaskCommand = new DelegateCommand<TaskViewModel>(TrackTask);

               timeKeeper.Tick += new EventHandler(timeKeeper_Tick);
        }
示例#21
0
        public ActionsController(UmbracoContext umbracoContext) : base(umbracoContext)
        {
            _instancesService = new InstancesService();
            _tasksService     = new TasksService();

            _utility    = new Utility();
            _hubContext = GlobalHost.ConnectionManager.GetHubContext <PlumberHub>();
        }
示例#22
0
        public Emailer()
        {
            _settingsService = new SettingsService();
            _tasksService    = new TasksService();
            _groupService    = new GroupService();

            _utility = new Utility();
        }
示例#23
0
        public Notifications()
        {
            _settingsService = new SettingsService();
            _tasksService    = new TasksService();
            _groupService    = new GroupService();

            _utility = new Utility();
        }
 public SubmissionController(ISubmissionsService subService, IMembersService memService, ITasksService taskService, IWebHostEnvironment host, ILogger <SubmissionController> logger)
 {
     _logger      = logger;
     _host        = host;
     _subService  = subService;
     _taskService = taskService;
     _memService  = memService;
 }
示例#25
0
 public TasksController()
 {
     _tasksService     = new TasksService();
     _settingsService  = new SettingsService();
     _configService    = new ConfigService();
     _instancesService = new InstancesService();
     _groupService     = new GroupService();
 }
示例#26
0
        public ActionsController(IInstancesService instancesService, ITasksService tasksService)
        {
            _instancesService = instancesService;
            _tasksService     = tasksService;

            _utility    = new Utility();
            _hubContext = GlobalHost.ConnectionManager.GetHubContext <PlumberHub>();
        }
示例#27
0
 public SignalsService(ILoggingService loggingService, IHealthCheckService healthCheckService, ITasksService tasksService, ITradingService tradingService, IRulesService rulesService)
 {
     this.loggingService     = loggingService;
     this.healthCheckService = healthCheckService;
     this.tasksService       = tasksService;
     this.tradingService     = tradingService;
     this.rulesService       = rulesService;
 }
示例#28
0
 public MyWeddingController(UserManager <ApplicationUser> userManager, IWeddingService weddingService, IGuestsService guestsService, IExpensesService expensesService, ITasksService tasksService)
 {
     this.userManager     = userManager;
     this.weddingService  = weddingService;
     this.guestsService   = guestsService;
     this.tasksService    = tasksService;
     this.expensesService = expensesService;
 }
示例#29
0
 public ReopenTaskHandler(ITasksService taskService, ITokenAuthenticationService authService,
                          IMapper mapper, IEmailService emailService)
 {
     _taskService  = taskService;
     _authService  = authService;
     _mapper       = mapper;
     _emailService = emailService;
 }
示例#30
0
 public GetAllLogsForTaskHandler(ILogService logService, ITasksService tasksService,
                                 ITokenAuthenticationService authService, IMapper mapper)
 {
     _logService   = logService;
     _tasksService = tasksService;
     _authService  = authService;
     _mapper       = mapper;
 }
示例#31
0
 public DenyTaskCompletionHandler(ITasksService taskService, ITokenAuthenticationService authService,
                                  IMapper mapper, IEmailService emailService)
 {
     _taskService  = taskService;
     _authService  = authService;
     _mapper       = mapper;
     _emailService = emailService;
 }
示例#32
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="taskItemService"></param>
        /// <param name="tasksService"></param>
        /// <param name="addTaskService"></param>


        public TaskServiceProvider(ITaskItemService taskItemService,
                                   ITasksService tasksService,
                                   IAddTaskService addTaskService)
        {
            this.TaskItemService = taskItemService;
            this.TasksService    = tasksService;
            this.AddTaskService  = addTaskService;
        }
 public TasksController(
     ILogger <TasksController> logger,
     IOptions <AppOptions> appOptions,
     ITasksService tasksService) : base(logger, appOptions)
 {
     Guard.Against.Null(tasksService, nameof(tasksService));
     _tasksService = tasksService;
 }
示例#34
0
        /// <summary>
        /// Constructor for lifeless viewmodels.
        /// </summary>
        /// <param name="executor"></param>
        /// <param name="tasksService"></param>
        /// <param name="aggregator"></param>
        /// <param name="authorizationService"></param>
        /// <param name="task"></param>
        public TaskViewModel(
            IBackgroundExecutor executor,
            ITasksService tasksService,
            IEventAggregator aggregator,
            IDialogService dialogs,
            IAuthorizationService authorizationService,
            Task task,
            UserTasksSelectorViewModel selector)
        {
            if(task!=null)
                Task = task;

            this.executor = executor;
            this.tasksService = tasksService;
            this.aggregator = aggregator;
            this.authorizator = authorizationService;
            this.selectorViewModel = selector;
            this.dialogs = dialogs;

            aggregator.Subscribe<ICollection<MemberProfile>>(ScrumFactoryEvent.ProjectMembersChanged, OnMembersChanged);
            aggregator.Subscribe<string>(ScrumFactoryEvent.TaskTrackChanged, OnTaskTrackChanged);

            aggregator.Subscribe(ScrumFactoryEvent.ApplicationWhentBackground, OnApplicationWhentBackground);

            aggregator.Subscribe<bool>(ScrumFactoryEvent.TaskReplanItemChanged, r => { ReplanItemWhenChanged = r; });

            MoveTaskToCommand = new DelegateCommand<short>(MoveTaskTo);
            MoveTaskLeftCommand = new DelegateCommand(CanMoveTaskLeft, MoveTaskLeft);
            MoveTaskRightCommand = new DelegateCommand(CanMoveTaskRight, MoveTaskRight);
            CancelTaskCommand = new DelegateCommand(CanCancelTask, CancelTask);
            FinishTaskCommand = new DelegateCommand(CanFinishTask, FinishTask);

            AssignTaskToMeCommand = new DelegateCommand(AssignTaskToMe);

            CopyTaskTrackIdCommand = new DelegateCommand(CopyTaskTrackId);

            ShowDetailCommand = new DelegateCommand(Show);

            ShowFinishDialogCommand = new DelegateCommand(ShowFinishDialog);

            ChangeTaskNameCommand = new DelegateCommand(ChangeTaskName);

            ChangePlannedHoursCommand = new DelegateCommand(ChangePlannedHours);
            ChangeEffectiveHoursCommand = new DelegateCommand(ChangeEffectiveHours);

            ChangeTaskAssigneeCommand = new DelegateCommand(ChangeTaskAssigneeUId);

            ChangeTaskItemCommand = new DelegateCommand<string>(ChangeTaskItem);

            ShowRepositoryLogCommand = new DelegateCommand(ShowRepositoryLog);

            TrackTaskCommand = new DelegateCommand(TrackTask);

            ResetTaskAssigneeCommand = new DelegateCommand(ResetTaskAssignee);
        }
示例#35
0
 public ClassWrapper(IUsersService usersService, IProjectsService projectsService, ITasksService tasksService, IRolesService rolesService, 
     ICategoriesService categoriesService, IStatusesService statusesService, IPrioritiesService prioritiesService, ITypesService typesService,
     ISlotsService slotsService)
 {
     _usersService = usersService;
     _projectsService = projectsService;
     _tasksService = tasksService;
     _rolesService = rolesService;
     _categoriesService = categoriesService;
     _statusesService = statusesService;
     _prioritiesService = prioritiesService;
     _typesService = typesService;
     _slotsService = slotsService;
 }
        public ProjectTeamViewModel(
            [Import]IEventAggregator eventAggregator,
            [Import]IProjectsService projectsServices,
            [Import]ITeamService teamServices,
            [Import]ITasksService taskServices,
            [Import]IBackgroundExecutor backgroundExecutor,
            [Import] IDialogService dialogs,
            [Import]IAuthorizationService authorizationService)
        {
            this.taskServices = taskServices;
            this.aggregator = eventAggregator;
            this.projectsServices = projectsServices;
            this.teamServices = teamServices;
            this.executor = backgroundExecutor;
            this.authorizator = authorizationService;
            this.dialogs = dialogs;

            ShowRolesListCommand = new DelegateCommand(CanShowRoleList, ShowRolesList);
            AddNewMemberCommand = new DelegateCommand(CanAddNewMember, AddNewMember);

            RemoveMemberCommand = new DelegateCommand<ProjectMembershipViewModel>(CanRemoveMember, RemoveMember);

            ShowJoinDialogCommand = new DelegateCommand(CanJoinProject, ShowJoinDialog);

            ShowContactListCommand = new DelegateCommand(ShowContactList);

            SelectNewRoleCommand = new DelegateCommand<Role>(SelectNewRole);

            membershipViewSource = new System.Windows.Data.CollectionViewSource();
            membershipViewSource.SortDescriptions.Add(new SortDescription("SortPriority", ListSortDirection.Ascending));
            membershipViewSource.SortDescriptions.Add(new SortDescription("ProjectMembership.Role.RoleName", ListSortDirection.Ascending));
            membershipViewSource.SortDescriptions.Add(new SortDescription("Member.FullName", ListSortDirection.Ascending));

            membershipViewSource.Filter += new System.Windows.Data.FilterEventHandler(membershipViewSource_Filter);

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, OnViewProjectDetails);

            aggregator.Subscribe<ICollection<Role>>(ScrumFactoryEvent.ProjectRolesChanged, roles => { OnPropertyChanged("Roles"); });
            aggregator.Subscribe<Role>(ScrumFactoryEvent.ProjectRoleChanged, role => { membershipViewSource.View.Refresh(); });

            aggregator.Subscribe(ScrumFactoryEvent.ShowProjectTeam, () => { aggregator.Publish<IProjectTabViewModel>(ScrumFactoryEvent.ShowProjectTab, this); });

            // need thi when membership is removed from the project module
            aggregator.Subscribe<ProjectMembership>(ScrumFactoryEvent.ProjectMembershipRemoved, AfterRemoveMember);

            MemberCustomFilter = MemberFilter;

            RefreshMemberFilter = LoadMembers;
        }
示例#37
0
 public ClassWrapper()
 {
     _usersService = new UsersService();
     _projectsService = new ProjectsService();
     _tasksService = new TasksService();
     _membershipsService = new MembershipsService();
     _userMembershipsService = new UserMembershipsService();
     _rolesService = new RolesService();
     _usersRolesService = new UsersRolesService();
     _categoriesService = new CategoriesService();
     _statusesService = new StatusesService();
     _prioritiesService = new PrioritiesService();
     _typesService = new TypesService();
     _slotsService = new SlotsService();
 }
        public FinishTaskDialogViewModel(
            [Import]IBackgroundExecutor executor,
            [Import]IEventAggregator aggregator,
            [Import]ITasksService tasksService,
            [Import]IDialogService dialogs)
        {
            this.executor = executor;
            this.aggregator = aggregator;
            this.tasksService = tasksService;
            this.dialogs = dialogs;

            aggregator.Subscribe<Task>(ScrumFactoryEvent.ShowFinishTaskDialog, Show);

            AddingHours = 0.0M;

            FinishTaskCommand = new DelegateCommand(FinishTask);
            CancelCommand = new DelegateCommand(() => { dialog.Close(); });
            CopyTaskTrackIdCommand = new DelegateCommand(CopyTaskTrackId);
        }
示例#39
0
        public MemberDetailBase(
            IEventAggregator aggregator,
            ITasksService tasksService,
            IProjectsService projectsService,
            ITeamService teamService,
            IBackgroundExecutor executor,
            IAuthorizationService authorizator)
        {
            this.aggregator = aggregator;
                this.executor = executor;
                this.authorizator = authorizator;
                this.tasksService = tasksService;
                this.teamService = teamService;
                this.projectsService = projectsService;

                ShowTaskDetailCommand = new DelegateCommand<Task>(ShowTaskDetail);
                ShowProjectDetailCommand = new DelegateCommand<string>(ShowProjectDetail);
                CloseTaskCommand = new DelegateCommand<Task>(CloseTask);

                TrackTaskCommand = new DelegateCommand<Task>(TrackTask);
        }
 public TasksController(ITasksService tasksService)
 {
     _tasksService = tasksService;
 }
示例#41
0
 public TasksController(ITasksService tasksService, IGroupsService groupsService)
 {
     _tasksService = tasksService;
     _groupsService = groupsService;
 }
示例#42
0
 public TodoController(ITasksService tasksService, ITaskMapper taskMapper)
 {
     _tasksService = tasksService;
     _taskMapper = taskMapper;
 }
示例#43
0
 public DefaultPagePresenter(ITasksService tasksService, IEmployeService employeService)
 {
     _tasksService = tasksService;
     _employeService = employeService;
 }
示例#44
0
 public GroupsController(IGroupsService groupsService, ITasksService tasksService)
 {
     _groupsService = groupsService;
     _tasksService = tasksService;
 }
        public ProjectSummaryViewModel(
            [Import] IEventAggregator aggregator,
            [Import] IBackgroundExecutor executor,
            [Import] IProjectsService projectsService,
            [Import] IProposalsService proposalsService,
            [Import] ITasksService tasksService,
            [Import] IBacklogService backlogService,
            [Import] IDialogService dialogService,
            [Import] IAuthorizationService autorizatorService)
        {
            this.aggregator = aggregator;
                this.executor = executor;
                this.projectsService = projectsService;
                this.proposalsService = proposalsService;
                this.tasksService = tasksService;
                this.backlogService = backlogService;
                this.dialogService = dialogService;
                this.autorizator = autorizatorService;

                aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, OnViewProjectDetails, 100);
                aggregator.Subscribe<Project>(ScrumFactoryEvent.ProjectCreated, OnProjectCreation);
                aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);

                aggregator.Subscribe<string>(ScrumFactoryEvent.ShowCodeRepositoryLog, ShowProjectRepositoryLog);
                aggregator.Subscribe<string>(ScrumFactoryEvent.ShowCodeRepository, p => {
                    if (String.IsNullOrEmpty(p))
                        p = Project.CodeRepositoryPath;
                    OpenPath(p);
                });

                aggregator.Subscribe<string>(ScrumFactoryEvent.ShowDocRepository, p => {
                    if (String.IsNullOrEmpty(p))
                        p = Project.DocRepositoryPath;
                    OpenPath(p);
                });

                aggregator.Subscribe<ICollection<MemberProfile>>(ScrumFactoryEvent.ProjectMembersChanged, m => {
                    OnMembersLoaded(m);
                    ((DelegateCommand)SendMailCommand).NotifyCanExecuteChanged();
                });

                StartProjectCommand = new DelegateCommand(CanStartProject, StartProject);
                CloseProjectCommand = new DelegateCommand(CanCloseProject, CloseProject);
                EditProjectCommand = new DelegateCommand(CanEditProject, EditProject);

                ShowRepositoryCommand = new DelegateCommand<string>(OpenPath);

                ShowReportCommand = new DelegateCommand<string>(ShowReport);

                ShowProjectTeamCommand = new DelegateCommand(()=> { this.aggregator.Publish(ScrumFactoryEvent.ShowProjectTeam); });

                ChangeUserEngageCommand = new DelegateCommand<ProjectMembership>(ChangeUserEngage);

                RemoveUserEngageCommand = new DelegateCommand<ProjectMembership>(RemoveUserEngage);

                SendMailCommand = new DelegateCommand(CanSendMail, SendMail);

                JoinProjectCommand = new DelegateCommand(ShowJoinDialog);

                CreateCodeRepCommand = new DelegateCommand<ICodeRepositoryService>(CreateCodeRep);
        }
 public HomeController(ITasksService tasksService)
 {
     _tasksService = tasksService;
 }
        public TasksListViewModel(
            [Import] ITasksService tasksService,
            [Import] IBacklogService backlogService,
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator,
            [Import] IDialogService dialogService,
            [Import] IAuthorizationService authorizationService)
        {
            this.tasksService = tasksService;
                this.backlogService = backlogService;
                this.executor = backgroundExecutor;
                this.aggregator = eventAggregator;
                this.dialogs = dialogService;
                this.authorizator = authorizationService;

            tasksViewSource = new System.Windows.Data.CollectionViewSource();

            tasksViewSource.SortDescriptions.Add(new SortDescription("Task.Priority", ListSortDirection.Descending));
            tasksViewSource.SortDescriptions.Add(new SortDescription("Task.TaskType", ListSortDirection.Descending));
            tasksViewSource.SortDescriptions.Add(new SortDescription("Task.TaskNumber", ListSortDirection.Descending));

            tasksViewSource.Filter += new System.Windows.Data.FilterEventHandler(tasksViewSource_Filter);
            delayFilter = new DelayAction(500, new DelayAction.ActionDelegate(Refresh));

            backlogViewSource = new System.Windows.Data.CollectionViewSource();
            backlogViewSource.SortDescriptions.Add(new SortDescription("SprintNumber", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("OccurrenceConstraint", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("BusinessPriority", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("BacklogItemNumber", ListSortDirection.Ascending));

            clockUpdate = new DelayAction(1000, new DelayAction.ActionDelegate(UpdateClock), false);

            player = new System.Media.SoundPlayer();
            player.Stream = Properties.Resources.whistles;
            player.Load();

            ListMode = ListModes.POST_IT_MODE;

            NewTaskType = (short)TaskTypes.DEVELOPMENT_TASK;

            OnLoadCommand = new DelegateCommand(() => { if (NeedRefresh) LoadData(); });

            ShowDetailWindowCommand = new DelegateCommand<TaskViewModel>(ShowDetail);

            CreateTaskCommand = new DelegateCommand(CanCreateTask, CreateTask);
            CreateEmptyTaskCommand = new DelegateCommand(CanCreateEmptyTask, CreateTask);

            ChangeListModeCommand = new DelegateCommand(ChangeListMode);

            MoveTaskCommand = new DelegateCommand<Windows.Helpers.DragDrop.DropCommandParameter>(MoveTask);

            ChangeTaskItemCommand = new DelegateCommand<Windows.Helpers.DragDrop.DropCommandParameter>(ChangeTaskItem);

            ShowJoinDialogCommand = new DelegateCommand(CanJoinProject, ShowJoinDialog);

            StartStopClockCommand = new DelegateCommand(StartStopClock);

            SetNewTaskTypeCommand = new DelegateCommand<Int16>(t => { NewTaskType = t; });

            CopyTasksCommand = new DelegateCommand(CopyTasksToClipboard);
            PasteTasksCommand = new DelegateCommand(PasteTasks);
            SelectAllTasksCommand = new DelegateCommand(SelectAllTasks);

            CloseItemCommand = new DelegateCommand<BacklogItem>(CloseItem);

            AddNewTagCommand = new DelegateCommand(CanAddTags, AddNewTag);
            RemoveTagCommand = new DelegateCommand<TaskTag>(CanAddTags, RemoveTag);
            UpdateTagCommand = new DelegateCommand<TaskTag>(CanAddTags, UpdateTag);

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, p => {
                Project = p;
                StopClock();
                OnPropertyChanged("CurrentSprintLabel");
            });

            aggregator.Subscribe<ICollection<MemberProfile>>(ScrumFactoryEvent.ProjectMembersChanged, OnMembersChanged);

            aggregator.Subscribe<ICollection<Role>>(ScrumFactoryEvent.ProjectRolesChanged, OnRolesChanged);
            aggregator.Subscribe<Task>(ScrumFactoryEvent.TaskChanged, OnTaskChanged);

            aggregator.Subscribe(ScrumFactoryEvent.ApplicationWhentForeground, OnAppForeground);

            aggregator.Subscribe<BacklogItem>(ScrumFactoryEvent.ShowTasksForItem, ShowTasksForItem);

            aggregator.Subscribe<BacklogItem[]>(ScrumFactoryEvent.BacklogItemsChanged, UpdateChangedItems);
            aggregator.Subscribe(ScrumFactoryEvent.SprintsShifted, AskForRefresh);

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ProjectStatusChanged, SetReplanItemWhenChanged);

            aggregator.Subscribe<Task>(ScrumFactoryEvent.TaskSelectedChanged, OnTaskSelectedChanged);
        }
示例#48
0
 public TasksController(ITasksService service)
 {
     _service = service;
 }
示例#49
0
        public BacklogViewModel(
            [Import] IBacklogService backlogService,
            [Import] ITasksService tasksService,
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator,
            [Import] IDialogService dialogService,
            [Import] IAuthorizationService authorizationService)
        {
            this.backlogService = backlogService;
            this.tasksService = tasksService;
            this.executor = backgroundExecutor;
            this.aggregator = eventAggregator;
            this.dialogs = dialogService;
            this.authorizator = authorizationService;

            aggregator.Subscribe<string>(ScrumFactoryEvent.ConfigChanged, OnConfigChanged);

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, OnViewProjectDetails, 10);

            aggregator.Subscribe <ICollection<Role>>(ScrumFactoryEvent.ProjectRolesChanged, SyncPlannedHours);

            aggregator.Subscribe<Sprint>(ScrumFactoryEvent.SprintAdded, s => { AskForRefresh(); });
            aggregator.Subscribe<ICollection<Sprint>>(ScrumFactoryEvent.SprintsDateChanged, s => { AskForRefresh(); });
            aggregator.Subscribe(ScrumFactoryEvent.SprintsShifted, AskForRefresh);

            aggregator.Subscribe(ScrumFactoryEvent.BacklogReplannedByTask, AskForRefresh);

            aggregator.Subscribe<BacklogItem[]>(ScrumFactoryEvent.BacklogItemsChanged, UpdateChangedItems);

            aggregator.Subscribe<BacklogItem>(ScrumFactoryEvent.ShowItemDetail, ShowDetailWindow);

            aggregator.Subscribe<BacklogItem>(ScrumFactoryEvent.BacklogItemSelectedChanged, OnItemsSelectedChanged);

            LoadDataCommand = new DelegateCommand(() => { if (NeedRefresh) LoadData(); });
            ShowDetailWindowCommand = new DelegateCommand<BacklogItemViewModel>(ShowDetailWindow);
            CreateNewBacklogItemCommand = new DelegateCommand(CreateNewBacklogItem);

            DeleteBacklogItemCommand = new DelegateCommand<BacklogItemViewModel>(CanRemoveBacklogItem, RemoveBacklogItem);

            EditItemSizesCommand = new DelegateCommand(CanEditItemSizes, EditItemSizes);
            PlanAllLateItemsCommand = new DelegateCommand(CanPlanAllLateItems, PlanAllLateItems);

            MoveItemToCommand = new DelegateCommand<Windows.Helpers.DragDrop.DropCommandParameter>(MoveItemTo);

            CopyItemsCommand = new DelegateCommand(CopyItemsToClipboard);
            PasteItemsCommand = new DelegateCommand(PasteItems);
            SelectAllItemsCommand = new DelegateCommand(SelectAllItems);

            FilterByMonthCommand = new DelegateCommand<DateTime>(FilterByMonth);

            backlogViewSource = new System.Windows.Data.CollectionViewSource();
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.SprintNumber", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.OccurrenceConstraint", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.BusinessPriority", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.BacklogItemNumber", ListSortDirection.Ascending));

            backlogViewSource.Filter += new System.Windows.Data.FilterEventHandler(backlogViewSource_Filter);
            delayFilter = new DelayAction(800, new DelayAction.ActionDelegate(() => { FilteredBacklog.Refresh(); }));

            // just to show group list at screens with 1024 or more pixels width
            OnPropertyChanged("ShowGroupList");
        }