public ThirdPageApplication(IThirdPage page, Application master, string trace) { //Native.document.oner new IHTMLHeader1 { innerText = new { trace, Native.document.location.search, Native.document.location.hash }.ToString() }.AttachToDocument(); new IHTMLButton { innerText = "animate" }.AttachToDocument().WhenClicked( delegate { IStyleSheet.Default["body.third"].style.borderLeft = "5em red solid"; } ); IStyleSheet.Default["body.third"].style.borderLeft = "4em blue solid"; new ContentContainer { Content = new ApplicationWebService { }.GetItem(44) }.AttachToDocument(); page.Yield.WhenClicked( async button => { var z = await this.GetSpecialString(); master.yield(z); } ); page.Data.WhenClicked( async button => { Native.window.history.pushState( new { reason = "new state" }, async scope => { // Uncaught Error: InvalidOperationException: we can only continue with global methods for now... { Target = { Index = 0 } } var f = new Form { Text = "loading..." + new { scope.state.reason }.ToString(), //Text = new { this.state.data.TableName }.ToString(), //ControlBox = false, ShowIcon = false, //WindowState = FormWindowState.Maximized }; f.FormClosing += (s, e) => { if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; Native.window.history.back(); } }; var grid = new DataGridView { // script: error JSC1000: No implementation found for this native method, please implement [System.Windows.Forms.DataGridView.set_BorderStyle(System.Windows.Forms.BorderStyle)] //BorderStyle = BorderStyle.Fixed3D //AutoSize = true, AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells, //DataSource = this.state.data, Dock = DockStyle.Fill }.AttachTo(f); // do we need this? //f.GetHTMLTarget().AttachTo(goopage.output); grid.DataSourceChanged += delegate { Console.WriteLine("DataSourceChanged"); (grid.DataSource as DataTable).With( data => { f.Text = data.TableName; } ); }; f.Show(); //f.WindowState = FormWindowState.Maximized; //f.PopupInsteadOfClosing( // HandleFormClosing: false // // , // // does not play well with maximized yet // //SpecialNoMovement: true // ); { var data = await new ApplicationWebService { reason = scope.state.reason }.DoEnterData(); Console.WriteLine("set DataSource"); grid.DataSource = data; await scope; f.Close(); } } ); } ); }