public void ShowDocument(string filename) { try { Document doc = new Document(); DocumentReference docRef = new DocumentReference(doc, filename); doc.LoadFile(docRef); doc.Owner = this.MainWindow; doc.Show(); doc.Activate(); Documents.Add(docRef); } catch { MessageBox.Show("Could not load document."); } }
public DocumentReference(Document document, string name) { Document = document; Name = name; }