コード例 #1
0
 public ProjectsController(IProjectsService projects, IUsersService users, IImagesService images, IPublisher publisher)
 {
     this.projects = projects;
     this.users = users;
     this.images = images;
     this.publisher = publisher;
 }
コード例 #2
0
        public BurndownViewModel(
            [Import] IBacklogService backlogService,
            [Import] IProjectsService projectsService,
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator,
            [Import] IAuthorizationService authorizator)
        {
            this.backlogService = backlogService;
            this.projectsService = projectsService;
            this.executor = backgroundExecutor;
            this.aggregator = eventAggregator;
            this.authorizator = authorizator;

            NeedRefresh = false;

            OnLoadCommand = new DelegateCommand(() => {if (NeedRefresh) LoadData();});
            SetBaselineCommand = new DelegateCommand(_CanChangeBaseline, SetBaseline);

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, p=> {
                Project = p;
                SetPlannings();
                AskForRefresh();
            });

            aggregator.Subscribe<Project>(ScrumFactoryEvent.BurndownShouldRefresh, AskForRefresh);
            aggregator.Subscribe<ICollection<Sprint>>(ScrumFactoryEvent.SprintsDateChanged, o => { AskForRefresh(); });
            aggregator.Subscribe<BacklogItem[]>(ScrumFactoryEvent.BacklogItemsChanged, b => { AskForRefresh(); });
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProjectsController" /> class.
        /// </summary>
        /// <param name="configurationService">The configuration service.</param>
        /// <param name="projectsService">The projects service.</param>
        /// <param name="nugetService">The nuget service.</param>
        /// <param name="visualStudioService">The visual studio service.</param>
        /// <param name="readMeService">The read me service.</param>
        /// <param name="settingsService">The settings service.</param>
        /// <param name="messageBoxService">The message box service.</param>
        /// <param name="mockingServiceFactory">The mocking service factory.</param>
        /// <param name="resolverService">The resolver service.</param>
        /// <param name="viewModelViewsService">The view model views service.</param>
        /// <param name="viewModelAndViewsFactory">The view model and views factory.</param>
        public ProjectsController(
            IConfigurationService configurationService,
            IProjectsService projectsService,
            INugetService nugetService,
            IVisualStudioService visualStudioService,
            IReadMeService readMeService,
            ISettingsService settingsService,
            IMessageBoxService messageBoxService,
            IMockingServiceFactory mockingServiceFactory,
            IResolverService resolverService,
            IViewModelViewsService viewModelViewsService,
            IViewModelAndViewsFactory viewModelAndViewsFactory)
            : base(configurationService,
            visualStudioService,
            readMeService,
            settingsService,
            messageBoxService,
            resolverService)
        {
            TraceService.WriteLine("ProjectsController::Constructor");

            this.projectsService = projectsService;
            this.nugetService = nugetService;
            this.viewModelViewsService = viewModelViewsService;
            this.viewModelAndViewsFactory = viewModelAndViewsFactory;
            this.mockingService = mockingServiceFactory.GetMockingService();
        }
        // MembershipProvider Methods
        public override void Initialize(string name, NameValueCollection config)
        {
            // Verify that config isn't null
            if (config == null)
                throw new ArgumentNullException("config");

            // Assign the provider a default name if it doesn't have one
            if (String.IsNullOrEmpty(name))
                name = "AtlassianMembershipProvider";

            // Add a default "description" attribute to config if the
            // attribute doesn't exist or is empty
            if (string.IsNullOrEmpty(config["description"]))
            {
                config.Remove("description");
                config.Add("description", "Atlassian web service membership provider");
            }

            // Call the base class's Initialize method
            base.Initialize(name, config);

            using (IUnityContainer container = new UnityContainer()
                .LoadConfiguration())
            {
                service = container.Resolve<IProjectsService>();
            }

            // Throw an exception if unrecognized attributes remain
            if (config.Count > 0)
            {
                string attr = config.GetKey(0);
                if (!String.IsNullOrEmpty(attr))
                    throw new ProviderException("Unrecognized attribute: " + attr);
            }
        }
