本文整理匯總了C#中System.ComponentModel.RunWorkerCompletedEventArgs.get_Cancelled方法的典型用法代碼示例。如果您正苦於以下問題:C# RunWorkerCompletedEventArgs.get_Cancelled方法的具體用法?C# RunWorkerCompletedEventArgs.get_Cancelled怎麽用?C# RunWorkerCompletedEventArgs.get_Cancelled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.ComponentModel.RunWorkerCompletedEventArgs
的用法示例。
在下文中一共展示了RunWorkerCompletedEventArgs.get_Cancelled方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: m_WorkerThread_RunWorkerCompleted
private void m_WorkerThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.m_RollingImage.set_Visible(false);
this.m_ExecuteReport.set_Text(this.m_ExecuteReport.get_Tag().ToString());
if (e.Error != null)
{
this.m_StatusLabel.set_Text("Ошибка");
this.m_StatusLabel.set_ForeColor(System.Drawing.Color.Red);
Messages.ShowException(this, e.Error);
}
else if (e.get_Cancelled())
{
this.m_StatusLabel.set_Text("Отменено");
this.m_StatusLabel.set_ForeColor(System.Drawing.Color.Gray);
}
else
{
StiReport report = e.get_Result() as StiReport;
if (report != null)
{
this.m_StatusLabel.set_Text("Сделано");
this.m_StatusLabel.set_ForeColor(System.Drawing.Color.Green);
if (this.m_NeedsRendering)
{
report.Render(false);
}
if ((this.m_ReportPrintedHandler != null) && (report.CompiledReport != null))
{
report.CompiledReport.Printed += this.m_ReportPrintedHandler;
}
report.Show((System.Windows.Forms.Form) this);
}
else
{
this.m_StatusLabel.set_Text("Отчет пуст");
this.m_StatusLabel.set_ForeColor(System.Drawing.Color.IndianRed);
}
}
}
示例2: m_SearchWorker_RunWorkerCompleted
private void m_SearchWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.tsbRunReport.set_Text("Выполнить");
this.tslbRunReportImageLoading.set_Visible(false);
this.UpdateBingingReports();
if (e.Error != null)
{
AIS.SN.UI.Messages.ShowError(e.Error.get_Message());
this.m_report = null;
}
else if (e.get_Cancelled())
{
System.Windows.Forms.MessageBox.Show("Отменено.");
this.m_report = null;
}
else
{
if ((this.m_report.ds != null) || (this.m_report.PackedResult != null))
{
this.ShowReport(false, this.m_report);
}
this.m_report = null;
System.GC.Collect();
}
}