Example #1
0
        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();
        }
Example #2
0
 public DocumentView(Config cfg)
 {
     config = cfg;
 }
Example #3
0
        public Browser(Config cfg)
        {
            config = cfg;
            docView = new DocumentView(config);

            openQuery.Entry.Completer =
            (new FileCompleter("*.epub")).Match;
        }