Cleaned up status messages and results message when refreshing transitions
B2017-165 convert ? transition from 16-bit to 32-bit conversion to text
This commit is contained in:
@@ -264,6 +264,8 @@ namespace VEPROMS
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText("Refresh Transitions");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
pbProcess.Minimum = 0;
|
||||
pbProcess.Maximum = pil.Count;
|
||||
@@ -287,18 +289,28 @@ namespace VEPROMS
|
||||
}
|
||||
else
|
||||
{
|
||||
txtResults.AppendText(string.Format("Processing {0} {1}", pq.DisplayNumber, pq.DisplayText));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
myFixes = new StringBuilder();
|
||||
myFixesCount = 0;
|
||||
int lastFixedCount = myFixesCount;
|
||||
RefreshProcedureTransitions(pq);
|
||||
numTransProcessed += ProcedureInfo.TranCheckCount;
|
||||
numTransFixed += ProcedureInfo.TranFixCount;
|
||||
numTransFixed += ProcedureInfo.TranFixCount = myFixesCount - lastFixedCount;
|
||||
pbProcess.PerformStep();
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
if (numTransFixed == 0)
|
||||
{
|
||||
txtResults.AppendText("No Transitions Needed Updated.");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
ContentInfo.StaticContentInfoChange -= new StaticContentInfoEvent(ContentInfo_StaticContentInfoChange);
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Transitions Checked: {0}",numTransProcessed));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Transitions Fixed: {0}",numTransFixed));
|
||||
Application.DoEvents();
|
||||
if (pil.Count > 0)
|
||||
{
|
||||
@@ -742,21 +754,16 @@ namespace VEPROMS
|
||||
private void RefreshProcedureTransitions(ProcedureInfo pq)
|
||||
{
|
||||
DateTime start = DateTime.Now;
|
||||
myFixes = new StringBuilder();
|
||||
int lastFixesCount = myFixesCount;
|
||||
ProcedureInfo.ResetTranCounters();
|
||||
ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable);
|
||||
TimeSpan ts = DateTime.Now - start;
|
||||
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Elapsed Seconds:{4}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ts.TotalSeconds));
|
||||
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Elapsed Seconds:{4}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount,myFixesCount - lastFixesCount, ts.TotalSeconds));
|
||||
if (myFixes.Length > 0)
|
||||
{
|
||||
txtResults.AppendText(myFixes.ToString());
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtResults.AppendText("No Transitions needed fixed");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> roFstInfo_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)
|
||||
@@ -800,11 +807,13 @@ namespace VEPROMS
|
||||
}
|
||||
|
||||
StringBuilder myFixes;
|
||||
int myFixesCount = 0;
|
||||
// show the changes made in the Results pannel, include the ItemId of the step element
|
||||
void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
|
||||
{
|
||||
if (args.Type == "TX")
|
||||
{
|
||||
myFixesCount++;
|
||||
if (args.NewValue.StartsWith("Reason for Change:"))
|
||||
myFixes.AppendLine(string.Format("Fixed Transition for {1}({4}){0}Old Text: {2}{0}{3}{0}", Environment.NewLine, (sender as ItemInfo).ShortPath, args.OldValue, args.NewValue, (sender as ItemInfo).ItemID));
|
||||
else
|
||||
|
Reference in New Issue
Block a user