コード例 #5
0
ファイル: UserController.cs プロジェクト: NickAndersonX/xodb
 public UserController(
     IOrchardServices services, 
     IBlockModelService blockModelService, 
     IAssayService assayService,
     IGeophysicsService geophysicsService,
     IProjectsService projectService, 
     IParametersService parameterService,
     IUsersService userService,
     IPrivateDataService privateService,
     IWorkflowService workflowService
     ) {
     
     Services = services;
     UserService = userService;
     BlockModelService = blockModelService;
     AssayService = assayService;
     GeophysicsService = geophysicsService;
     ParameterService = parameterService;
     ProjectService = projectService;
     PrivateService = privateService;
     WorkflowService = workflowService;
     T = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
     
 }
コード例 #6
0
 public ProjectMembershipViewModel(
     IBackgroundExecutor executor,
     IProjectsService projectsService,
     IAuthorizationService authorizatorService,
     ProjectMembership membership,
     MemberProfile member)
 {
     Init(executor, projectsService, authorizatorService, membership, member);
 }
        public void Init()
        {
            this.userRepo = TestObjectFactory.GetUsersRepository();
            this.projectsRepo = TestObjectFactory.GetProjectsRepository();

            this.projectsService = new ProjectsService(
                projectsRepo,
                this.userRepo);
        }
コード例 #8
0
 public ModelCheckerBackgroundTask(IOrchardServices services, IBlockModelService modelService, IClock clock, ICacheManager cache, ISignals signals, IProjectsService projects)
 {
     _signals = signals;
     _cache = cache;
     _projectService = projects;
     Services = services;
     _modelService = modelService;
     _clock = clock;
     Logger = NullLogger.Instance;
 }
コード例 #9
0
        public ProjectViewModel(
            [Import] IProjectsService projectsService,
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator)
        {
            this.projectsService = projectsService;
            this.executor = backgroundExecutor;
            this.aggregator = eventAggregator;

            CloseWindowCommand = new DelegateCommand(CloseWindow);
        }
コード例 #10
0
ファイル: XmlRpcHandler.cs プロジェクト: NickAndersonX/xodb
        public XmlRpcHandler(
            IMembershipService membershipService,
            IAuthorizationService authorizationService,
            IProjectsService projectsService,
            RouteCollection routeCollection) {
            _membershipService = membershipService;
            _authorizationService = authorizationService;
            _projectsService = projectsService;
            _routeCollection = routeCollection;

            T = NullLocalizer.Instance;
        }
コード例 #11
0
        public RiskViewModel(
            IBackgroundExecutor executor,
            IProjectsService projectsService,
            Risk risk)
        {
            this.executor = executor;
                this.projectsService = projectsService;
                Risk = risk;

                ChangeRiskImpactCommand = new DelegateCommand(ChangeRiskImpact);
                ChangeRiskProbabilityCommand = new DelegateCommand(ChangeRiskProbability);
        }
コード例 #12
0
        public void PreTestInitialize()
        {
            Username = ConfigurationManager.AppSettings["TestJiraUsername"];
            Password = ConfigurationManager.AppSettings["TestJiraPassword"];

            using (IUnityContainer container = new UnityContainer()
                .LoadConfiguration())
            {
                _service = container.Resolve<IProjectsService>();
            }

            _token = _service.Login(Username, Password);
        }
コード例 #13
0
        public RiskViewModel(
            [Import] IBackgroundExecutor executor,
            [Import] IEventAggregator aggregator,
            [Import] IDialogService dialogs,
            [Import] IProjectsService projectsService)
        {
            this.executor = executor;
            this.aggregator = aggregator;
            this.projectsService = projectsService;
            this.dialogs = dialogs;

            CloseWindowCommand = new DelegateCommand(CloseWindow);
        }
コード例 #14
0
ファイル: ClassWrapper.cs プロジェクト: reaperdk/timetracker
 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;
 }
