本文整理汇总了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();
}
}