public static void Main(string[] args) { var config = new Config(); config.Load(); var browser = new Browser(config); Terminal.Init(); try { Display.Show(browser); if (args.Length > 0) browser.TryOpenFile(args[0]); else browser.OpenBook(BookInfo.GetHelp()); for (;;) { TerminalKey k = Display.Iterate(); if (k == TerminalKey.CtrlX) break; } } catch (Exception ex) { Terminal.Exit(); throw ex; } Terminal.Exit(); browser.Save(); config.Save(); }
public DocumentView(Config cfg) { config = cfg; }
public Browser(Config cfg) { config = cfg; docView = new DocumentView(config); openQuery.Entry.Completer = (new FileCompleter("*.epub")).Match; }