/// <summary> /// This is a javascript application. /// </summary> /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param> public Application(IApp page) { #region AtFormCreated FormStyler.AtFormCreated = s => { s.Context.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; var x = new ChromeTCPServerWithFrameNone.HTML.Pages.AppWindowDrag().AttachTo(s.Context.GetHTMLTarget()); }; #endregion #region ChromeTCPServer dynamic self = Native.self; dynamic self_chrome = self.chrome; object self_chrome_socket = self_chrome.socket; if (self_chrome_socket != null) { chrome.Notification.DefaultTitle = "Flare3DMeetsStarlingExperiment"; chrome.Notification.DefaultIconUrl = new HTML.Images.FromAssets.Preview().src; ChromeTCPServer.TheServerWithStyledForm.Invoke( AppSource.Text, AtFormCreated: FormStyler.AtFormCreated ); return; } #endregion // can we make it as a chrome app? :) var sprite = new ApplicationSprite(); sprite.AttachSpriteToDocument().With( embed => { embed.style.SetLocation(0, 0); embed.style.SetSize(Native.window.Width, Native.window.Height); Native.window.onresize += delegate { embed.style.SetSize(Native.window.Width, Native.window.Height); }; } ); }