本文整理汇总了C#中System.Windows.Forms.WebBrowserProgressChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# WebBrowserProgressChangedEventArgs类的具体用法?C# WebBrowserProgressChangedEventArgs怎么用?C# WebBrowserProgressChangedEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WebBrowserProgressChangedEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了WebBrowserProgressChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: webBrowser1_ProgressChanged
private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
if (e.CurrentProgress > 0 && e.MaximumProgress > 0)
{
toolStripProgressBar1.ProgressBar.Value = (int)(e.CurrentProgress * 100 / e.MaximumProgress);
}
}
示例2: webBrowser1_ProgressChanged
private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
// Update the progress bar.
progressBar.Maximum = (int)e.MaximumProgress;
if (e.CurrentProgress >= 0 && e.CurrentProgress <= e.MaximumProgress)
{
progressBar.Value = (int)e.CurrentProgress;
}
}
示例3: browserWindow_ProgressChanged
private void browserWindow_ProgressChanged(object sender,
WebBrowserProgressChangedEventArgs e)
{
if (e.CurrentProgress > 0 && e.MaximumProgress > 0)
{
int progress = Convert.ToInt32((e.CurrentProgress / e.MaximumProgress) * 100);
this.pageLoadProgress.Value = progress > 100 ? 100 : progress;
this.pageLoadProgress.ToolTipText = "Progress - %" + this.pageLoadProgress.Value.ToString();
}
}
示例4: webBrowser1_ProgressChanged
private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
try
{
toolStripProgressBar1.Maximum = (int)e.MaximumProgress;
toolStripProgressBar1.Value = (int)e.CurrentProgress;
}
catch
{
}
}
示例5: webBrowser_ProgressChanged
void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
if (e.CurrentProgress > 0)
{
progressBar.Maximum = Convert.ToInt32(e.MaximumProgress);
progressBar.Value = Convert.ToInt32(e.CurrentProgress);
String percentLoaded = ((e.CurrentProgress / e.MaximumProgress) * 100).ToString();
loadingLabel.Text = "Searching - " + percentLoaded + "%";
}
}
示例6: webBrowser1_ProgressChanged
private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
try
{
progressBar1.Value = Convert.ToInt32(e.CurrentProgress);
progressBar1.Maximum = Convert.ToInt32(e.MaximumProgress);
}
catch
{
}
}
示例7: webBrowser_ProgressChanged
void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
if (e.MaximumProgress <= 0) { tspbar.Visible = false; return; }
int precent = (int)(e.CurrentProgress * 100 / e.MaximumProgress);
if (precent > 0 && tspbar.Visible == false) tspbar.Visible = true;
tspbar.Value = precent;
if (precent >= 100) { tspbar.Value = 0; tspbar.Visible = false; }
if (ProgressChanged != null)
{
ProgressChanged(sender, e);
}
}
示例8: adWebBrowser_ProgressChanged
private void adWebBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
try
{
Invoke((Action)delegate
{
adStatusStripProgressBar.Maximum = e.MaximumProgress < 0 ? 0 : (int)e.MaximumProgress;
adStatusStripProgressBar.Value = e.CurrentProgress < 0 ? 0 : (int)e.CurrentProgress;
adStatusStripLabel.Text = adWebBrowser.StatusText;
});
}
catch (Exception exception)
{
Program.ErrorLog(exception, "adWebBrowser_ProgressChanged()");
}
}
示例9: webRenderer_ProgressChanged
private void webRenderer_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
try
{
loadProgressIndicator.Value = Convert.ToInt32(e.CurrentProgress);
loadProgressIndicator.Maximum = Convert.ToInt32(e.MaximumProgress);
TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.Normal,this.Handle);
TaskbarManager.Instance.SetProgressValue(Convert.ToInt32(e.CurrentProgress) / 100, Convert.ToInt32(e.MaximumProgress) / 100);
percentageLoadLabel.Text = loadProgressIndicator.Value / 100 + " %";
}
catch (Exception ex)
{
statusLabel.Text = ex.Message;
}
}
示例10: Form1_ProgressChanged
//ProgressChanged
private void Form1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
if (e.CurrentProgress < e.MaximumProgress)
toolStripProgressBar1.Value=(int)e.CurrentProgress;
else toolStripProgressBar1.Value = toolStripProgressBar1.Minimum;
}
示例11: WebBrowserProgressChanged
private void WebBrowserProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
if (e.CurrentProgress == -1L)
return;
if (e.CurrentProgress == 0L)
_statusProgressBar.Visible = false;
else
{
_statusProgressBar.Visible = true;
_statusProgressBar.Maximum = (int)e.MaximumProgress;
var currentProgress = e.CurrentProgress;
if (currentProgress > e.MaximumProgress)
currentProgress = e.MaximumProgress;
_statusProgressBar.Value = (int)currentProgress;
}
}
示例12: OnProgressChanged
protected override void OnProgressChanged(WebBrowserProgressChangedEventArgs e)
{
if (ReadyState == WebBrowserReadyState.Interactive && ProcessStage == ProcessingStage.Save)
{
StopTimer();
OnDocumentCompleted(null);
AllowNavigation = false;
ProcessStage = ProcessingStage.None;
Stop();
if (Saved != null)
Saved(null, null);
}
base.OnProgressChanged(e);
}
示例13: webBrowser_ProgressChanged
// UI Events
private void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
if (e.MaximumProgress != 0)
{
if (!pbarLoadingProgress.Visible) pbarLoadingProgress.Visible = true;
pbarLoadingProgress.Value = (int)(e.CurrentProgress * 100 / e.MaximumProgress);
}
else
{
pbarLoadingProgress.Value = 100;
pbarLoadingProgress.Visible = false;
}
}
示例14: webBrowser_ProgressChanged
/// <summary>
/// Event on progress changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
if (e.MaximumProgress == 0.0)
return;
m_env.ReportManager.SetStatus(
StatusBarMessageKind.Generic,
MessageResources.MessageWebBrowse
);
int progress = (int)(100 * ((double)e.CurrentProgress / (double)e.MaximumProgress));
m_env.ReportManager.SetProgress(progress);
}
示例15: customWebBrowser1_ProgressChanged
private void customWebBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
Interactivity.SetProgress(e.CurrentProgress, e.MaximumProgress);
}