public override object Load(string fileToLoad, ShowFlags showFlags) { ListerControl lc = null; if (!String.IsNullOrEmpty(fileToLoad)) { if ((showFlags & ShowFlags.ForceShow).Equals(ShowFlags.ForceShow)) { string ext = Path.GetExtension(fileToLoad); if (AllowedExtensionsOnForceShow.IndexOf(ext, StringComparison.InvariantCultureIgnoreCase) < 0) { return(null); } } lc = new ListerControl { WrapText = (showFlags & ShowFlags.WrapText).Equals(ShowFlags.WrapText), AsciiCharset = (showFlags & ShowFlags.Ascii).Equals(ShowFlags.Ascii) }; lc.FileLoad(fileToLoad); FocusedControl = lc.tabControl; ScrollProc(0); controls.Add(lc); } return(lc); }
public override ListerResult LoadNext(object control, string fileToLoad, ShowFlags showFlags) { ListerControl lc = (ListerControl)control; if (!String.IsNullOrEmpty(fileToLoad)) { if ((showFlags & ShowFlags.ForceShow).Equals(ShowFlags.ForceShow)) { string ext = Path.GetExtension(fileToLoad); if (AllowedExtensionsOnForceShow.IndexOf(ext, StringComparison.InvariantCultureIgnoreCase) < 0) { return(ListerResult.Error); } } lc.WrapText = (showFlags & ShowFlags.WrapText).Equals(ShowFlags.WrapText); lc.AsciiCharset = (showFlags & ShowFlags.Ascii).Equals(ShowFlags.Ascii); lc.FileLoad(fileToLoad); ScrollProc(0); return(ListerResult.OK); } return(ListerResult.Error); }