예제 #1
0
        private void CreateNewProjectWindow(string path)
        {
            if (System.IO.File.Exists(path))
            {
                List<Task> tasks = XMLModule.XMLLogic.XmlLogic.ReadXml(path);
                string projectTitle = path.Remove(path.IndexOf(".")).Substring(path.LastIndexOf("\\")).Replace('\\', ' ');
                Project newProject = new Project(tasks, projectTitle, path);
                _projects.Add(newProject);

                OverlayWindow overlay = new OverlayWindow(newProject,this);

                _spawnedWindows.Add(overlay);
                overlay.Show();
            }
        }
        public OverlayWindow(Project newProject,Object parent)
        {
            InitializeComponent();

            this.txtBlockProjectName.Text = newProject.Title;
            this.mainTree.ItemsSource = newProject.Tasks;
            this.Project = newProject;
            this.ParentWindow = parent;

            foreach (Task t in newProject.Tasks)
            {
                if (t.DoneDate >= 0)
                {
                    t.TaskDecoration = "Strikethrough";
                }
            }
        }