コード例 #1
0
 private void M_child_Disposed(object sender, EventArgs e)
 {
     if (m_child != null)
     {
         m_child.Disposed -= this.M_child_Disposed;
         m_child           = null;
     }
 }
コード例 #2
0
 private void M_firstLevel_Disposed(object sender, EventArgs e)
 {
     if (m_firstLevel != null)
     {
         m_firstLevel.Disposed -= M_firstLevel_Disposed;
         m_firstLevel           = null;
     }
 }
コード例 #3
0
 public void ClearSublevels()
 {
     if (m_child != null)
     {
         m_child.ClearSublevels();
         m_child = null;
     }
 }
コード例 #4
0
 public IExecutionScopeStatusUpdate CreateProgressReporter(string text = "", TimeSpan expectedTime = default(TimeSpan), long progressMax = -1L, Func <long, string> progressFormatter = null)
 {
     if (m_firstLevel != null)
     {
         this.ClearSublevels();
     }
     m_firstLevel           = new ExecutionScopeStatusUpdater(text, expectedTime, progressMax, progressFormatter);
     m_firstLevel.Disposed += M_firstLevel_Disposed;
     return(m_firstLevel);
 }
コード例 #5
0
 public IExecutionScopeStatusUpdate CreateProgressReporter(
     string text           = "",
     TimeSpan expectedTime = default(TimeSpan),
     long progressMax      = -1,
     //bool newStatusLevel = false,
     Func <long, string> progressFormatter = null)
 {
     if (m_child != null)
     {
         this.ClearSublevels();
     }
     m_child           = new ExecutionScopeStatusUpdater(text, expectedTime, progressMax, progressFormatter);
     m_child.m_level   = m_level + 1;
     m_child.Disposed += this.M_child_Disposed;
     return(m_child);
 }