コード例 #15
0
        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;
        }
コード例 #16
0
ファイル: ClassWrapper.cs プロジェクト: reaperdk/timetracker
 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();
 }
コード例 #17
0
        public PendingMembershipsListViewModel(
            [Import]IEventAggregator eventAggregator,
            [Import]IProjectsService projectServices,
            [Import]IBackgroundExecutor backgroundExecutor,
            [Import]IAuthorizationService authorizationService)
        {
            this.aggregator = eventAggregator;
            this.projectServices = projectServices;
            this.executor = backgroundExecutor;

            RefuseCommand = new DelegateCommand<ProjectMembership>(Refuse);
            EngageCommand = new DelegateCommand<ProjectMembership>(Engage);

            aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);
        }
コード例 #18
0
        public CreateRepositoryViewModel(
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator,
            [Import] IDialogService dialogsService,
            [Import] IProjectsService projectService)
        {
            this.aggregator = eventAggregator;
                this.executor = backgroundExecutor;
                this.dialogs = dialogsService;
                this.projectService = projectService;

                SetCodeRepCommand = new DelegateCommand<string>(SetCodeRep);
                OpenCodeRepCommand = new DelegateCommand<string>(OpenCodeRep);
                SaveCommand = new DelegateCommand(Save);
                OnLoadCommand = new DelegateCommand(OnLoad);
        }
コード例 #19
0
        public RolesListViewModel(
            [Import]IEventAggregator eventAggregator,
            [Import]IProjectsService projectsServices,
            [Import]IDialogService dialogs,
            [Import]IBackgroundExecutor backgroundExecutor
            )
        {
            this.aggregator = eventAggregator;
            this.projectsServices = projectsServices;
            this.executor = backgroundExecutor;
            this.dialogs = dialogs;

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

            CloseWindowCommand = new DelegateCommand(CloseWindow);
            AddNewRoleCommand = new DelegateCommand(AddNewRole);
            DeleteRoleCommand = new DelegateCommand<RoleViewModel>(DeleteRole);
        }
コード例 #20
0
        public IterationPlanningViewModel(
            [Import] IBacklogService backlogService,
            [Import] IProjectsService projectsService,
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IDialogService dialogService,
            [Import] IEventAggregator eventAggregator,
            [Import] IAuthorizationService authorizator)
        {
            this.projectsService = projectsService;
            this.backlogService = backlogService;
            this.executor = backgroundExecutor;
            this.dialogs = dialogService;
            this.aggregator = eventAggregator;
            this.authorizator = authorizator;

            SprintPlans = new ObservableCollection<SprintViewModel>();

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

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, OnViewProjectDetails);
            aggregator.Subscribe<ICollection<Sprint>>(ScrumFactoryEvent.SprintsDateChanged, OnSprintsDateChanged);

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

            aggregator.Subscribe<string>(ScrumFactoryEvent.BacklogItemDeleted, OnBacklogItemDeleted);

            aggregator.Subscribe <ICollection<BacklogItemGroup>>(ScrumFactoryEvent.BacklogItemGroupsLoaded, OnBacklogItemsGroupLoaded);

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

            CreateNewSprintCommand = new DelegateCommand(CanEditSprints, CreateNewSprint);
            EqualizeSprintsCommand = new DelegateCommand(CanEditSprints, EqualizeSprints);
            RemoveSprintCommand = new DelegateCommand<SprintViewModel>(CanEditSprints, RemoveSprint);

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

            ShowDeliveryReportCommand = new DelegateCommand(ShowDeliveryReport);
            ShowSprintStackReportCommand = new DelegateCommand(ShowSprintStackReport);
            ShowFullDeliveryReportCommand = new DelegateCommand(ShowFullDeliveryReport);

            ShiftItemsCommand = new DelegateCommand<BacklogItem>(CanEditSprints, ShiftItemsAfter);

            ShowDetailCommand = new DelegateCommand<BacklogItemViewModel>(ShowDetail);
        }
