Improved performance of the SQL Stored procedures related to DeleteItemAndChildren.
Added output so that status can be seen as a procedure is deleted.
This commit is contained in:
@@ -548,7 +548,7 @@ namespace VEPROMS
|
||||
this.bottomProgBar.MenuVisibility = DevComponents.DotNetBar.eMenuVisibility.VisibleAlways;
|
||||
this.bottomProgBar.Name = "bottomProgBar";
|
||||
this.bottomProgBar.RecentlyUsed = false;
|
||||
this.bottomProgBar.Width = 150;
|
||||
this.bottomProgBar.Width = 250;
|
||||
//
|
||||
// labelItem20
|
||||
//
|
||||
|
@@ -297,14 +297,36 @@ namespace VEPROMS
|
||||
displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged);
|
||||
tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets);
|
||||
tv.PrintTransitionReport += new vlnTreeViewEvent(tv_PrintTransitionReport);
|
||||
tv.ProcessingComplete += tv_ProcessingComplete;
|
||||
tv.Processing += tv_Processing;
|
||||
}
|
||||
private bool _SkipRefresh = false;
|
||||
public bool SkipRefresh
|
||||
{
|
||||
get { return _SkipRefresh; }
|
||||
set { _SkipRefresh = value; }
|
||||
}
|
||||
void tv_Processing(object sender, vlnTreeStatusEventArgs args)
|
||||
{
|
||||
SkipRefresh = args.MyStatus;
|
||||
if (args.MyStatus)
|
||||
bottomProgBar.ColorTable = eProgressBarItemColor.Paused;
|
||||
else
|
||||
bottomProgBar.ColorTable = eProgressBarItemColor.Normal;
|
||||
bottomProgBar.Text = args.MyMessage;
|
||||
bottomProgBar.TextVisible = true;
|
||||
Application.DoEvents();
|
||||
}
|
||||
void tv_ProcessingComplete(object sender, vlnTreeTimeEventArgs args)
|
||||
{
|
||||
bottomProgBar.Text = string.Format("{0} seconds - {1}", args.MyTimeSpan.TotalSeconds, args.MyMessage);
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
void bottomProgBar_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (bottomProgBar.Value < 10 && bottomProgBar.ColorTable != eProgressBarItemColor.Normal)
|
||||
bottomProgBar.ColorTable = eProgressBarItemColor.Normal;
|
||||
}
|
||||
|
||||
string tv_GetChangeId(object sender, vlnTreeItemInfoEventArgs args)
|
||||
{
|
||||
tc.HandleChangeId(args.MyItemInfo, null);
|
||||
@@ -947,6 +969,7 @@ namespace VEPROMS
|
||||
}
|
||||
private void RefreshChanged(Object obj)
|
||||
{
|
||||
if (SkipRefresh) return;
|
||||
MySemaphore.WaitOne();
|
||||
try
|
||||
{
|
||||
@@ -1071,7 +1094,7 @@ namespace VEPROMS
|
||||
System.Threading.AutoResetEvent autoEvent = new System.Threading.AutoResetEvent(false);
|
||||
//System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(MySessionInfo.PingSession);
|
||||
//System.Diagnostics.Process xyzzy = System.Diagnostics.Process.GetCurrentProcess();
|
||||
if(!System.Diagnostics.Debugger.IsAttached)
|
||||
if(!System.Diagnostics.Debugger.IsAttached)// running in Production Mode (Not in the debugger)
|
||||
{
|
||||
System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(this.PingSession);
|
||||
MyActivityTimer = new System.Threading.Timer(timerDelegate, autoEvent, 10000, 10000);
|
||||
|
Reference in New Issue
Block a user