/// <summary> /// Gets all file references associated with main project file /// </summary> internal void GetReferences() { References = new List <ProjectFile>(); var w = new BackgroundWorker(); w.DoWork += new DoWorkEventHandler((s, e) => { GetReferences(Roles.Include, new ScnSyntax.IncludeSimple()); GetReferences(Roles.Timetable, new ScnSyntax.Timetable(), new[] { "none", "rozklad" }, null, ".txt"); GetReferences(Roles.Description, new ScnSyntax.CommandInclude(), null, new[] { ".txt", ".html" }); }); if (Role == Roles.Main) { w.RunWorkerCompleted += new RunWorkerCompletedEventHandler((s, e) => { if (ReferencesResolved != null) { ReferencesResolved.Invoke(this, EventArgs.Empty); } }); } w.RunWorkerAsync(); w.Dispose(); }
internal void Invoke() { ReferencesResolved.Invoke(this, EventArgs.Empty); }