예제 #1
0
        public ListAddProject(ListProjects listProjects)
        {
            this.listProjects = listProjects;
            this.listProjects.game.storyGoOn += storyShow;
            this.listProjects.game.loseGame  += loseGame;
            InitializeComponent();
            this.BackgroundImage = listProjects.BackgroundImage;
            int i = 0;

            //We draw the projects which are proposed
            foreach (Project project in listProjects.ListProject)
            {
                AfficheProject afficheProject = new AfficheProject(false, project, this);
                afficheProject.Location = new Point(0, i * 155);
                afficheProject.TopLevel = false;
                i++;
                afficheProject.Show();
                this.pnList.Controls.Add(afficheProject);
            }
            pnList.Size = new Size(370, 300);
        }
예제 #2
0
 public void DrawListProjects(List <Project> listProjects)
 {
     if (listProjects.Count() != 0)
     {
         int i = 0;
         //draw the list of projects
         foreach (Project project in listProjects)
         {
             AfficheProject afficheProject = new AfficheProject(true, project);
             afficheProject.TopLevel = false;
             afficheProject.Location = new Point(0, i * 155);
             i++;
             afficheProject.Show();
             Button btnDelete = afficheProject.getButtonDelete();
             btnDelete.Click += new EventHandler(remove);
             Button btnEmployee = afficheProject.getButtonAssignedEmployee();
             btnEmployee.Click += new EventHandler(showEmployees);
             this.pnlList.Controls.Add(afficheProject);
         }
         pnlList.Size = new Size(315, 300);
     }
 }