Esempio n. 1
0
        public ManualsXapp(IAppHandler aHandler)
        {
            iHandler = aHandler;

            iXappMimeTypes = new Dictionary<string, string>();
            iXappMimeTypes.Add(".css", "text/css");

            iGitMimeTypes = new Dictionary<string, string>();
            iGitMimeTypes.Add(".md", "text/md");
            iGitMimeTypes.Add(".html", "text/html");
            iGitMimeTypes.Add(".css", "text/css");
            iGitMimeTypes.Add(".js", "text/javascript");
            iGitMimeTypes.Add(".jpg", "image/jpg");
            iGitMimeTypes.Add(".png", "image/png");

            iResourceFolder = new ResourceFolder("http", iXappMimeTypes, iHandler.AppRoot);

            iGitPath = Path.Combine(iHandler.DataRoot, "GitManuals");

            iRepository = GitFactory.Open(iGitPath, "git://github.com/cropotkin/Documentation.git");

            iRepository.Fetch();

            iMarkdown = new Markdown();

            iAdvancedModule = new AdvancedModule("openhome.org.advanced", iHandler.AppRoot);

            iHandler.RegisterXapp(this, "xapp/main.css", iAdvancedModule);
        }
Esempio n. 2
0
        public ManualsTab(IXappFormsTabHandler aHandler, IManualsManager aManager, AdvancedModule aAdvancedModule)
        {
            iHandler = aHandler;
            iManager = aManager;
            iAdvancedModule = aAdvancedModule;

            iMain = iHandler.CreateContainer();
            //var home = "<span id=\"xx\">Hello World!</span>";
            iMain.Add(iAdvancedModule.CreateBrowser(iHandler, iManager.GetPage, "/index.md").WithClass("md"));
            iHandler.SetRoot(iMain);
        }