本文整理匯總了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()
);
};
}