예제 #1
0
파일: OpenedFile.cs 프로젝트: giszzt/GeoSOS
        public override void CloseIfAllViewsClosed()
        {
            if (registeredViews.Count == 0)
            {
                bool wasDirty = this.IsDirty;
                FileService.OpenedFileClosed(this);

                FileClosed.RaiseEvent(this, EventArgs.Empty);

                if (fileChangeWatcher != null)
                {
                    fileChangeWatcher.Dispose();
                    fileChangeWatcher = null;
                }

                if (wasDirty)
                {
                    // We discarded some information when closing the file,
                    // so we need to re-parse it.
                    //by hanz
                    //if (File.Exists(this.FileName))
                    //    ParserService.BeginParse(this.FileName);
                    //else
                    //    ParserService.ClearParseInformation(this.FileName);
                }
            }
        }