Пример #1
0
        /// <summary>
        /// Document loaded.
        /// </summary>
        public override void OnDocumentLoaded()
        {
            base.OnDocumentLoaded();

            this.filteredErrorListData.Clear();

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

                if (path != null)
                {
                    System.IO.FileInfo fileInfo = new System.IO.FileInfo(path);
                    string             name     = fileInfo.Name.Replace(fileInfo.Extension, "");
                    filterFilePath = fileInfo.Directory + "\\" + name + FilterFileNameExtension;

                    if (System.IO.File.Exists(filterFilePath))
                    {
                        this.filteredErrorListData = FilteredErrorListData.Deserialize(filterFilePath);
                    }
                }
                else
                {
                    filterFilePath = null;
                }
            }
            else
            {
                filterFilePath = null;
            }

            UpdateDisplayList();
        }