This commit is contained in:
parent
de1c6dd937
commit
23a0857051
@ -150,6 +150,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
public DocVersion MyDocVersion
|
public DocVersion MyDocVersion
|
||||||
{ get { return _DocVersion; } }
|
{ get { return _DocVersion; } }
|
||||||
|
private bool _SaveChangesToDocVersionConfig = true;
|
||||||
|
|
||||||
|
public bool SaveChangesToDocVersionConfig
|
||||||
|
{
|
||||||
|
get { return _SaveChangesToDocVersionConfig; }
|
||||||
|
set { _SaveChangesToDocVersionConfig = value; }
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region ToString
|
#region ToString
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
@ -398,20 +405,23 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
if (_SaveChangesToDocVersionConfig)
|
||||||
// reset the data to use the parent value.
|
{
|
||||||
|
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
||||||
|
// reset the data to use the parent value.
|
||||||
|
|
||||||
string parval = _Xp.ParentValue("PrintSettings", "ChangeBar"); // get the parent value
|
string parval = _Xp.ParentValue("PrintSettings", "ChangeBar"); // get the parent value
|
||||||
|
|
||||||
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
||||||
parval = ((int)(PrintChangeBar.SelectBeforePrinting)).ToString();
|
parval = ((int)(PrintChangeBar.SelectBeforePrinting)).ToString();
|
||||||
|
|
||||||
if (parval.Equals(((int)value).ToString()))
|
if (parval.Equals(((int)value).ToString()))
|
||||||
_Xp["PrintSettings", "ChangeBar"] = string.Empty; // reset to parent value
|
_Xp["PrintSettings", "ChangeBar"] = string.Empty; // reset to parent value
|
||||||
else
|
else
|
||||||
_Xp["PrintSettings", "ChangeBar"] = ((int)value).ToString(); // save selected value
|
_Xp["PrintSettings", "ChangeBar"] = ((int)value).ToString(); // save selected value
|
||||||
|
|
||||||
OnPropertyChanged("Print_ChangeBar");
|
OnPropertyChanged("Print_ChangeBar");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// User Specified Change Bar Location from16-bit code:
|
// User Specified Change Bar Location from16-bit code:
|
||||||
@ -452,20 +462,23 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
if (_SaveChangesToDocVersionConfig)
|
||||||
// reset the data to use the parent value.
|
{
|
||||||
|
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
||||||
|
// reset the data to use the parent value.
|
||||||
|
|
||||||
string parval = _Xp.ParentValue("PrintSettings", "ChangeBarLoc"); // get the parent value
|
string parval = _Xp.ParentValue("PrintSettings", "ChangeBarLoc"); // get the parent value
|
||||||
|
|
||||||
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
||||||
parval = ((int)(PrintChangeBarLoc.WithText)).ToString();
|
parval = ((int)(PrintChangeBarLoc.WithText)).ToString();
|
||||||
|
|
||||||
if (parval.Equals(((int)value).ToString()))
|
if (parval.Equals(((int)value).ToString()))
|
||||||
_Xp["PrintSettings", "ChangeBarLoc"] = string.Empty; // reset to parent value
|
_Xp["PrintSettings", "ChangeBarLoc"] = string.Empty; // reset to parent value
|
||||||
else
|
else
|
||||||
_Xp["PrintSettings", "ChangeBarLoc"] = ((int)value).ToString(); // save selected value
|
_Xp["PrintSettings", "ChangeBarLoc"] = ((int)value).ToString(); // save selected value
|
||||||
|
|
||||||
OnPropertyChanged("Print_ChangeBarLoc");
|
OnPropertyChanged("Print_ChangeBarLoc");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,20 +522,23 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
if (_SaveChangesToDocVersionConfig)
|
||||||
// reset the data to use the parent value.
|
{
|
||||||
|
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
||||||
|
// reset the data to use the parent value.
|
||||||
|
|
||||||
string parval = _Xp.ParentValue("PrintSettings", "ChangeBarText"); // get the parent value
|
string parval = _Xp.ParentValue("PrintSettings", "ChangeBarText"); // get the parent value
|
||||||
|
|
||||||
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
||||||
parval = ((int)(PrintChangeBarText.DateChgID)).ToString();
|
parval = ((int)(PrintChangeBarText.DateChgID)).ToString();
|
||||||
|
|
||||||
if (parval.Equals(((int)value).ToString()))
|
if (parval.Equals(((int)value).ToString()))
|
||||||
_Xp["PrintSettings", "ChangeBarText"] = string.Empty; // reset to parent value
|
_Xp["PrintSettings", "ChangeBarText"] = string.Empty; // reset to parent value
|
||||||
else
|
else
|
||||||
_Xp["PrintSettings", "ChangeBarText"] = ((int)value).ToString(); // save selected value
|
_Xp["PrintSettings", "ChangeBarText"] = ((int)value).ToString(); // save selected value
|
||||||
|
|
||||||
OnPropertyChanged("Print_ChangeBarText");
|
OnPropertyChanged("Print_ChangeBarText");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[Category("Format Settings")]
|
[Category("Format Settings")]
|
||||||
@ -546,20 +562,23 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
if (_SaveChangesToDocVersionConfig)
|
||||||
// reset the data to use the parent value.
|
{
|
||||||
|
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
||||||
|
// reset the data to use the parent value.
|
||||||
|
|
||||||
string parval = _Xp.ParentValue("PrintSettings", "usercbmess1"); // get the parent value
|
string parval = _Xp.ParentValue("PrintSettings", "usercbmess1"); // get the parent value
|
||||||
|
|
||||||
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
||||||
parval = "";
|
parval = "";
|
||||||
|
|
||||||
if (parval.Equals(value))
|
if (parval.Equals(value))
|
||||||
_Xp["PrintSettings", "usercbmess1"] = string.Empty; // reset to parent value
|
_Xp["PrintSettings", "usercbmess1"] = string.Empty; // reset to parent value
|
||||||
else
|
else
|
||||||
_Xp["PrintSettings", "usercbmess1"] = value; // save selected value
|
_Xp["PrintSettings", "usercbmess1"] = value; // save selected value
|
||||||
|
|
||||||
OnPropertyChanged("Print_UserCBMess1");
|
OnPropertyChanged("Print_UserCBMess1");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[Category("Format Settings")]
|
[Category("Format Settings")]
|
||||||
@ -583,20 +602,23 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
if (_SaveChangesToDocVersionConfig)
|
||||||
// reset the data to use the parent value.
|
{
|
||||||
|
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
||||||
|
// reset the data to use the parent value.
|
||||||
|
|
||||||
string parval = _Xp.ParentValue("PrintSettings", "usercbmess2"); // get the parent value
|
string parval = _Xp.ParentValue("PrintSettings", "usercbmess2"); // get the parent value
|
||||||
|
|
||||||
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
||||||
parval = "";
|
parval = "";
|
||||||
|
|
||||||
if (parval.Equals(value))
|
if (parval.Equals(value))
|
||||||
_Xp["PrintSettings", "usercbmess2"] = string.Empty; // reset to parent value
|
_Xp["PrintSettings", "usercbmess2"] = string.Empty; // reset to parent value
|
||||||
else
|
else
|
||||||
_Xp["PrintSettings", "usercbmess2"] = value; // save selected value
|
_Xp["PrintSettings", "usercbmess2"] = value; // save selected value
|
||||||
|
|
||||||
OnPropertyChanged("Print_UserCBMess2");
|
OnPropertyChanged("Print_UserCBMess2");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[Category("Print Settings")]
|
[Category("Print Settings")]
|
||||||
@ -670,8 +692,67 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_Xp["PrintSettings", "PDFLocation"] = value; // save selected value
|
if (_SaveChangesToDocVersionConfig)
|
||||||
OnPropertyChanged("Print_PDFLocation");
|
{
|
||||||
|
_Xp["PrintSettings", "PDFLocation"] = value; // save selected value
|
||||||
|
OnPropertyChanged("Print_PDFLocation");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[Category("Print Settings")]
|
||||||
|
[DisplayName("AlwaysOverwritePDF")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("Always Overwrite PDF File")]
|
||||||
|
public bool Print_AlwaysOverwritePDF
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string s = _Xp["PrintSettings", "AlwaysOverwritePDF"];
|
||||||
|
|
||||||
|
// If there is no value, then default to false
|
||||||
|
if (s == string.Empty)
|
||||||
|
s = "false"; // default
|
||||||
|
|
||||||
|
return bool.Parse(s);
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_SaveChangesToDocVersionConfig)
|
||||||
|
{
|
||||||
|
string parval = _Xp.ParentValue("PrintSettings", "AlwaysOverwritePDF");
|
||||||
|
|
||||||
|
_Xp["PrintSettings", "AlwaysOverwritePDF"] = value.ToString();
|
||||||
|
|
||||||
|
OnPropertyChanged("Print_AlwaysOverwritePDF");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[Category("Print Settings")]
|
||||||
|
[DisplayName("AlwaysViewPDFAfterCreate")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("Always View PDF File After Create")]
|
||||||
|
public bool Print_AlwaysViewPDFAfterCreate
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string s = _Xp["PrintSettings", "AlwaysViewPDFAfterCreate"];
|
||||||
|
|
||||||
|
// If there is no value, then default to false
|
||||||
|
if (s == string.Empty)
|
||||||
|
s = "false"; // default
|
||||||
|
|
||||||
|
return bool.Parse(s);
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_SaveChangesToDocVersionConfig)
|
||||||
|
{
|
||||||
|
string parval = _Xp.ParentValue("PrintSettings", "AlwaysViewPDFAfterCreate");
|
||||||
|
|
||||||
|
_Xp["PrintSettings", "AlwaysViewPDFAfterCreate"] = value.ToString();
|
||||||
|
|
||||||
|
OnPropertyChanged("Print_AlwaysViewPDFAfterCreate");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user