Ejemplo n.º 1
0
 public Remove_Project(FakeProjectRepository currentRepository, Project current, Project toRemove)
 {
     InitializeComponent();
     currentProject    = current;
     projectToRemove   = toRemove;
     ProjectRepository = currentRepository;
     allProjects       = ProjectRepository.GetAll();
 }
Ejemplo n.º 2
0
 public Modify_Project(FakeProjectRepository currentRepository, Project current, Project toModify)
 {
     InitializeComponent();
     currentProject    = current;
     projectToModify   = toModify;
     ProjectRepository = currentRepository;
     allProjects       = ProjectRepository.GetAll();
 }
Ejemplo n.º 3
0
 private void SelProject_Load(object sender, EventArgs e)
 {
     CenterToScreen();
     //Gets all projects in newRepository
     projects = NewRepository.GetAll();
     //Load each item into select screen
     foreach (Project project in projects)
     {
         ProjectOptions.Items.Add(project.Id.ToString() + " - " + project.Name);
     }
     ProjectOptions.SelectedIndex = 0;
 }
Ejemplo n.º 4
0
 private void PreferenceSelectProject_Load(object sender, EventArgs e)
 {
     this.CenterToParent();
     foreach (Project project in _ProjectRepository.GetAll())
     {
         listBoxProjects.Items.Add(project.Id.ToString() + " - " + project.Name);
     }
     if (listBoxProjects.Items.Count > 0)
     {
         listBoxProjects.SetSelected(0, true);
     }
     else
     {
         MessageBox.Show("There are no existing projects.", "Attention");
         this.DialogResult = DialogResult.Cancel;
         this.Close();
     }
 }