コード例 #21
0
 public ProjectsController(
     IUsersService usersService,
     IVisitsService visitsService,
     IProjectsService projectsService,
     ITagsService tagsService,
     IMappingService mappingService,
     IImagesService imagesService,
     IDownloadableFilesService downloadableFilesService,
     IFileSystemService fileSystemService)
     : base(usersService)
 {
     this.visitsService = visitsService;
     this.projectsService = projectsService;
     this.tagsService = tagsService;
     this.mappingService = mappingService;
     this.imagesService = imagesService;
     this.downloadableFilesService = downloadableFilesService;
     this.fileSystemService = fileSystemService;
 }
コード例 #22
0
        public CreateProjectViewModel(
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator,
            [Import] IProjectsService projectService)
        {
            this.aggregator = eventAggregator;
                this.executor = backgroundExecutor;

                this.projectService = projectService;

                aggregator.Subscribe<string>(ScrumFactoryEvent.ConfigChanged, c => {
                    if (c == "TicketProjectsEnabled")
                        OnPropertyChanged("IsTicketProjectsEnabled");

                });

                CreateProjectCommand = new DelegateCommand(CanCreateProject, CreateProject);

                CloseWindowCommand = new DelegateCommand(() => { Close(); });
        }
コード例 #23
0
        public RisksListViewModel(
            [Import]IBackgroundExecutor executor,
            [Import]IEventAggregator eventAggregator,
            [Import]IDialogService dialogs,
            [Import]IAuthorizationService authorizator,
            [Import]IProjectsService projectsService)
        {
            this.executor = executor;
                this.dialogs = dialogs;
                this.aggregator = eventAggregator;

                this.authorizator = authorizator;
                this.projectsService = projectsService;

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

                OnLoadCommand = new DelegateCommand(() => { if (NeedRefresh) LoadRisks(); });
                AddRiskCommand = new DelegateCommand(CanAddRisk, AddRisk);
                ShowDetailCommand = new DelegateCommand<RiskViewModel>(ShowDetail);
        }
コード例 #24
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);
        }
コード例 #25
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProjectsController" /> class.
        /// </summary>
        /// <param name="projectsService">The projects service.</param>
        /// <param name="nugetService">The nuget service.</param>
        /// <param name="visualStudioService">The visual studio service.</param>
        /// <param name="readMeService">The read me service.</param>
        /// <param name="settingsService">The settings service.</param>
        /// <param name="messageBoxService">The message box service.</param>
        /// <param name="dialogService">The dialog service.</param>
        /// <param name="formsService">The forms service.</param>
        public ProjectsController(
            IProjectsService projectsService,
            INugetService nugetService,
            IVisualStudioService visualStudioService,
            IReadMeService readMeService,
            ISettingsService settingsService,
            IMessageBoxService messageBoxService,
            IDialogService dialogService,
            IFormsService formsService)
            : base(visualStudioService, 
            readMeService, 
            settingsService, 
            messageBoxService,
            dialogService,
            formsService)
        {
            TraceService.WriteLine("ProjectsController::Constructor");

            this.projectsService = projectsService;
            this.nugetService = nugetService;
        }
コード例 #26
0
        public MembersListViewModel(
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator,
            [Import] IAuthorizationService authorizator,
            [Import] IDialogService dialogService,
            [Import] ITeamService teamService,
            [Import] IProjectsService projectService)
        {
            this.aggregator = eventAggregator;
                this.executor = backgroundExecutor;
                this.authorizator = authorizator;
                this.dialogs = dialogService;

                this.teamService = teamService;
                this.projectService = projectService;

                membersViewSource = new System.Windows.Data.CollectionViewSource();
                membersViewSource.SortDescriptions.Add(new SortDescription("MemberProfile.FullName", ListSortDirection.Ascending));

                membersViewSource.Filter += new FilterEventHandler(membersViewSource_Filter);
                delayFilter = new DelayAction(500, new DelayAction.ActionDelegate(() => { if (FilteredMembers != null) FilteredMembers.Refresh(); }));

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

                aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.ShowMemberDetail,
                    member => {
                        dialogs.SelectTopMenu(this);
                        ShowDetail(member);
                    });

                OnLoadCommand = new DelegateCommand(() => { if (NeedRefresh) LoadMembers(); });
                RefreshCommand = new DelegateCommand(LoadMembers);
                ShowDetailWindowCommand = new DelegateCommand<MemberViewModel>(ShowDetail);

                AddNewMemberCommand = new DelegateCommand(CanAddMember, AddMember);

                OnlyActiveMembers = true;

                NeedRefresh = true;
        }
