Update the Progress Bar as the RO values are refreshed in Word

This commit is contained in:
Rich
2013-02-28 23:36:45 +00:00
parent 4abaceac23
commit f2c8ac8740
4 changed files with 88 additions and 8 deletions

View File

@@ -572,6 +572,7 @@ namespace VEPROMS
//displayRO.EnabledChanged += new EventHandler(displayRO_EnabledChanged);
tc.Enter += new EventHandler(tc_Enter);
tc.Leave += new EventHandler(tc_Leave);
tc.StatusChanged += new DisplayTabControlStatusEvent(tc_StatusChanged);
tc.ToggleRibbonExpanded += new DisplayTabControlEvent(tc_ToggleRibbonExpanded);
this.Deactivate += new EventHandler(frmVEPROMS_Deactivate);
if (VlnSettings.DemoMode) StepRTB.MyFontFamily = GetFamily("Bookman Old Style");
@@ -594,6 +595,27 @@ namespace VEPROMS
StepTabRibbon.PasteNoReturnsSetting = Properties.Settings.Default.PasteNoReturns;
StepTabRibbon.PastePlainTextSetting = Properties.Settings.Default.PastePlainText;
}
void tc_StatusChanged(object sender, DisplayTabControlStatusEventArgs args)
{
switch (args.Type)
{
case VolianStatusType.Initialize:
ProgBarMax = args.Count;
ProgBarText = args.Text;
ProgBarValue = 0;
break;
case VolianStatusType.Update:
ProgBarText = args.Text;
ProgBarValue = args.Count;
break;
case VolianStatusType.Complete:
ProgBarText = args.Text;
ProgBarValue = 0;
break;
default:
break;
}
}
void tmrShutDown_Tick(object sender, EventArgs e)
{
(sender as Timer).Enabled = false;