Show the amount of time it takes to complete a search
Remove Debug Messages Eliminate crash due to SQL connections The location for search result was changed from bullets to meaningful values.
This commit is contained in:
@@ -22,6 +22,12 @@ namespace Volian.Controls.Library
|
||||
if (PrintRequest != null)
|
||||
PrintRequest(this, args);
|
||||
}
|
||||
public event DisplaySearchEvent SearchComplete;
|
||||
private void OnSearchComplete(DisplaySearchEventArgs args)
|
||||
{
|
||||
if (SearchComplete != null)
|
||||
SearchComplete(this, args);
|
||||
}
|
||||
#endregion
|
||||
#region Properties
|
||||
private string _strSrchText = "";
|
||||
@@ -1369,7 +1375,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
Cursor = savcursor;
|
||||
}
|
||||
Console.WriteLine("{0} Milliseconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalMilliseconds);
|
||||
//Console.WriteLine("{0} Milliseconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalMilliseconds);
|
||||
OnSearchComplete(new DisplaySearchEventArgs(TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks)));
|
||||
//if (VlnSettings.DebugMode)
|
||||
// MessageBox.Show(string.Format("{0} Milliseconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalMilliseconds));
|
||||
}
|
||||
@@ -2190,6 +2197,16 @@ namespace Volian.Controls.Library
|
||||
get { return _MyItemInfoList; }
|
||||
set { _MyItemInfoList = value; }
|
||||
}
|
||||
private TimeSpan _HowLong = TimeSpan.FromTicks(0);
|
||||
public TimeSpan HowLong
|
||||
{
|
||||
get { return _HowLong; }
|
||||
set { _HowLong = value; }
|
||||
}
|
||||
public DisplaySearchEventArgs(TimeSpan howLong)
|
||||
{
|
||||
HowLong = howLong;
|
||||
}
|
||||
public DisplaySearchEventArgs(string reportTitle, string typesSelected, string searchString, ICollection<ItemInfo> myItemInfoList)
|
||||
{
|
||||
_ReportTitle = reportTitle;
|
||||
|
@@ -697,7 +697,7 @@ namespace Volian.Controls.Library
|
||||
if (_MyEditItem.RTBLastFocus)
|
||||
{
|
||||
trackerSC++;
|
||||
/*if (trackerSC>20) */Console.WriteLine("ShowCaret: {0}", trackerSC);
|
||||
/*if (trackerSC>20) *///Console.WriteLine("ShowCaret: {0}", trackerSC);
|
||||
//Volian.Base.Library.vlnStackTrace.ShowStack("ShowCaret: EI: {0} StepRTB: {1}", _MyEditItem.MyItemInfo.ItemID, _MyStepRTB.MyItemInfo.ItemID);
|
||||
if (!_MyStepRTB.Visible)
|
||||
_MyStepRTB.Visible = true;
|
||||
@@ -727,7 +727,7 @@ namespace Volian.Controls.Library
|
||||
if (_MyStepRTB != null && !_MyStepRTB.Disposing && !_MyStepRTB.Closed)
|
||||
{
|
||||
trackerHC++;
|
||||
/* if (trackerHC>20)*/ Console.WriteLine("HideCaret {0}", trackerHC);
|
||||
/* if (trackerHC>20)*/ //Console.WriteLine("HideCaret {0}", trackerHC);
|
||||
//Volian.Base.Library.vlnStackTrace.ShowStack("HideCaret: StepRTB: {0}", _MyStepRTB.MyItemInfo.ItemID);
|
||||
HideTheCaret();
|
||||
if (_MyStepRTB.SelectionLength > 0)
|
||||
|
Reference in New Issue
Block a user