Beispiel #1
0
        public async void UpdateList()
        {
            var projectList = await Utilities.API.GetProjects(sessionID);

            stackPanelProjects.Children.Clear();

            foreach (Models.JsonModels.JsonProject p in projectList)
            {
                var project = new ProjectListItem()
                {
                    ProjectName = p.name, ProjectCompany = p.name, Progress = (new Random().NextDouble() * 100), Deadline = DateTime.Now.AddDays(7)
                };
                project.RequestingProjectView += (o, e) => {
                    RequestingProjectView?.Invoke(o, e);
                };
                stackPanelProjects.Children.Add(project);
            }
        }
 private void buttonViewProject_Click(object sender, RoutedEventArgs e)
 {
     RequestingProjectView?.Invoke(this, new Models.EventArguments.ViewProjectEventArgs(id));
 }