private void OnDocumentOpenedEvent(DocumentEventArgs args)
 {
     this.OnDocumentLoaded();
 }
 private void OnDocumentClosedEvent(DocumentEventArgs args)
 {
     this.OnDocumentClosed();
 }
 private void OnDocumentClosing(DocumentEventArgs args)
 {
     ResetVM();
 }
 private void OnDocumentSavedEvent(DocumentEventArgs args)
 {
     this.OnDocumentClosing();
 }
        /// <summary>
        /// Document saved.
        /// </summary>
        /// <param name="args"></param>
        public virtual void OnDocumentSaved(DocumentEventArgs args)
        {

            if ((this.ModelData.CurrentModelContext.RootElement as IParentModelElement) != null)
            {
                string path = (this.ModelData.CurrentModelContext.RootElement as IParentModelElement).DomainFilePath;

                System.IO.FileInfo fileInfo = new System.IO.FileInfo(path);
                string name = fileInfo.Name.Replace(fileInfo.Extension, "");
                filterFilePath = fileInfo.Directory + "\\" + name + FilterFileNameExtension;
                FilteredErrorListData.Serialize(filterFilePath, this.filteredErrorListData);
            }
            this.EventManager.GetEvent<DocumentSavedEvent>().Subscribe(OnDocumentSaved);
        }
 /// <summary>
 /// Document closing.
 /// </summary>
 /// <param name="args"></param>
 public virtual void OnDocumentClosing(DocumentEventArgs args)
 {
     ClearItems(this);
 }