/// <summary> /// Creates the project integrators. /// </summary> /// <param name="projects">The projects.</param> /// <param name="integrationQueues">The integration queues.</param> /// <returns></returns> /// <remarks></remarks> public IProjectIntegratorList CreateProjectIntegrators(IProjectList projects, IntegrationQueueSet integrationQueues) { ProjectIntegratorList list = new ProjectIntegratorList(); foreach (IProject project in projects) { list.Add(new ProjectIntegrator(project, integrationQueues[project.QueueName])); } return list; }
public IProjectIntegratorList CreateProjectIntegrators(IProjectList projects) { ProjectIntegratorList list = new ProjectIntegratorList(); foreach (IProject project in projects) { list.Add(new ProjectIntegrator(project)); } return list; }
public IProjectIntegratorList CreateProjectIntegrators(IProjectList projects) { ProjectIntegratorList list = new ProjectIntegratorList(); foreach (IProject project in projects) { list.Add(new ProjectIntegrator(project)); } return(list); }
/// <summary> /// Creates the project integrators. /// </summary> /// <param name="projects">The projects.</param> /// <param name="integrationQueues">The integration queues.</param> /// <returns></returns> /// <remarks></remarks> public IProjectIntegratorList CreateProjectIntegrators(IProjectList projects, IntegrationQueueSet integrationQueues) { ProjectIntegratorList list = new ProjectIntegratorList(); foreach (IProject project in projects) { list.Add(new ProjectIntegrator(project, integrationQueues[project.QueueName])); } return(list); }
private void toolStripButtonAdd_Click(object sender, EventArgs e) { IProjectList list = Application.Selection as IProjectList; if (list == null) { return; } ProjectDataBase data = list.GenericType.GetConstructor(new Type[] { }).Invoke(new object[] { }) as ProjectDataBase; list.Add(data); Application_SelectionChanged(this, new Application.SelectionChangedEventArgs(null, Application.Selection)); }
private void toolStripButtonRemove_Click(object sender, EventArgs e) { IProjectList list = Application.Selection as IProjectList; if (list == null) { return; } if (dataGridView.SelectedCells?[0] == null) { return; } int index = dataGridView.SelectedCells[0].RowIndex; list.RemoveAt(index); Application_SelectionChanged(this, new Application.SelectionChangedEventArgs(null, Application.Selection)); }
public void CreateManagerGeneratesDefault() { IConfiguration configuration = mocks.Create <IConfiguration>().Object; IProjectList projectList = mocks.Create <IProjectList>().Object; IEnumerator enumerator = mocks.Create <IEnumerator>().Object; Mock.Get(enumerator).Setup(_enumerator => _enumerator.MoveNext()).Returns(false); Mock.Get(projectList).Setup(_projectList => _projectList.GetEnumerator()).Returns(enumerator); Mock.Get(configuration).Setup(_configuration => _configuration.Projects).Returns(projectList); IProjectIntegratorListFactory listFactory = mocks.Create <IProjectIntegratorListFactory>().Object; IProjectIntegratorList list = mocks.Create <IProjectIntegratorList>().Object; Mock.Get(list).SetupGet(_list => _list.Count).Returns(0); Mock.Get(listFactory).Setup(_listFactory => _listFactory.CreateProjectIntegrators(It.IsAny <IProjectList>(), It.IsAny <IntegrationQueueSet>())).Returns(list); object instance = IntegrationQueueManagerFactory.CreateManager(listFactory, configuration, null); Assert.That(instance, Is.InstanceOf <IntegrationQueueManager>()); }
public void CreateManagerGeneratesDefault() { IConfiguration configuration = mocks.DynamicMock <IConfiguration>(); IProjectList projectList = mocks.DynamicMock <IProjectList>(); IEnumerator enumerator = mocks.DynamicMock <IEnumerator>(); SetupResult.For(enumerator.MoveNext()).Return(false); SetupResult.For(projectList.GetEnumerator()).Return(enumerator); SetupResult.For(configuration.Projects).Return(projectList); IProjectIntegratorListFactory listFactory = mocks.DynamicMock <IProjectIntegratorListFactory>(); IProjectIntegratorList list = mocks.DynamicMock <IProjectIntegratorList>(); SetupResult.For(list.Count).Return(0); SetupResult.For(listFactory.CreateProjectIntegrators(null, null)).IgnoreArguments().Return(list); mocks.ReplayAll(); object instance = IntegrationQueueManagerFactory.CreateManager(listFactory, configuration, null); Assert.That(instance, Is.InstanceOf <IntegrationQueueManager>()); }
void Populate(IProjectList data) { int len = Math.Max(data.Length, content.childCount); for (int i = 0; i < len; i++) { GameObject newItem; ProjectItem item; ProjectItemDataProvider provider; bool usePooled = (i < content.childCount); newItem = usePooled ? content.GetChild(i).gameObject : Instantiate(prefab) as GameObject; if (i < data.Length) { item = data.Get(i); provider = newItem.GetComponent<ProjectItemDataProvider>(); provider.Populate(item); provider.loadImages(this); if (!usePooled) { newItem.transform.SetParent(content); } newItem.SetActive(true); } else { newItem.SetActive(false); } } }
private void toolStripButtonLower_Click(object sender, EventArgs e) { IProjectList list = Application.Selection as IProjectList; if (list == null) { return; } if (dataGridView.SelectedCells?[0] == null) { return; } int index = dataGridView.SelectedCells[0].RowIndex; if (index < 0 || index >= list.Count - 1) { return; } object obj = list[index]; list.RemoveAt(index); list.Insert(index + 1, obj); Application_SelectionChanged(this, new Application.SelectionChangedEventArgs(null, Application.Selection)); }
public HomeController(ProjectListDataAdapter adapterMyProjectList) { _adapterMyProjectList = adapterMyProjectList; }
public void receiveProjectList(IProjectList project) { Populate(project); }
public void receiveProjectList(IProjectList project ) { Debug.Log("project - " + project); }
public void SetProjectList(IProjectList ProjectList) { this.myProjectList = ProjectList; myProjectList.ProjectViewTriggle += ProjectViewListener; }
public EmployeeProjectsListViewModel(IProjectList list) { List = list; }
public ProjectsListViewModel(IProjectList list) { List = list; }
public HomeController() { _adapter = new CategoryListAdapter(); _adapterProject = new AllProjectListDataAdapter(); _adapterMyProjectList = new ProjectListDataAdapter(); }