Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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();
            }
        }