|
|
|
|
@@ -29,6 +29,7 @@ namespace VEPROMS
|
|
|
|
|
private List<MiniConfig> _DeletedApples;
|
|
|
|
|
private List<EnhancedMiniConfig> _Enhanced;
|
|
|
|
|
private DocVersionConfig _DocVersionConfig;
|
|
|
|
|
private string _OrgPDFPath; // B2024-030 used to save last PDF path
|
|
|
|
|
|
|
|
|
|
// Default values
|
|
|
|
|
private string _DefaultFormatName = null;
|
|
|
|
|
@@ -97,6 +98,7 @@ namespace VEPROMS
|
|
|
|
|
|
|
|
|
|
_Initializing = true;
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
_OrgPDFPath = _DocVersionConfig.Print_PDFLocation; // B2024-030 save last PDF path
|
|
|
|
|
btnGeneral.PerformClick(); // always start with General tab or button
|
|
|
|
|
_Initializing = false;
|
|
|
|
|
|
|
|
|
|
@@ -323,8 +325,6 @@ namespace VEPROMS
|
|
|
|
|
tiApplicability.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ppTxtBxPDFLoc.TextChanged += new EventHandler(ppTxtBxPDFLoc_TextChanged);
|
|
|
|
|
|
|
|
|
|
//end add new applicability stuff
|
|
|
|
|
lblProcSetRev.Visible = ppRTxtProcSetRev.Visible = _DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.MyStepSectionPrintData.UseXtraRevNumber;
|
|
|
|
|
|
|
|
|
|
@@ -538,11 +538,32 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The following code was added to fix Bug B2013-117
|
|
|
|
|
private void ppTxtBxPDFLoc_TextChanged(object sender, EventArgs e)
|
|
|
|
|
//B2024-030 Check the PDF Location path and prompt to create the folders if needed
|
|
|
|
|
private void CheckPDFLocationPath()
|
|
|
|
|
{
|
|
|
|
|
if (_Initializing == false)
|
|
|
|
|
_DocVersionConfig.Print_PDFLocation = ppTxtBxPDFLoc.Text;
|
|
|
|
|
string pdfloc = ppTxtBxPDFLoc.Text;
|
|
|
|
|
if (pdfloc == string.Empty) return;
|
|
|
|
|
if (!Directory.Exists(ppTxtBxPDFLoc.Text))
|
|
|
|
|
{
|
|
|
|
|
string msg = string.Format(" The Folder: '{0}' does not exist. \n\nCreate it?", ppTxtBxPDFLoc.Text);
|
|
|
|
|
DialogResult dr = MessageBox.Show(msg, "PDF Location Folder Not Found", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
|
|
if (dr == DialogResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Directory.CreateDirectory(ppTxtBxPDFLoc.Text);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Error trying to create folder", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
_DocVersionConfig.Print_PDFLocation = _OrgPDFPath; // reset to the path we started with
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_DocVersionConfig.Print_PDFLocation = _OrgPDFPath; // reset to the path we started with
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string AddSlaveNode(MiniConfig mc)
|
|
|
|
|
@@ -588,6 +609,9 @@ namespace VEPROMS
|
|
|
|
|
|
|
|
|
|
private void btnVersionsPropOK_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//B2024-030 Check the PDF Location path and prompt to create the folders if needed
|
|
|
|
|
CheckPDFLocationPath();
|
|
|
|
|
|
|
|
|
|
docVersionConfigBindingSource.EndEdit(); // need to end the edit session first or any format selection chanage will not stick B2015-157
|
|
|
|
|
|
|
|
|
|
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
|
|
|
|
|
@@ -773,7 +797,6 @@ namespace VEPROMS
|
|
|
|
|
|
|
|
|
|
// B2019-132 update the association count for this working draft
|
|
|
|
|
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.RefreshDocVersionAssociations();
|
|
|
|
|
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|