private EVDItem BuildEVDItem(EVDType evdType) { EVDItem evdItem = new EVDItem(); evdItem.Id = (int)evdType; switch (evdType) { case EVDType.Project: evdItem.Name = "Project"; evdItem.Description = "EVD for Project"; break; case EVDType.Requirement: evdItem.Name = "Requirement"; evdItem.Description = "EVD for Requirement"; break; case EVDType.Code: evdItem.Name = "Code"; evdItem.Description = "EVD for Code"; break; case EVDType.Test: evdItem.Name = "Test"; evdItem.Description = "EVD for Test"; break; case EVDType.Deployment: evdItem.Name = "Deployment"; evdItem.Description = "EVD for Deployment"; break; case EVDType.Support: evdItem.Name = "Support"; evdItem.Description = "EVD for Support"; break; case EVDType.KeyImpactDeliverables: evdItem.Name = "Key Impact Deliverables"; evdItem.Description = "EVD for Key Impact Deliverables"; break; case EVDType.ProjectHealthMetrics: evdItem.Name = "Project Health Metrics"; evdItem.Description = "EVD for Project Health Metrics"; break; case EVDType.TrainingAndChange: evdItem.Name = "Training and Change"; evdItem.Description = "EVD for Training and Change"; break; } return(evdItem); }
private Button EvdTypeToButton(EVDType evdType) { Button matchingButton = btnCode; switch (evdType) { case EVDType.Project: matchingButton = btnProject; break; case EVDType.Code: matchingButton = btnCode; break; case EVDType.Deployment: matchingButton = btnDeployment; break; case EVDType.KeyImpactDeliverables: matchingButton = btnKID; break; case EVDType.ProjectHealthMetrics: matchingButton = btnPHM; break; case EVDType.Requirement: matchingButton = btnRequirement; break; case EVDType.Support: matchingButton = btnSupport; break; case EVDType.Test: matchingButton = btnTest; break; case EVDType.TrainingAndChange: matchingButton = btnTC; break; } return(matchingButton); }
private EVDType ButtonIdToEvdType(int buttonId) { EVDType evdType = EVDType.Code; switch (buttonId) { case Resource.Id.btnCode: evdType = EVDType.Code; break; case Resource.Id.btnDeployment: evdType = EVDType.Deployment; break; case Resource.Id.btnKID: evdType = EVDType.KeyImpactDeliverables; break; case Resource.Id.btnPHM: evdType = EVDType.ProjectHealthMetrics; break; case Resource.Id.btnProject: evdType = EVDType.Project; break; case Resource.Id.btnRequirement: evdType = EVDType.Requirement; break; case Resource.Id.btnSupport: evdType = EVDType.Support; break; case Resource.Id.btnTC: evdType = EVDType.TrainingAndChange; break; case Resource.Id.btnTest: evdType = EVDType.Test; break; } return(evdType); }
private void Btn_Click(object sender, EventArgs e) { // Check for mode change if (currentMode == UIMode.Solution) { currentMode = UIMode.EVD; selectionItemId = 0; selectedItemView = null; } // Clear all buttons ClearExistingSelection(); // Highlight the selected button EVDType selectedEvdType = ButtonIdToEvdType(((Button)sender).Id); SelectButton(EvdTypeToButton(selectedEvdType)); // Related solutions List <Solution> filteredList = solutions.FindAll(s => s.EVDCollection.Exists(evd => evd.Id == (int)selectedEvdType)); // Update the List with new set of elemets solutionListView.Adapter = new SolutionListAdapter(this, filteredList); }