public TestDetailInfo(ManagerCollecter manages, Test test, Project project) { _manages = manages; _test = test; InitializeComponent(); _testNameLabel.Text = "測試名稱: " + _test.TestName; _testDescriptionLabel.Text = "測試描述: " + _test.TestDescription; List <Requirement> requirement = _manages.TestManage.GetTestMapRequirements(test, project); ((ListBox)_testReqInfo).DataSource = requirement; ((ListBox)_testReqInfo).DisplayMember = "RequirementName"; Height = 210 + _manages.TestManage.GetTestMapRequirements(test, project).Count * 20; if (requirement.Count == 0) { Height = 150; _testReqLabel.Visible = false; _testReqInfo.Visible = false; } for (int i = 0; i < _testReqInfo.Items.Count; i++) { _testReqInfo.SetItemChecked(i, _manages.TestManage.getTestMapRequirementIsComplete(test, (Requirement)_testReqInfo.Items[i])); } }
static void Main() { Application.EnableVisualStyles(); // Application.SetCompatibleTextRenderingDefault(true); ManagerCollecter manages = new ManagerCollecter(); Application.Run(new Login(manages)); }
public ShowAddTestDialog(Project project, ManagerCollecter manages) { _manages = manages; _project = project; InitializeComponent(); _testRequirementComboBox.DisplayMember = "RequirementName"; _requirement = new List <Requirement>(); }
public ShowAddProjectDialog(Project project, ManagerCollecter manages) { _manages = manages; InitializeComponent(); _projectNameTxt.Text = project.ProjectName; _projectDescriptionTxt.Text = project.ProjectDescription; _selectedUserList = _manages.ProjectManage.GetProjectMapUsers(project); BindingSource bs = new BindingSource(_selectedUserList, null); _checkedUserComboBox.DataSource = bs; _checkedUserComboBox.DisplayMember = "UserAccount"; }
public ShowAddTestDialog(Project project, Test test, ManagerCollecter manages) { _manages = manages; _project = project; InitializeComponent(); _testRequirementComboBox.DisplayMember = "RequirementName"; _testNameTxt.Text = test.TestName; _testDescriptionTxt.Text = test.TestDescription; _requirement = manages.TestManage.GetTestMapRequirement().FindAll(c => c.Test == test).Select(t => t.Requirement).ToList(); BindingSource requirementSource = new BindingSource(_requirement, null); _testRequirementComboBox.DataSource = requirementSource; }
public UserCheckList(List <User> users, ManagerCollecter manages) { _manages = manages; InitializeComponent(); BindingSource bs = new BindingSource(_manages.UserManage.GetUsers(), null); ((ListBox)_userCheckedListBox).DataSource = bs; ((ListBox)_userCheckedListBox).DisplayMember = "UserAccount"; for (int i = 0; i < _userCheckedListBox.Items.Count; i++) { foreach (User user in users) { if (_userCheckedListBox.Items[i].Equals(user)) { _userCheckedListBox.SetItemChecked(i, true); break; } } } }
public RequirementCheckList(Project project, List <Requirement> requirements, ManagerCollecter manages) { _manages = manages; InitializeComponent(); BindingSource bs = new BindingSource(_manages.RequirementManage.GetRequirements(project), null); ((ListBox)_requirementCheckedListBox).DataSource = bs; ((ListBox)_requirementCheckedListBox).DisplayMember = "RequirementName"; Height = 90 + _manages.RequirementManage.GetRequirements(project).Count * 20; for (int i = 0; i < _requirementCheckedListBox.Items.Count; i++) { foreach (Requirement requirement in requirements) { if (_requirementCheckedListBox.Items[i].Equals(requirement)) { _requirementCheckedListBox.SetItemChecked(i, true); break; } } } }
public Login(ManagerCollecter manages) { _manages = manages; InitializeComponent(); _passwordTextBox.PasswordChar = '*'; }
public Index(ManagerCollecter manages, User user) { InitializeComponent(); _manages = manages; _user = user; ChangeProjectDataSource(); _projectComboBox.DisplayMember = "ProjectName"; _projectComboBox.SelectedIndex = 0; _projectComboBoxTest.DisplayMember = "ProjectName"; _projectComboBoxTest.SelectedIndex = 0; _matrixComboBox.DisplayMember = "ProjectName"; _matrixComboBox.SelectedIndex = 0; DataGridViewButtonColumn editProjectBtn = new DataGridViewButtonColumn(); _projectGridView.Columns.Add(editProjectBtn); editProjectBtn.Text = "Edit"; editProjectBtn.Name = "editBtn"; editProjectBtn.UseColumnTextForButtonValue = true; editProjectBtn.HeaderText = "Edit"; editProjectBtn.Width = 50; editProjectBtn.DisplayIndex = 2; DataGridViewButtonColumn deleteProjectBtn = new DataGridViewButtonColumn(); _projectGridView.Columns.Add(deleteProjectBtn); deleteProjectBtn.Text = "x"; deleteProjectBtn.Name = "deleteBtn"; deleteProjectBtn.UseColumnTextForButtonValue = true; deleteProjectBtn.HeaderText = "Delete"; deleteProjectBtn.Width = 50; deleteProjectBtn.DisplayIndex = 3; DataGridViewButtonColumn editRequirementBtn = new DataGridViewButtonColumn(); _requirementGridView.Columns.Add(editRequirementBtn); editRequirementBtn.Text = "Edit"; editRequirementBtn.Name = "editBtn"; editRequirementBtn.UseColumnTextForButtonValue = true; editRequirementBtn.HeaderText = "Edit"; editRequirementBtn.Width = 50; editRequirementBtn.DisplayIndex = 2; DataGridViewButtonColumn deleteRequirementBtn = new DataGridViewButtonColumn(); _requirementGridView.Columns.Add(deleteRequirementBtn); deleteRequirementBtn.Text = "x"; deleteRequirementBtn.Name = "deleteBtn"; deleteRequirementBtn.UseColumnTextForButtonValue = true; deleteRequirementBtn.HeaderText = "Delete"; deleteRequirementBtn.Width = 50; deleteRequirementBtn.DisplayIndex = 3; DataGridViewButtonColumn editTestBtn = new DataGridViewButtonColumn(); _testGridView.Columns.Add(editTestBtn); editTestBtn.Text = "Edit"; editTestBtn.Name = "editBtn"; editTestBtn.UseColumnTextForButtonValue = true; editTestBtn.HeaderText = "Edit"; editTestBtn.Width = 50; editTestBtn.DisplayIndex = 2; DataGridViewButtonColumn deleteTestBtn = new DataGridViewButtonColumn(); _testGridView.Columns.Add(deleteTestBtn); deleteTestBtn.Text = "x"; deleteTestBtn.Name = "deleteBtn"; deleteTestBtn.UseColumnTextForButtonValue = true; deleteTestBtn.HeaderText = "Delete"; deleteTestBtn.Width = 50; deleteTestBtn.DisplayIndex = 3; UpdateGridViewFont(); }
public Register(ManagerCollecter manages) { _manages = manages; InitializeComponent(); }
public ShowAddProjectDialog(ManagerCollecter manages) { _manages = manages; InitializeComponent(); _checkedUserComboBox.DisplayMember = "UserAccount"; }