本文整理汇总了C#中WebKit.WebView.Show方法的典型用法代码示例。如果您正苦于以下问题:C# WebView.Show方法的具体用法?C# WebView.Show怎么用?C# WebView.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebKit.WebView
的用法示例。
在下文中一共展示了WebView.Show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ItemView
public ItemView(ItemList list)
: base()
{
itemList = list;
itemList.PropertyChanged += ItemListPropertyChanged;
this.webView = new WebView ();
#if ENABLE_FONTS
this.webSettings = new WebSettings ();
webView.Settings = webSettings;
#endif
ScrolledWindow sw = new ScrolledWindow ();
sw.Add(webView);
Add(sw);
Conf.AddNotify (Preference.FONT_PATH,
new NotifyEventHandler (FontNotifyHandler));
SetFonts ();
ProxyUpdatedCb ();
Proxy.Updated += ProxyUpdatedCb;
webView.NavigationRequested += delegate (object sender, NavigationRequestedArgs args) {
try {
/*
* If last_link is the same as args.Request.Uri, the user clicked on a link
* (as we know he was hovering). Thus, try to open it on the browser
*/
if(args.Request.Uri.Equals(last_link)){
args.RetVal = NavigationResponse.Ignore;
GtkBeans.Global.ShowUri(null, args.Request.Uri);
} else {
/* Otherwise, it's part of the post, so accept it (like the facebook iframe) */
args.RetVal = NavigationResponse.Accept;
}
}
catch (Exception e) {
Console.Error.WriteLine("Couldn't show URL: " + args.Request.Uri + e.Message);
}
};
webView.HoveringOverLink += delegate (object sender, HoveringOverLinkArgs args) {
if (OnUrl != null)
OnUrl (args.Link);
last_link = args.Link;
};
webView.Show ();
PageLoaded = false;
}