예제 #1
0
        private async void _dataServices_GetAllProjects(object sender, EventArgs e)
        {
            var data = (ProjectEventArgs)e;

            if (data.ProjectEventArgsType == ProjectEventArgsType.AllProjects)
            {
                Projets.Clear();
                data.Projets.ForEach(d =>
                {
                    _authServices.GetOneUser(d.OwnerUId);
                    _authServices.GetUser += (o, ev) =>
                    {
                        if (((UserEventArgs)ev).EventType == EventType.UserGet)
                        {
                            if (Projets.Where(p => p.ProjectId == d.ProjectId).Count() == 0)
                            {
                                Projets.Add(new Projet
                                {
                                    Categories  = d.Categories,
                                    ProjectId   = d.ProjectId,
                                    Date        = d.Date,
                                    Description = d.Description,
                                    Name        = d.Name,
                                    OwnerName   = ((UserEventArgs)ev).User.Fullname,
                                    OwnerUId    = d.OwnerUId
                                });
                            }
                        }
                    };
                });
                await Task.Delay(1200);

                IsRunning = false;
            }
        }
예제 #2
0
 public void AjouterVoeux(string projet, int rang)
 {
     Projets.Add(projet); Voeux.Add(rang);
 }