コード例 #27
0
        public ProposalViewModel(
            [Import]IBackgroundExecutor executor,
            [Import]IEventAggregator aggregator,
            [Import]IDialogService dialogs,
            [Import]IProposalsService proposalsService,
            [Import]IProjectsService projectsService)
        {
            this.executor = executor;
                this.aggregator = aggregator;
                this.dialogs = dialogs;
                this.proposalsService = proposalsService;
            this.projectsService = projectsService;

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

                itemsViewSource = new System.Windows.Data.CollectionViewSource();
                itemsViewSource.SortDescriptions.Add(new SortDescription("ItemGroup.DefaultGroup", ListSortDirection.Ascending));
                itemsViewSource.SortDescriptions.Add(new SortDescription("ItemGroup.GroupName", ListSortDirection.Ascending));
                itemsViewSource.SortDescriptions.Add(new SortDescription("Item.Name", ListSortDirection.Ascending));

                CloseWindowCommand = new DelegateCommand(CloseWindow);
                RefreshProposalPriceCommand = new DelegateCommand(CanEdit, RefreshProposalPrice);

                AddClauseCommand = new DelegateCommand(CanEdit, AddClause);
                DeleteClauseCommand = new DelegateCommand<ProposalClause>(CanEdit, DeleteClause);
                MoveClauseDownCommand = new DelegateCommand<ProposalClause>(CanEdit, MoveClauseDown);
                MoveClauseUpCommand = new DelegateCommand<ProposalClause>(CanEdit, MoveClauseUp);

                AddCostCommand = new DelegateCommand(CanEdit, AddFixedCost);
                DeleteCostCommand = new DelegateCommand<ProposalFixedCost>(CanEdit, DeleteCost);

                ApproveCommand = new DelegateCommand(CanEdit, Approve);
                RejectCommand = new DelegateCommand<short>(CanEdit, Reject);

                ShowProposalReportCommand = new DelegateCommand(ShowProposalReport);

                SyncProposalDatesCommand = new DelegateCommand(SyncProposalDates);
        }
コード例 #28
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SprintViewModel"/> class.
        /// </summary>
        /// <param name="sprint">The sprint.</param>
        /// <param name="backlog">The backlog.</param>
        public SprintViewModel(
            IProjectsService projectsService,
            IBackgroundExecutor backgroundExecutor,
            IEventAggregator eventAggregator,
            Sprint sprint,
            ICollection<BacklogItemViewModel> backlog,
            ScrumFactory.Composition.Configuration sfConfig,
            ICalendarService calendar)
        {
            this.projectsService = projectsService;
            this.executor = backgroundExecutor;
            this.aggregator = eventAggregator;

            this.calendar = calendar;

            SFConfig = sfConfig;

            Sprint = sprint;
            backlogViewSource = new CollectionViewSource();
            backlogViewSource.Source = backlog;
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.OccurrenceConstraint", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.BusinessPriority", ListSortDirection.Ascending));
            backlogViewSource.Filter += new FilterEventHandler(backlogViewSource_Filter);
        }
コード例 #29
0
 public ProjectsController(IProjectsService projects)
 {
     this.projects = projects;
 }
コード例 #30
0
 public void Init()
 {
     _service = new ProjectsService(new MemoryRepository());
 }
コード例 #31
0
 public ProjectController(IMapper mapper, IProjectsService projectsService)
 {
     _mapper          = mapper;
     _projectsService = projectsService;
 }
