This commit is contained in:
John Jenko 2010-07-23 16:19:47 +00:00
parent e35448535d
commit f75455ce34

View File

@ -541,20 +541,20 @@ namespace Volian.Print.Library
} }
public class ChangeBarDefinition // anything that is section level should go in here. public class ChangeBarDefinition // anything that is section level should go in here.
{ {
private DocVersionConfig.PrintChangeBar _MyChangeBarType; private PrintChangeBar _MyChangeBarType;
public DocVersionConfig.PrintChangeBar MyChangeBarType public PrintChangeBar MyChangeBarType
{ {
get { return _MyChangeBarType; } get { return _MyChangeBarType; }
set { _MyChangeBarType = value; } set { _MyChangeBarType = value; }
} }
private DocVersionConfig.PrintChangeBarLoc _MyChangeBarLoc; private PrintChangeBarLoc _MyChangeBarLoc;
public DocVersionConfig.PrintChangeBarLoc MyChangeBarLoc public PrintChangeBarLoc MyChangeBarLoc
{ {
get { return _MyChangeBarLoc; } get { return _MyChangeBarLoc; }
set { _MyChangeBarLoc = value; } set { _MyChangeBarLoc = value; }
} }
private DocVersionConfig.PrintChangeBarText _MyChangeBarText; private PrintChangeBarText _MyChangeBarText;
public DocVersionConfig.PrintChangeBarText MyChangeBarText public PrintChangeBarText MyChangeBarText
{ {
get { return _MyChangeBarText; } get { return _MyChangeBarText; }
set { _MyChangeBarText = value; } set { _MyChangeBarText = value; }
@ -577,7 +577,7 @@ namespace Volian.Print.Library
public ChangeBarDefinition() public ChangeBarDefinition()
{ {
} }
public ChangeBarDefinition(DocVersionConfig.PrintChangeBar myCBT, DocVersionConfig.PrintChangeBarLoc myCBL, DocVersionConfig.PrintChangeBarText myCBTxt, string myCBMsg) public ChangeBarDefinition(PrintChangeBar myCBT, PrintChangeBarLoc myCBL, PrintChangeBarText myCBTxt, string myCBMsg)
{ {
_MyChangeBarType = myCBT; _MyChangeBarType = myCBT;
_MyChangeBarLoc = myCBL; _MyChangeBarLoc = myCBL;
@ -587,12 +587,12 @@ namespace Volian.Print.Library
{ {
// if there is not overridden data on the docversion, prompt user... // if there is not overridden data on the docversion, prompt user...
ChangeBarData changeBarData = formatInfo.PlantFormat.FormatData.ProcData.ChangeBarData; ChangeBarData changeBarData = formatInfo.PlantFormat.FormatData.ProcData.ChangeBarData;
if (docverConfig == null || docverConfig.Print_ChangeBar == DocVersionConfig.PrintChangeBar.SelectBeforePrinting) if (docverConfig == null || docverConfig.Print_ChangeBar == PrintChangeBar.SelectBeforePrinting)
{ {
// use these for now, i.e. this is what user would have selected from dialog. // use these for now, i.e. this is what user would have selected from dialog.
_MyChangeBarType = DocVersionConfig.PrintChangeBar.WithDefault; _MyChangeBarType = PrintChangeBar.WithDefault;
_MyChangeBarLoc = DocVersionConfig.PrintChangeBarLoc.OutsideBox; _MyChangeBarLoc = PrintChangeBarLoc.OutsideBox;
_MyChangeBarText = DocVersionConfig.PrintChangeBarText.None; _MyChangeBarText = PrintChangeBarText.None;
} }
else else
{ {
@ -600,21 +600,21 @@ namespace Volian.Print.Library
_MyChangeBarLoc = docverConfig.Print_ChangeBarLoc; _MyChangeBarLoc = docverConfig.Print_ChangeBarLoc;
_MyChangeBarText = docverConfig.Print_ChangeBarText; _MyChangeBarText = docverConfig.Print_ChangeBarText;
} }
if (_MyChangeBarType == DocVersionConfig.PrintChangeBar.WithDefault) // get data from format if (_MyChangeBarType == PrintChangeBar.WithDefault) // get data from format
{ {
_MyChangeBarText = changeBarData.ChangeBarMessage == "ChgID" ? DocVersionConfig.PrintChangeBarText.ChgID : _MyChangeBarText = changeBarData.ChangeBarMessage == "ChgID" ? PrintChangeBarText.ChgID :
changeBarData.ChangeBarMessage == "DateAndChgID" ? DocVersionConfig.PrintChangeBarText.DateChgID : changeBarData.ChangeBarMessage == "DateAndChgID" ? PrintChangeBarText.DateChgID :
changeBarData.ChangeBarMessage == "None" ? DocVersionConfig.PrintChangeBarText.None : changeBarData.ChangeBarMessage == "None" ? PrintChangeBarText.None :
changeBarData.ChangeBarMessage == "RevNum" ? DocVersionConfig.PrintChangeBarText.RevNum : DocVersionConfig.PrintChangeBarText.UserDef; changeBarData.ChangeBarMessage == "RevNum" ? PrintChangeBarText.RevNum : PrintChangeBarText.UserDef;
} }
if (_MyChangeBarType != DocVersionConfig.PrintChangeBar.Without) if (_MyChangeBarType != PrintChangeBar.Without)
{ {
// if the format has the absolutefixedchangecolumn format flag, then always use the fixedchangecolumn from the // if the format has the absolutefixedchangecolumn format flag, then always use the fixedchangecolumn from the
// format, otherwise, use the default column based on the selected location, stored in the base format. // format, otherwise, use the default column based on the selected location, stored in the base format.
_MyChangeBarColumn = (changeBarData.AbsoluteFixedChangeColumn) ? _MyChangeBarColumn = (changeBarData.AbsoluteFixedChangeColumn) ?
(int)changeBarData.FixedChangeColumn : (int)changeBarData.FixedChangeColumn :
System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ".ToCharArray())[System.Convert.ToInt32(_MyChangeBarLoc)]); System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ".ToCharArray())[System.Convert.ToInt32(_MyChangeBarLoc)]);
if (_MyChangeBarText == DocVersionConfig.PrintChangeBarText.UserDef) if (_MyChangeBarText == PrintChangeBarText.UserDef)
_MyChangeBarMessage = docverConfig.Print_UserCBMess1 + @"\n" + docverConfig.Print_UserCBMess2; _MyChangeBarMessage = docverConfig.Print_UserCBMess1 + @"\n" + docverConfig.Print_UserCBMess2;
} }