C2021-047: Allow for setting of Merged Pdf Landscape Page Number Location

This commit is contained in:
2021-10-25 14:19:37 +00:00
parent 2b25136036
commit 033df8ccb3
5 changed files with 293 additions and 34 deletions

View File

@@ -245,6 +245,10 @@ namespace VEPROMS
_DocVersionConfig.Print_MergedPdfsPageNumLocX = float.Parse(tbxMOSxloc.Text);
_DocVersionConfig.Print_MergedPdfsPageNumLocY = float.Parse(tbxMOSyloc.Text);
_DocVersionConfig.Print_MergedPdfsPageNumCorner = (MergedPdfsPageNumCorner)ppCmbxMOScornerLoc.SelectedIndex;
// C2021-047: Allow for setting of Merged Pdf Landscape Page Number Location
_DocVersionConfig.Print_MergedPdfsLandPageNumLocX = float.Parse(tbxMOSLandxloc.Text);
_DocVersionConfig.Print_MergedPdfsLandPageNumLocY = float.Parse(tbxMOSLandyloc.Text);
_DocVersionConfig.Print_MergedPdfsLandPageNumCorner = (MergedPdfsPageNumCorner)ppCmbxMOSLandcornerLoc.SelectedIndex;
_DocVersionConfig.Print_MergedPdfsViewAfter = ppChbxMOSview.Checked;
//docVersionConfigBindingSource.EndEdit();
@@ -452,6 +456,12 @@ namespace VEPROMS
ppCmbxMOScornerLoc.ValueMember = "EValue";
ppCmbxMOScornerLoc.SelectedIndex = -1;
// C2021-047: Allow for setting of Merged Pdf Landscape Page Number Location
ppCmbxMOSLandcornerLoc.DataSource = EnumDetail<MergedPdfsPageNumCorner>.Details();
ppCmbxMOSLandcornerLoc.DisplayMember = "Description";
ppCmbxMOSLandcornerLoc.ValueMember = "EValue";
ppCmbxMOSLandcornerLoc.SelectedIndex = -1;
// check active format to see if the unit number text box on the format tab is visible.
if (_DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.PlantFormat.FormatData.PrintData.UnitNumber)
{
@@ -529,8 +539,16 @@ namespace VEPROMS
btnUnlinkDocVersion.Visible = false;
InitEnhanced();
// set the merge pdf settings:
ppCmbxMOSformat.SelectedIndex = (int)_DocVersionConfig.Print_MergedPdfsPageOf;
// set the merge pdf settings: (moved to own method for C2021-047)
InitMergePdfSettings();
_Initializing = false;
}
private void InitMergePdfSettings()
{
// Page Settings
ppCmbxMOSformat.SelectedIndex = (int)_DocVersionConfig.Print_MergedPdfsPageOf;
if (_DocVersionConfig.Print_MergedPdfsPageOf == MergedPdfsPageOf.Other)
{
tbxMOSother.Text = _DocVersionConfig.Print_MergedPdfsPageNumFormatOther;
@@ -540,9 +558,6 @@ namespace VEPROMS
tbxMOSother.Enabled = false;
tbxMOSother.Text = _DocVersionConfig.Print_MergedPdfsPageNumFormatOther;
tbxMOSfontSz.Text = _DocVersionConfig.Print_MergedPdfsPageNumFontSize;
tbxMOSxloc.Text = _DocVersionConfig.Print_MergedPdfsPageNumLocX.ToString();
tbxMOSyloc.Text = _DocVersionConfig.Print_MergedPdfsPageNumLocY.ToString();
ppCmbxMOScornerLoc.SelectedIndex = (int)_DocVersionConfig.Print_MergedPdfsPageNumCorner;
ppCmbxMOSfontName.DataSource = FontFamily.Families;
ppCmbxMOSfontName.DisplayMember = "Name";
if (_DocVersionConfig.Print_MergedPdfsPageNumFont == null || _DocVersionConfig.Print_MergedPdfsPageNumFont == "")
@@ -551,7 +566,15 @@ namespace VEPROMS
ppCmbxMOSfontName.SelectedValue = _DocVersionConfig.Print_MergedPdfsPageNumFont;
ppChbxMOSview.Checked = _DocVersionConfig.Print_MergedPdfsViewAfter;
_Initializing = false;
// Portrait Specific Settings
tbxMOSxloc.Text = _DocVersionConfig.Print_MergedPdfsPageNumLocX.ToString();
tbxMOSyloc.Text = _DocVersionConfig.Print_MergedPdfsPageNumLocY.ToString();
ppCmbxMOScornerLoc.SelectedIndex = (int)_DocVersionConfig.Print_MergedPdfsPageNumCorner;
// Landscape Settings for C2021-047: Allow for setting of Merged Pdf Landscape Page Number Location
tbxMOSLandxloc.Text = _DocVersionConfig.Print_MergedPdfsLandPageNumLocX.ToString();
tbxMOSLandyloc.Text = _DocVersionConfig.Print_MergedPdfsLandPageNumLocY.ToString();
ppCmbxMOSLandcornerLoc.SelectedIndex = (int)_DocVersionConfig.Print_MergedPdfsLandPageNumCorner;
}
private void InitEnhanced()
{