- Replace slashes and backslashes with underscores in the pdf file name
- Use pdf name specified in the dialog Fixed properties so that procedures and sections can be open in the propertygrid without error
This commit is contained in:
parent
3c32f936c7
commit
ed8b4d11ee
@ -128,7 +128,7 @@ namespace VEPROMS
|
|||||||
//cbxPDF.Text = string.Format(@"{0}\{1}.pdf", _PDFPath, _ProcNum);
|
//cbxPDF.Text = string.Format(@"{0}\{1}.pdf", _PDFPath, _ProcNum);
|
||||||
// General 2 settings
|
// General 2 settings
|
||||||
//txbPDFLocation.Text = _PDFPath;
|
//txbPDFLocation.Text = _PDFPath;
|
||||||
txbPDFName.Text = string.Format("{0}.pdf", ProcNum);
|
txbPDFName.Text = string.Format("{0}.pdf", ProcNum.Replace('/','_').Replace('\\','_'));
|
||||||
ProcedureConfig pc = _MyProcedure.MyConfig as ProcedureConfig;
|
ProcedureConfig pc = _MyProcedure.MyConfig as ProcedureConfig;
|
||||||
if (pc != null)
|
if (pc != null)
|
||||||
{
|
{
|
||||||
@ -290,7 +290,7 @@ namespace VEPROMS
|
|||||||
// Determine change bar settings. First get from config & then see if override from dialog.
|
// Determine change bar settings. First get from config & then see if override from dialog.
|
||||||
// Also check that format allows override.
|
// Also check that format allows override.
|
||||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, VlnSettings.OldPDFFolder, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked,PDFPath, cbd);
|
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, VlnSettings.OldPDFFolder, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked,PDFPath, cbd, txbPDFName.Text);
|
||||||
frmStatus.ShowDialog();
|
frmStatus.ShowDialog();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,11 @@ namespace VEPROMS
|
|||||||
get { return _OpenPDF; }
|
get { return _OpenPDF; }
|
||||||
set { _OpenPDF = value; }
|
set { _OpenPDF = value; }
|
||||||
}
|
}
|
||||||
public frmPDFStatusForm(ItemInfo myItem, string rev, string revDate, string watermark, bool debugOutput, string backgroundFolder, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd)
|
public frmPDFStatusForm(ItemInfo myItem, string rev, string revDate, string watermark, bool debugOutput, string backgroundFolder, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd,string pdfFile)
|
||||||
{
|
{
|
||||||
OpenPDF = openPDF;
|
OpenPDF = openPDF;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, false, overWrite, cbd);//openPDF);
|
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, false, overWrite, cbd, pdfFile);//openPDF);
|
||||||
PDFPath = pdfPath;
|
PDFPath = pdfPath;
|
||||||
this.Text = "Creating PDF of " + myItem.DisplayNumber;
|
this.Text = "Creating PDF of " + myItem.DisplayNumber;
|
||||||
|
|
||||||
|
@ -467,6 +467,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private static int CountLevels(ItemInfo item)
|
private static int CountLevels(ItemInfo item)
|
||||||
{
|
{
|
||||||
int level = 0;
|
int level = 0;
|
||||||
|
if (item.IsProcedure) return 0;
|
||||||
int ignoreRNOs = item.ActiveSection.ColumnMode;
|
int ignoreRNOs = item.ActiveSection.ColumnMode;
|
||||||
while (item != null && !item.IsHigh)
|
while (item != null && !item.IsHigh)
|
||||||
{
|
{
|
||||||
@ -896,6 +897,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
// check config value on my section, if null/default use Pmode of active format
|
// check config value on my section, if null/default use Pmode of active format
|
||||||
|
if (ActiveSection != null)
|
||||||
|
{
|
||||||
SectionInfo si = SectionInfo.Get(ActiveSection.ItemID); //ActiveSection as SectionInfo;
|
SectionInfo si = SectionInfo.Get(ActiveSection.ItemID); //ActiveSection as SectionInfo;
|
||||||
if (si != null)
|
if (si != null)
|
||||||
{
|
{
|
||||||
@ -903,6 +906,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//if (si.SectionConfig.Section_ColumnMode != SectionConfig.SectionColumnMode.Default)
|
//if (si.SectionConfig.Section_ColumnMode != SectionConfig.SectionColumnMode.Default)
|
||||||
return (int)si.SectionConfig.Section_ColumnMode - 1;
|
return (int)si.SectionConfig.Section_ColumnMode - 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return (ActiveFormat.MyStepSectionLayoutData.PMode ?? 2) -1;
|
return (ActiveFormat.MyStepSectionLayoutData.PMode ?? 2) -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1011,7 +1015,9 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ItemInfo temp = FirstSibling;
|
ItemInfo temp = FirstSibling;
|
||||||
if(temp.ActiveParent.GetType() == typeof(VEPROMS.CSLA.Library.DocVersionInfo))return false;
|
if(temp.ActiveParent.GetType() == typeof(VEPROMS.CSLA.Library.DocVersionInfo))return false;
|
||||||
if (temp.MyParent.IsSection) return false; // already at hls
|
if (temp.MyParent.IsSection) return false; // already at hls
|
||||||
while (((ItemInfo)temp.ActiveParent).IsHigh == false) temp = ((ItemInfo)temp.ActiveParent).FirstSibling;
|
if (temp.IsProcedure || temp.IsSection) return false;
|
||||||
|
while (((ItemInfo)temp.ActiveParent).IsHigh == false)
|
||||||
|
temp = ((ItemInfo)temp.ActiveParent).FirstSibling;
|
||||||
return temp.IsStepPart;
|
return temp.IsStepPart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1144,7 +1150,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
public string ShortSearchPath
|
public string ShortSearchPath
|
||||||
{
|
{
|
||||||
get { return ConvertToDisplayText(Regex.Replace(_SearchPath, "\x11.*?\x07", "\x07")); }
|
get { return ConvertToDisplayText(Regex.Replace(_SearchPath ?? "", "\x11.*?\x07", "\x07")); }
|
||||||
}
|
}
|
||||||
internal int _SearchAnnotationID;
|
internal int _SearchAnnotationID;
|
||||||
public int SearchAnnotationID
|
public int SearchAnnotationID
|
||||||
@ -1686,6 +1692,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (IsHigh) _MyHLS = this;
|
if (IsHigh) _MyHLS = this;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(MyActiveParent is ItemInfo)
|
||||||
_MyHLS = ((ItemInfo)MyActiveParent).MyHLS;
|
_MyHLS = ((ItemInfo)MyActiveParent).MyHLS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1785,7 +1792,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_MyDocStyle == null)
|
if (_MyDocStyle == null && ActiveSection != null)
|
||||||
{
|
{
|
||||||
int typ = (int)ActiveSection.MyContent.Type;
|
int typ = (int)ActiveSection.MyContent.Type;
|
||||||
int subtyp = typ % 10000;
|
int subtyp = typ % 10000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user