Ejemplo n.º 1
0
        private void OnProjectAdded(object sender, EntityAddedEventArgs <Project> e)
        {
            AllProjectsViewModel workspace =
                this.Workspaces.FirstOrDefault(vm => vm is AllProjectsViewModel)
                as AllProjectsViewModel;

            if (workspace != null)
            {
                workspace.ModifyEntity(e.NewEntity);
            }
        }
Ejemplo n.º 2
0
        private void ShowAllProjetcs()
        {
            AllProjectsViewModel workspace =
                this.Workspaces.FirstOrDefault(vm => vm is AllProjectsViewModel)
                as AllProjectsViewModel;

            if (workspace == null)
            {
                workspace = new AllProjectsViewModel();
                this.Workspaces.Add(workspace);
            }

            this.SetActiveWorkspace(workspace);
        }