internal ProjectPanel(ProjectFile file) { SuspendLayout(); Font = _defaultFont; CloseButton = false; CloseButtonVisible = false; Project = file; Text = Messages.Scenery; Tree = new ProjectTree() { Name = Text, Dock = DockStyle.Fill, LabelEdit = true }; Root = Tree.Nodes.Add(Project.FileName, Project.FileName, 0); Root.Tag = Project; Project.ReferencesResolved += file_ReferencesResolved; var w = new BackgroundWorker(); w.DoWork += new DoWorkEventHandler((s, e) => { for (int i = 0; i < ProjectFile.MainFiles.Count; i++) { ProjectFile.MainFiles[i].GetReferences(); } ProjectFile.AllFiles.AddRange(ProjectFile.MainFiles); for (int i = 0; i < ProjectFile.AllFiles.Count; i++) { ProjectFile.AllFiles[i].GetReferencesAll(); } }); w.RunWorkerCompleted += new RunWorkerCompletedEventHandler((s, e) => { Project.Invoke(); }); w.RunWorkerAsync(); w.Dispose(); //Project.GetReferences(); ReloadScheme(); Controls.Add(Tree); DockPanel = Main.DockPanel; DockPanel.DockRightPortion = 300; Show(DockPanel, DockState.DockRightAutoHide); Tree.Sort(); ResumeLayout(); }
internal ProjectPanel(ProjectFile file) { SuspendLayout(); Font = _defaultFont; CloseButton = false; CloseButtonVisible = false; Project = file; Text = Messages.Scenery; Tree = new ProjectTree() { Name = Text, Dock = DockStyle.Fill, LabelEdit = true }; Root = Tree.Nodes.Add(Project.FileName, Project.FileName, 0); Root.Tag = Project; Project.GetReferences(); Project.ReferencesResolved += file_ReferencesResolved; ReloadScheme(); Controls.Add(Tree); DockPanel = Main.DockPanel; DockPanel.DockRightPortion = 300; Show(DockPanel, DockState.DockRightAutoHide); Tree.Sort(); ResumeLayout(); }