本文整理汇总了C#中Browser.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# Browser.BringToFront方法的具体用法?C# Browser.BringToFront怎么用?C# Browser.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser.BringToFront方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupEpubControl
private void SetupEpubControl()
{
Cursor =Cursors.WaitCursor;
if (_epubPreviewControl == null)
{
_epubPreviewControl = new EpubView();
_epubPreviewBrowser = new Browser();
_epubPreviewBrowser.Isolator = _isolator;
_epubPreviewBrowser.Dock = DockStyle.Fill;
_epubPreviewControl.Controls.Add(_epubPreviewBrowser);
// Has to be in front of the panel docked top for Fill to work.
_epubPreviewBrowser.BringToFront();
}
_epubPreviewControl.SetBounds(_pdfViewer.Left, _pdfViewer.Top,
_pdfViewer.Width, _pdfViewer.Height);
_epubPreviewControl.Dock = _pdfViewer.Dock;
_epubPreviewControl.Anchor = _pdfViewer.Anchor;
var saveBackGround = _epubPreviewControl.BackColor; // changed to match parent during next statement
Controls.Add(_epubPreviewControl);
_epubPreviewControl.BackColor = saveBackGround; // keep own color.
// Typically this control is dock.fill. It has to be in front of tableLayoutPanel1 (which is Left) for Fill to work.
_epubPreviewControl.BringToFront();
_model.PrepareToStageEpub();
if (!_publishWithoutAudio && !LameEncoder.IsAvailable() && _model.IsCompressedAudioMissing)
{
var fileLocator = _model.BookSelection.CurrentSelection.GetFileLocator();
var englishMissingLameModulePath = fileLocator.LocateFileWithThrow("ePUB" + Path.DirectorySeparatorChar + "MissingLameModule-en.html");
// I hesitate to change the definition of BloomFileLocator.BrowserRoot to return absolute paths. But apparently we need to feed
// _epubPreviewBrowser an absolute path or it mysteriously tries to open the relative path in an actual browser window, not itself.
// (See http://issues.bloomlibrary.org/youtrack/issue/BL-3906 if you don't believe this, which I don't except I see it happening.)
// So ensure that our file path is an absolute filepath.
var baseFolder = FileLocator.DirectoryOfApplicationOrSolution;
if (!englishMissingLameModulePath.StartsWith(baseFolder))
englishMissingLameModulePath = Path.Combine(baseFolder, englishMissingLameModulePath);
var localizedMissingLameModulePath = BloomFileLocator.GetBestLocalizedFile(englishMissingLameModulePath);
_epubPreviewBrowser.Navigate(localizedMissingLameModulePath, false);
_epubPreviewBrowser.OnBrowserClick += (sender, e) =>
{
var element = (GeckoHtmlElement)(e as DomEventArgs).Target.CastToGeckoElement();
if (element.GetAttribute("id") == "proceedWithoutAudio")
{
_publishWithoutAudio = true;
SetupEpubControlContent();
}
};
}
else
{
SetupEpubControlContent();
}
Cursor = Cursors.Default;
}
示例2: CreateBrowser
protected static void CreateBrowser()
{
Browser = new IE();
Browser.BringToFront();
}