本文整理汇总了C#中System.Windows.Forms.WebBrowser.Show方法的典型用法代码示例。如果您正苦于以下问题:C# WebBrowser.Show方法的具体用法?C# WebBrowser.Show怎么用?C# WebBrowser.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.WebBrowser
的用法示例。
在下文中一共展示了WebBrowser.Show方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyWebBrowserStyle
public void ApplyWebBrowserStyle(WebBrowser browser)
{
browser.Hide();
while (browser.ReadyState != WebBrowserReadyState.Complete)
{ Application.DoEvents(); }
if (browser.Document != null)
browser.Document.BackColor = this.BackgroundColor;
browser.Document.Body.Style = String.Format("font-size:{0}pt;", this.FontSize);
browser.Show();
}
示例2: button_source_Click
private void button_source_Click(object sender, EventArgs e)
{
wb = new WebBrowser();
wb.Size = new Size(findControl("console_panel").Size.Width, Size.Height - sizeManager_console.Location.Y);
wb.Location = sizeManager_console.Location;
wb.Name = "wb";
Controls.Add(wb);
modVisible(new Control[] { getTBox("console"), getTBox("editor"), findControl("console_panel"), findControl("editor_panel") }, false);
wb.Show();
wb.BringToFront();
wb.Url = new Uri("https://github.com/lyokofirelyte/PseudoCompiler");
modVisible(new Control[] { button_refresh, panel_refresh, button_run_code, panel_run_code, button_open_new_file, panel_open_new_file, panel_stop_code, button_stop_code }, false);
modVisible(new Control[] { panel_save, button_save }, false);
}
示例3: Application
//.........这里部分代码省略.........
// where f != null
// select f
//);
#region DataTable
if (evt.dataTransfer.items != null)
{
// X:\jsc.svn\examples\javascript\DragDataTableIntoCSVFile\DragDataTableIntoCSVFile\Application.cs
evt.dataTransfer.items.AsEnumerable().Where(
x =>
x.type.ToLower() ==
// let jsc type system sort it out?
// how much reflection does jsc give us nowadays?
typeof(DataTable).Name.ToLower()
).WithEach(
async x =>
{
// http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dfnReturnLink-0
var DataTable_xml = await x.getAsString();
var DataTable = StringConversionsForDataTable.ConvertFromString(DataTable_xml);
var ff = new Form { Text = new { typeof(DataTable).Name }.ToString() };
var g = new DataGridView { DataSource = DataTable, Dock = DockStyle.Fill };
ff.Controls.Add(g);
ff.Show();
}
);
}
#endregion
#region files
evt.dataTransfer.files.AsEnumerable().WithEachIndex(
(f, index) =>
{
Console.WriteLine(
new
{
f.name,
f.size,
f.lastModifiedDate
}
);
var ff = new Form();
ff.PopupInsteadOfClosing(HandleFormClosing: false);
ff.Text = new { f.type, f.name, f.size }.ToString();
ff.Show();
ff.MoveTo(
evt.CursorX + 32 * index,
示例4: button15_Click
// saving in both (localy and archive)
private void button15_Click(object sender, EventArgs e)
{
button16_Click(sender, e); // saving locally
if (this._photoFormState != PhotoFormStates.SAVED_LOCALY_OK)
return;
// saving in SQL Server Table_Photos
FileInfo imageInfo = new FileInfo(FormEditArtical._photoPath);
System.Drawing.Bitmap myBitmap = new System.Drawing.Bitmap(FormEditArtical._photoPath);
StreamReader rd = new StreamReader(imageInfo.FullName);
string content = rd.ReadToEnd();
UpLoadImageFile(imageInfo);
// getting the file from SQL , browse it (--> saves small copies)
WebBrowser wb = new WebBrowser();
//string filePath = FormEditArtical._photoPath;
int fileId = 2;
string url = String.Format("http://www.kan-naim.co.il/SavingPhoto.aspx?id={0}", fileId) ;
wb.Navigate(url);
wb.Show(); wb.Visible = true;
//wb.Document.Write("Please Wait...");
}
示例5: OnOpenWindow
void OnOpenWindow(string _target, string _uri)
{
WebBrowser wb = new WebBrowser();
wb.Location = new Point(10, 10);
wb.Size = new Size(300, 300);
wb.Url = new Uri(_uri);
wb.Show();
}
示例6: SavePhotosCopiesAtDomainDirectory
private static void SavePhotosCopiesAtDomainDirectory()
{
var wb = new WebBrowser();
//string filePath = FormEditArtical._photoPath;
const int fileId = 2;
string url = String.Format("http://www.kan-naim.co.il/SavingPhoto.aspx?id={0}", fileId);
//byte[] imageData = _tblOriginalPhotos.ImageData.ToArray();
//Image image = Conversions.ByteArrayToImage(imageData).GetThumbnailImage(width, height, GetThumbnailCallback, IntPtr.Zero);
//imageData = Conversions.ImageToByteArray(image);
wb.Navigate(url);
wb.Show(); wb.Visible = true;
}
示例7: ShowInfoPage
public void ShowInfoPage()
{
this.SuspendLayout();
WebBrowser webStart = new WebBrowser();
PNLlist.Controls.Add(webStart);
webStart.Visible = false;
webStart.ScriptErrorsSuppressed = true;
webStart.ScrollBarsEnabled = false;
webStart.Dock = DockStyle.Fill;
webStart.BringToFront();
Button btnClose = new Button();
this.Controls.Add(btnClose);
btnClose.Visible = false;
btnClose.Size = new Size(PNLlist.Width - 6, 35);
btnClose.Location = new Point(15, PNLlist.Height - 39 + 39);
btnClose.FlatAppearance.BorderColor = Color.Gray;
btnClose.BackColor = Color.FromArgb(64, 64, 64);
btnClose.ForeColor = Color.WhiteSmoke;
btnClose.Text = "Close";
btnClose.FlatStyle = FlatStyle.Flat;
btnClose.BringToFront();
this.ResumeLayout();
btnClose.Click += (e, s) =>
{
PNLlist.Controls.Remove(webStart);
this.Controls.Remove(btnClose);
};
webStart.Navigated += (e, s) =>
{
if (!webStart.Document.ToString().ToLower().Contains("checking your"))
{
webStart.Show();
btnClose.Show();
}
};
webStart.Navigate("http://www.realmbot.xyz/hello.html");
}
示例8: SaveNewPhotosClick
// saving in both (localy and archive)
private void SaveNewPhotosClick(object sender, EventArgs e)
{
ucUploadPhoto1.SavePhotosLocally(); // saving locally
if (!ucUploadPhoto1.IsStateEqual(UserControlUploadPhoto.UploadState.SavedLocalyOk))
return;
if (ucUploadPhoto1.radioButtonSavePhotosToArchive.Checked)
{
// saving in SQL Server Table_Photos
var imageInfo = new FileInfo(ucUploadPhoto1._photoPath);
// var myBitmap = new Bitmap(_ucUploadPhoto1._photoPath);
// var rd = new StreamReader(imageInfo.FullName);
// string content = rd.ReadToEnd();
UpLoadImageFileAndSaveToDatabase(imageInfo);
// getting the file from SQL , browse it (--> saves small copies)
var wb = new WebBrowser();
//string filePath = FormEditArtical._photoPath;
const int fileId = 2;
string url = String.Format("http://www.kan-naim.co.il/SavingPhoto.aspx?id={0}", fileId);
wb.Navigate(url);
wb.Show(); wb.Visible = true;
//wb.Document.Write("Please Wait...");
//reseting the form
ucUploadPhoto1.Clear();
}
}