コード例 #32
0
 public ProjectsController(IProjectsService service)
 {
     _service = service;
 }
コード例 #33
0
 public ProjectsGalleryService(IRepository <GalleryProject> dbImageToProject, IRepository <FileOnFileSystem> dbFileOnFilesystem, IFilesService filesService, IProjectsService projectsService)
 {
     this.dbImageToProject   = dbImageToProject;
     this.dbFileOnFilesystem = dbFileOnFilesystem;
     this.filesService       = filesService;
     this.projectsService    = projectsService;
 }
コード例 #34
0
 public ProjectsController(IProjectsService projectsService, IMappingService mappingService)
 {
     this.projectsService = projectsService;
     this.mappingService  = mappingService;
 }
コード例 #35
0
 public ProjectsServiceFixture CreateService()
 {
     Service = new ProjectsService(ContextFactoryMock, ProjectRepository);
     return(this);
 }
コード例 #36
0
        public ProjectsView(IServiceProvider services, IProjectsService projectsService, IConfigurationService configurationService)
        {
            ViewModel = new ProjectsViewModel(services, projectsService, configurationService);

            InitializeComponent();

            this.WhenActivated(d =>
            {
                d(this.Bind(ViewModel, vm => vm.Projects, v => v.projectListBox.DataSource));

                d(ViewModel
                  .WhenAnyValue(vm => vm.ProgressBarState)
                  .Subscribe(progress =>
                {
                    progressBar.Value     = progress.Value;
                    progressBarLabel.Text = progress.Label;
                }));

                d(ViewModel
                  .WhenAnyValue(vm => vm.ProjectItems)
                  .Subscribe(x =>
                {
                    projectItemsTree.SelectedNode  = null;
                    projectItemsTree.SelectedNodes = null;

                    if (x == null)
                    {
                        projectItemsTree.Nodes.Clear();
                        return;
                    }

                    projectItemsTree.Nodes.Clear();
                    projectItemsTree.Nodes.Add(x);
                    projectItemsTree.ExpandAll();
                }));


                d(this.projectListBox.ListBox.Events()
                  .SelectedValueChanged
                  .Select(ea => (Guid?)this.projectListBox.ListBox.SelectedValue ?? Guid.Empty)
                  .Where(val => !val.Equals(ViewModel.SelectedProject))
                  .InvokeCommand(ViewModel.SelectProjectCommand));

                d(menuStrip.Events()
                  .ItemClicked
                  .Select(e => e.ClickedItem.Name)
                  .InvokeCommand(ViewModel, vm => vm.ExecuteStripMenuCommand));


                projectListBox.SelectedValue = ViewModel.SelectedProject;
            });


            projectItemsTree.MouseUp += (sender, ea) =>
            {
                if (ea.Button == MouseButtons.Right)
                {
                    contextMenu.Show(projectItemsTree);
                }
            };

            projectListBox.ListBox.MouseUp += (sender, ea) =>
            {
                if (ea.Button == MouseButtons.Right)
                {
                    var selectedIndex = projectListBox.IndexFromPoint(ea.Location);

                    if (selectedIndex != -1 && selectedIndex != 65535)
                    {
                        projectListBox.SelectedIndex = selectedIndex;
                        contextMenu.Show(projectListBox);
                    }
                }
            };

            contextMenu.Opening += ContextMenu_Opening;
        }
コード例 #37
0
 public ProjectsController(IProjectsService ProjectsService, IMapper mapper)
 {
     _projectsService = ProjectsService;
     _mapper          = mapper;
 }
コード例 #38
0
 public ModelCheckerBackgroundTask(IOrchardServices services, IBlockModelService modelService, IClock clock, ICacheManager cache, ISignals signals, IProjectsService projects)
 {
     _signals        = signals;
     _cache          = cache;
     _projectService = projects;
     Services        = services;
     _modelService   = modelService;
     _clock          = clock;
     Logger          = NullLogger.Instance;
 }