本文整理汇总了C#中System.App.AsNode方法的典型用法代码示例。如果您正苦于以下问题:C# App.AsNode方法的具体用法?C# App.AsNode怎么用?C# App.AsNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.App
的用法示例。
在下文中一共展示了App.AsNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Application
//.........这里部分代码省略.........
{
Console.WriteLine("appwindow contentWindow onload");
//new IHTMLButton("dynamic").AttachTo(
// appwindow.contentWindow.document.body
//);
};
//Uncaught TypeError: Cannot read property 'contentWindow' of undefined
appwindow.onClosed.addListener(
new Action(
delegate
{
notify("Ok!", "You can still click on the button on your android. Click here to see diagnostics.",
spawn
);
}
)
);
}
)
);
};
notify("Ready!", "You can already click on the button on your android. Click here to see diagnostics.",
spawn
);
}
)
);
return;
}
Console.WriteLine("Application renew body:");
Console.WriteLine(Native.Document.documentElement.AsXElement());
// if we are in a window lets add layout
// Error 6 Cannot create an instance of the abstract class or interface 'AndroidToChromeNotificationExperiment.HTML.Pages.IApp' X:\jsc.svn\examples\javascript\android\AndroidToChromeNotificationExperiment\AndroidToChromeNotificationExperiment\Application.cs 514 28 AndroidToChromeNotificationExperiment
page = new App();
page.AsNode().With(
n =>
{
Console.WriteLine("Application renew body " + new { childNodes = n.childNodes.Length });
Console.WriteLine("Application renew body " + new { childNodes = n.attributes.Length });
n.childNodes.WithEach(k => k.AttachToDocument());
n.attributes.WithEach(k => Native.Document.body.setAttribute(k.name, k.value));
}
);
// we are running in chrome!
page.NotifyChromeViaLANBroadcast.disabled = true;
Console.WriteLine("Application renew body done:");
Console.WriteLine(Native.Document.documentElement.AsXElement());
page.ChromeNotification.disabled = false;
page.ChromeNotification.onclick +=
delegate
{
notify("Primary Title", "Primary message to display", delegate
{
Native.window.open("http://example.com", "_blank");
});
};
}
#endregion
page.NotifyChromeViaLANBroadcast.onclick +=
delegate
{
// Send data from JavaScript to the server tier
service.NotifyChromeViaLANBroadcast(
@"A string from JavaScript.",
value => value.ToDocumentTitle()
);
};
}