Esempio n. 1
0
 /// <summary>
 /// Open a document into the view.
 /// </summary>
 /// <remarks>
 /// Open does not involve fetching the document, it merely opens the
 /// document into the controller.
 /// </remarks>
 /// <param name="document">Document to be opened.</param>
 public void OpenDocument(AbstractDocument document)
 {
     if (!Documents.Contains(document)) {
         Documents.Add(document);
     }
     CurrentDocument = document;
 }
Esempio n. 2
0
 /// <summary>
 /// Remove a document from the view.
 /// </summary>
 /// Close does not involve saving the document, it merely removes the
 /// document from the controller.
 /// <param name="document">Document to be removed.</param>
 public void CloseDocument(AbstractDocument document)
 {
     if (Documents.Contains(document)) {
         if (document.Equals(CurrentDocument)) {
             CurrentDocument = null;
         }
         Documents.Remove(document);
     }
 }