예제 #1
0
        private void addProjectButton_Click(object sender, System.EventArgs e)
        {
            ProjectForm form = new ProjectForm(new Project());

            form.Show();
            form.Closed += new EventHandler(form_Closed);
        }
예제 #2
0
        private void propertiesMenuItem_Click(object sender, System.EventArgs e)
        {
            IEnumerator enumr = this.projectListView.SelectedIndices.GetEnumerator();

            enumr.MoveNext();
            Project     p  = ((Project)this._settings.Projects.ToArray()[(int)enumr.Current]);
            ProjectForm pf = new ProjectForm(p);

            pf.Closed += new EventHandler(form_Closed);
            pf.Show();
        }
예제 #3
0
        private void form_Closed(object sender, EventArgs e)
        {
            if (sender is ProjectForm)
            {
                ProjectForm pf      = (ProjectForm)sender;
                Project     project = pf.Project;

                if (project != null)
                {
                    if (!_settings.Projects.Contains(project))
                    {
                        project.OnPolled += new PolledEventHandler(Project_OnPolled);

                        _settings.Projects.Add(project);
                        monitor.visitProject(project);
                    }
                    UpdateProjectList();
                }
            }
        }