diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index d1a824a4..4a2f9bea 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1608,7 +1608,17 @@ namespace VEPROMS pbExportStep.Maximum = pbExportStep.Value; if(ii.Sections != null) pbExportSection.Maximum = ii.Sections.Count; - } + else + { + pbExportSection.Maximum = 1; + pbExportSection.PerformStep(); + pbExportStep.Maximum = 1; + pbExportStep.PerformStep(); + lblExportSection.Text = "Sections"; + lblExportStep.Text = "Steps"; + Application.DoEvents(); + } + } if (ii.IsSection && ii.ActiveParent.IsProcedure) { pbExportSection.PerformStep(); @@ -1616,14 +1626,21 @@ namespace VEPROMS Application.DoEvents(); pbExportStep.Value = 0; pbExportStep.Maximum = pbExportStep.Value; - if (ii.Steps != null) - pbExportStep.Maximum = ii.Steps.Count; + if (ii.Steps != null) + pbExportStep.Maximum = ii.Steps.Count; + else + { + pbExportStep.Maximum = 1; + pbExportStep.PerformStep(); + lblExportStep.Text = "Word Section Data"; + Application.DoEvents(); + } } if (ii.IsStep && ii.ActiveParent.IsSection && ii.ActiveParent.ActiveParent.IsProcedure) { pbExportStep.PerformStep(); lblExportStep.Text = string.Format("{0} of {1} Steps", pbExportStep.Value.ToString(), pbExportStep.Maximum.ToString()); - Application.DoEvents(); + Application.DoEvents(); } xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "itemid", ii.ItemID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "previousid", ii.PreviousID.ToString())); @@ -1690,6 +1707,18 @@ namespace VEPROMS pbExportSection.Value = 0; pbExportStep.Value = 0; pbExportSection.Maximum = ii.Sections.Count; + if (ii.Sections != null) + pbExportSection.Maximum = ii.Sections.Count; + else + { + pbExportSection.Maximum = 1; + pbExportSection.PerformStep(); + pbExportStep.Maximum = 1; + pbExportStep.PerformStep(); + lblExportSection.Text = "Sections"; + lblExportStep.Text = "Steps"; + Application.DoEvents(); + } } if (ii.IsSection) { @@ -1699,6 +1728,13 @@ namespace VEPROMS pbExportStep.Value = 0; if (ii.Steps != null) pbExportStep.Maximum = ii.Steps.Count; + else + { + pbExportStep.Maximum = 1; + pbExportStep.PerformStep(); + lblExportStep.Text = "Word Section Data"; + Application.DoEvents(); + } } if (ii.IsStep) { @@ -2973,6 +3009,11 @@ namespace VEPROMS case "tables": AddTables(xn, parentInfo); break; + case "entry": // this is word section max out the status bar + lblImportStep.Text = "Word Section Data"; + pbImportStep.Maximum = 1; + pbImportStep.PerformStep(); + break; default: break; }