public virtual XLRTargetNode loadNode(System.Globalization.CultureInfo fileLocale, System.String fileId, System.Globalization.CultureInfo locale, System.String id) { System.String key = getKey(fileLocale, fileId); XLRFile f = (XLRFile) filedict[key]; if (f == null) { System.String resource = key.replaceAll("\\.", "/") + ".xlr"; //UPGRADE_ISSUE: Method 'java.lang.ClassLoader.getResource' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangClassLoader'" //UPGRADE_ISSUE: Method 'java.lang.Class.getClassLoader' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangClassgetClassLoader'" System.Uri url = GetType().getClassLoader().getResource(resource); if (url != null) { f = new XLRFile(this, fileId, url); filedict[key] = f; } } if (f != null) { f.load(); XLRMessageNode messageNode = (XLRMessageNode) nodedict[id]; if (messageNode != null) { XLRTargetNode targetNode = messageNode.getTarget(locale.ToString()); return targetNode; } } return null; }
public virtual XLRTargetNode loadNode(System.Globalization.CultureInfo fileLocale, System.String fileId, System.Globalization.CultureInfo locale, System.String id) { System.String key = getKey(fileLocale, fileId); XLRFile f = (XLRFile)filedict[key]; if (f == null) { System.String resource = key.replaceAll("\\.", "/") + ".xlr"; //UPGRADE_ISSUE: Method 'java.lang.ClassLoader.getResource' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangClassLoader'" //UPGRADE_ISSUE: Method 'java.lang.Class.getClassLoader' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangClassgetClassLoader'" System.Uri url = GetType().getClassLoader().getResource(resource); if (url != null) { f = new XLRFile(this, fileId, url); filedict[key] = f; } } if (f != null) { f.load(); XLRMessageNode messageNode = (XLRMessageNode)nodedict[id]; if (messageNode != null) { XLRTargetNode targetNode = messageNode.getTarget(locale.ToString()); return(targetNode); } } return(null); }
private void findFiles(System.IO.FileInfo f, System.String relative) { try { bool tmpBool; if (System.IO.File.Exists(f.FullName)) tmpBool = true; else tmpBool = System.IO.Directory.Exists(f.FullName); if (!tmpBool) return ; if (System.IO.Directory.Exists(f.FullName)) { System.IO.FileInfo[] files = SupportClass.FileSupport.GetFiles(f); for (int i = 0; i < files.Length; ++i) { findFiles(new System.IO.FileInfo(files[i].FullName), ((relative == null)?"":(relative + ".")) + files[i].Name); } } else { if (!f.Name.EndsWith(".xlr")) return ; else { System.String id = relative.Substring(0, (relative.Length - ".xlr".Length) - (0)); System.String prefix = id; int dot = id.LastIndexOf('.'); int underscore = - 1; if (dot != - 1) { //UPGRADE_WARNING: Method 'java.lang.String.indexOf' was converted to 'System.String.IndexOf' which may throw an exception. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1101'" underscore = id.IndexOf('_', dot); } else { underscore = id.IndexOf('_'); } if (underscore != - 1) { prefix = id.Substring(0, (underscore) - (0)); } filedict[id] = new XLRFile(this, prefix, SupportClass.FileSupport.ToUri(f)); } } } catch (System.Exception e) { SupportClass.WriteStackTrace(e, Console.Error); } }
private void findFiles(System.IO.FileInfo f, System.String relative) { try { bool tmpBool; if (System.IO.File.Exists(f.FullName)) { tmpBool = true; } else { tmpBool = System.IO.Directory.Exists(f.FullName); } if (!tmpBool) { return; } if (System.IO.Directory.Exists(f.FullName)) { System.IO.FileInfo[] files = SupportClass.FileSupport.GetFiles(f); for (int i = 0; i < files.Length; ++i) { findFiles(new System.IO.FileInfo(files[i].FullName), ((relative == null)?"":(relative + ".")) + files[i].Name); } } else { if (!f.Name.EndsWith(".xlr")) { return; } else { System.String id = relative.Substring(0, (relative.Length - ".xlr".Length) - (0)); System.String prefix = id; int dot = id.LastIndexOf('.'); int underscore = -1; if (dot != -1) { //UPGRADE_WARNING: Method 'java.lang.String.indexOf' was converted to 'System.String.IndexOf' which may throw an exception. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1101'" underscore = id.IndexOf('_', dot); } else { underscore = id.IndexOf('_'); } if (underscore != -1) { prefix = id.Substring(0, (underscore) - (0)); } filedict[id] = new XLRFile(this, prefix, SupportClass.FileSupport.ToUri(f)); } } } catch (System.Exception e) { SupportClass.WriteStackTrace(e, Console.Error); } }