当前位置: 首页>>代码示例>>C#>>正文


C# RunWorkerCompletedEventArgs.get_Cancelled方法代码示例

本文整理汇总了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);
         }
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:39,代码来源:BaseReportForm.cs

示例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();
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:25,代码来源:ReportsMainForm.cs


注:本文中的System.ComponentModel.RunWorkerCompletedEventArgs.get_Cancelled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。