C2017-004 when defaulting to the default format, position format dropdown to the default format

This commit is contained in:
2017-01-23 20:27:34 +00:00
parent 75b71ce40e
commit 41a135864f
9 changed files with 1547 additions and 1285 deletions

View File

@@ -23,7 +23,7 @@ namespace VEPROMS
private string _DefaultPrintSize = null;
private bool _Initializing;
private SectionConfig _SectionConfig;
private Document _DocumentToDelete = null;
private Document _DocumentToDelete = null;
private StepTabRibbon _MyStepTabRibbon;
private bool _isStepSection = true;
private bool _hasSectionCheckoffDefault = false;
@@ -732,12 +732,10 @@ namespace VEPROMS
_Initializing = false;
return;
}
bool didDefault = false;
if ((ppCmbxFormat.SelectedIndex != -1) && _DefaultFormatName != null && _DefaultFormatName.Equals(ppCmbxFormat.SelectedValue))
{
ppBtnDefaultFmt.Focus();
ppBtnDefaultFmt.PerformClick();
didDefault = true;
}
// determine if the default button and the default description text should visable
ppBtnDefaultFmt.Visible = !(ppCmbxFormat.SelectedValue == null || ppCmbxFormat.SelectedIndex == -1);
@@ -976,7 +974,7 @@ namespace VEPROMS
private void tabpage_Enter(object sender, EventArgs e)
{
// Show or hide the labels containing the default values
if (!_Initializing)
//if (!_Initializing) // jsj 1-23-2017 was not showing default check upon property page entry
defaultSettingsVisiblity();
}
/// <summary>
@@ -1215,6 +1213,26 @@ namespace VEPROMS
ppBtnConvertToDocX.Visible = false; // Hide the button after the execution is complete.
//}
}
private void ppCmbxFormat_DropDown(object sender, EventArgs e)
{
_Initializing = true;
// C2017-004 - if using the default format, position the dropdown to the default format
if (ppCmbxFormat.SelectedIndex == -1)
ppCmbxFormat.SelectedValue = _DefaultFormatName;
_Initializing = false;
}
private void ppCmbxFormat_DropDownClosed(object sender, EventArgs e)
{
// upon exit of the dropdown if the default format is selected - click the Default button
if ((string)(ppCmbxFormat.SelectedValue) == _DefaultFormatName)
{
ppBtnDefaultFmt.PerformClick();
ppCmbxStyleSectionType.Focus();
}
}
//private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e)
//{
// // Get the parent setting