public void UpdateLocalProjects()
        {
            if (Instance == null || Instance.CurrentProject == null)
            return;

              if (localProjects == null)
            localProjects = new ObservableCollection<ProjectHeader>();

              localProjects.Clear();

              using (IStorage storage = StorageSystem.GetStorage())
              {
            string[] projectNames = storage.GetDirectoryNames(ProjectsPath);

            foreach (string projectName in projectNames)
            {
              if (projectName != Instance.CurrentProject.ProjectName)
              {
            byte[] projectScreenshot =
                storage.LoadImage(ProjectsPath + "/" + projectName + "/" + Project.ScreenshotPath);
            var projectHeader = new ProjectHeader
                {
                  ProjectName = projectName,
                  Screenshot = projectScreenshot
                };
            localProjects.Add(projectHeader);
              }
            }
              }
        }
Пример #2
0
        private void initLocalProjects()
        {
            localProjects = new ObservableCollection<ProjectHeader>();

            var project1 = new ProjectHeader
                {
                    ProjectName = "Local Project 1"
                };

            var project2 = new ProjectHeader
                {
                    ProjectName = "Local Project 2"
                };

            var project3 = new ProjectHeader
                {
                    ProjectName = "Local Project 3"
                };

            localProjects.Add(project1);
            localProjects.Add(project2);
            localProjects.Add(project3);
        }