private void İtem_UpdateClicked(object sender, string id) { DeadlineWatcherListItem.ProjectListItem itm = (DeadlineWatcherListItem.ProjectListItem)sender; ProjectDetails pd = new ProjectDetails(); foreach (ProjectInfo i in projectList) { if (i.id == itm.id) { pd.setInfo(i); break; } } if (pd.ShowDialog() == DialogResult.OK) { for (int i = 0; i < projectList.Count; i++) { if (projectList[i].id == pd.getInfo().id) { projectList[i] = pd.getInfo(); SaveProject(pd.getInfo()); break; } } ListProjects(); } }
private void BtnAddProject_Click(object sender, EventArgs e) { ProjectDetails pd = new ProjectDetails(); if (pd.ShowDialog() == DialogResult.OK) { ProjectInfo i = pd.getInfo(); projectList.Add(i); SaveProject(i); ListProjects(); } }