本文整理汇总了C#中WebView.Focus方法的典型用法代码示例。如果您正苦于以下问题:C# WebView.Focus方法的具体用法?C# WebView.Focus怎么用?C# WebView.Focus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebView
的用法示例。
在下文中一共展示了WebView.Focus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Browser
public Browser(Guid id, string url, int width, int height)
{
Id = id;
_width = width;
_height = height;
webView = WebCore.CreateWebView(width, height);
webView.ResizeComplete += webView_ResizeComplete;
webView.IsDirtyChanged += webView_IsDirtyChanged;
//webView.SelectLocalFiles += webView_SelectLocalFiles;
webView.CursorChanged += webView_CursorChanged;
webView.LoadCompleted += new EventHandler(webView_LoadCompleted);
webView.LoadURL(url);
webView.Focus();
}
示例2: UIView
public UIView(ICore core, UIType menuType, int width, int height, UIFlags flags, bool transparent)
: base(core)
{
webCore = core.GetService<IUIManagerService>().GetWebCore();
this.menuType = menuType;
this.width = width;
this.height = height;
this.flags = flags;
this.isTransparent = transparent;
isLoading = false;
pageLoaded = false;
webTextureID = TextureFactory.CreateTexture(width, height, isTransparent);
hudPosX = 0;
hudPosY = 0;
hud = new TVScreen2DImmediate();
Keyboard = core.GetService<IKeyboardService>();
Mouse = core.GetService<IMouseService>();
JoyStick = core.GetService<IJoyStickService>();
Gamepad = core.GetService<IGamepadsService>();
CanculateHudPosition(flags);
View = webCore.CreateWebView(width, height, isTransparent, true);
View.OnFinishLoading += OnFinishLoading;
View.OnCallback += OnCallback;
View.Focus();
buttonClickSound = Core.GetService<ISoundManagerService>().Load2DSound(Path.Combine(Application.StartupPath, @"Data\Sounds\menu\button_click.mp3"));
buttonFocusSound = Core.GetService<ISoundManagerService>().Load2DSound(Path.Combine(Application.StartupPath, @"Data\Sounds\menu\button_focus.mp3"));
Core.GetService<ISoundManagerService>().SetVolume(buttonClickSound, 0.5f);
Core.GetService<ISoundManagerService>().SetVolume(buttonFocusSound, 0.5f);
}