public virtual void OnStartDemo(SampleViewport viewport) { //html box var contentMx = new LayoutFarm.ContentManagers.ImageContentManager(); contentMx.ImageLoadingRequest += contentMx_ImageLoadingRequest; var host = HtmlHostCreatorHelper.CreateHtmlHost(viewport, (s, e) => contentMx.AddRequestImage(e.ImageBinder), contentMx_LoadStyleSheet); //1. htmlbox int viewportW = viewport.ViewportControl.Width; int viewportH = viewport.ViewportControl.Height; htmlBox = new HtmlBox(host, viewportW, viewportH); viewport.AddContent(htmlBox); if (htmltext == null) { htmltext = @"<html><head></head><body>NOT FOUND!</body></html>"; } htmlBox.LoadHtmlString(htmltext); }
public void StartModule(LayoutFarm.SampleViewport sampleViewport) { this.viewport = sampleViewport; dzBoardModule = new DesignBoardModule(); menuModule = new MenuBoardModule(); menuModule.menuItemClick += new EventHandler <MenuItemClickEventArgs>(menuModule_menuItemClick); var contentMx = new LayoutFarm.ContentManagers.ImageContentManager(); contentMx.ImageLoadingRequest += contentMx_ImageLoadingRequest; //app specific here documentRootPath = System.Windows.Forms.Application.ExecutablePath; this.htmlHost = HtmlHostCreatorHelper.CreateHtmlHost(viewport, (s, e) => contentMx.AddRequestImage(e.ImageBinder), contentMx_LoadStyleSheet); //1. design board dzBoardModule.StartModule(htmlHost, this.viewport); ////2. canvas board //drawingBoard.StartModule(htmlHost, this.viewport); //3. menu menuModule.StartModule(htmlHost, this.viewport); //------------------------------------------------------ //context knowledge*** //------------------------------------------------------ }
protected override void OnStartDemo(SampleViewport viewport) { //html box var contentMx = new LayoutFarm.ContentManagers.ImageContentManager(); contentMx.ImageLoadingRequest += contentMx_ImageLoadingRequest; var host = HtmlHostCreatorHelper.CreateHtmlHost(viewport, (s, e) => contentMx.AddRequestImage(e.ImageBinder), contentMx_LoadStyleSheet); htmlBox = new HtmlBox(host, 1024, 800); viewport.AddContent(htmlBox); if (htmltext == null) { htmltext = @"<html><head></head><body>NOT FOUND!</body></html>"; } htmlBox.LoadHtmlString(htmltext); }
public virtual void OnViewportReady(SampleViewport viewport) { //html box var contentMx = new LayoutFarm.ContentManagers.ImageContentManager(); contentMx.ImageLoadingRequest += contentMx_ImageLoadingRequest; var host = HtmlHostCreatorHelper.CreateHtmlHost(viewport, (s, e) => contentMx.AddRequestImage(e.ImageBinder), contentMx_LoadStyleSheet); //1. htmlbox int viewportW = viewport.ViewportControl.Width; int viewportH = viewport.ViewportControl.Height; htmlBox = new HtmlBox(host, viewportW, viewportH); viewport.AddContent(htmlBox); if (htmltext == null) { htmltext = @"<html><head></head><body>NOT FOUND!</body></html>"; } htmlBox.LoadHtmlString(htmltext); }
public void StartModule(LayoutFarm.SampleViewport sampleViewport) { this.viewport = sampleViewport; dzBoardModule = new DesignBoardModule(); menuModule = new MenuBoardModule(); menuModule.menuItemClick += new EventHandler<MenuItemClickEventArgs>(menuModule_menuItemClick); var contentMx = new LayoutFarm.ContentManagers.ImageContentManager(); contentMx.ImageLoadingRequest += contentMx_ImageLoadingRequest; //app specific here documentRootPath = System.Windows.Forms.Application.ExecutablePath; this.htmlHost = HtmlHostCreatorHelper.CreateHtmlHost(viewport, (s, e) => contentMx.AddRequestImage(e.ImageBinder), contentMx_LoadStyleSheet); //1. design board dzBoardModule.StartModule(htmlHost, this.viewport); ////2. canvas board //drawingBoard.StartModule(htmlHost, this.viewport); //3. menu menuModule.StartModule(htmlHost, this.viewport); //------------------------------------------------------ //context knowledge*** //------------------------------------------------------ }