private void _openGrfs(IEnumerable <TkPath> paths, GrfHolder extraGrf) { try { foreach (TkPath resource in paths) { if ((!String.IsNullOrEmpty(resource.FilePath)) && File.Exists(resource.FilePath)) { if (!_openedGrfs.ContainsKey(resource.FilePath)) { GrfHolder grf = new GrfHolder(); grf.Open(resource.FilePath); _openedGrfs.Add(resource.FilePath, grf); } } else if (resource.FilePath.StartsWith("Currently opened GRF : ")) { if (!_openedGrfs.ContainsKey(extraGrf.FileName)) { //extraGrf.FileTable.HasBeenChanged += new FileTable.FileTableEventHandler(_fileTable_HasBeenChanged); _openedGrfs.Add(extraGrf.FileName, extraGrf); } } } } catch (Exception err) { ErrorHandler.HandleException(err); } }
private void _validateOpened() { if (!_grf.IsOpened) { _grf.Open(_grfPath, GrfLoadOptions.OpenOrNew); } }
private void _openGrfs(IEnumerable<TkPath> paths, GrfHolder extraGrf) { try { foreach (TkPath resource in paths) { if ((!String.IsNullOrEmpty(resource.FilePath)) && File.Exists(resource.FilePath)) { if (!_openedGrfs.ContainsKey(resource.FilePath)) { GrfHolder grf = new GrfHolder(); grf.Open(resource.FilePath); _openedGrfs.Add(resource.FilePath, grf); } } else if (resource.FilePath.StartsWith("Currently opened GRF : ")) { if (!_openedGrfs.ContainsKey(extraGrf.FileName)) { //extraGrf.FileTable.HasBeenChanged += new FileTable.FileTableEventHandler(_fileTable_HasBeenChanged); _openedGrfs.Add(extraGrf.FileName, extraGrf); } } } } catch (Exception err) { ErrorHandler.HandleException(err); } }