Added checkboxes for Placekeepers and Phonelist

Supporting logic to save/retrieve Placekeeper and Phonelist information
Supporting logic to save/retrieve Placekeeper information
Added Placekeeper logic
Null reference fix
Logic to get PrintPhoneList flag
Rearranged the panel and added Placekeeper checkbox
This commit is contained in:
2014-04-08 21:02:43 +00:00
parent c926ddbe60
commit d41c675f6e
9 changed files with 610 additions and 462 deletions

View File

@@ -375,23 +375,58 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Section_TOC");
}
}
[Category("Section")]
//PROPGRID: Hide AutoGen
[DisplayName("Section AutoGen")]
[Category("General")]
// Placekeeper
[DisplayName("Placekeeper")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section AutoGen")]
public string Section_AutoGen
[Description("Include in Placekeeper")]
public string Section_Placekeeper
{
get
{
return _Xp["Section", "AutoGen"];
string tmp = _Xp["Section", "Placekeeper"];
return tmp == null || tmp == "" ? "N" : tmp;
}
set
{
_Xp["Section", "AutoGen"] = value;
OnPropertyChanged("Section_AutoGen");
_Xp["Section", "Placekeeper"] = value;
OnPropertyChanged("Section_Placekeeper");
}
}
// Phonelist
[DisplayName("PhoneList")]
[RefreshProperties(RefreshProperties.All)]
[Description("Include PhoneList")]
public string Section_PhoneList
{
get
{
string tmp = _Xp["Section", "PhoneList"];
return tmp == null || tmp == "" ? "N" : tmp;
}
set
{
_Xp["Section", "PhoneList"] = value;
OnPropertyChanged("Section_PhoneList");
}
}
//[Category("Section")]
////PROPGRID: Hide AutoGen
//[DisplayName("Section AutoGen")]
//[RefreshProperties(RefreshProperties.All)]
//[Description("Section AutoGen")]
//public string Section_AutoGen
//{
// get
// {
// return _Xp["Section", "AutoGen"];
// }
// set
// {
// _Xp["Section", "AutoGen"] = value;
// OnPropertyChanged("Section_AutoGen");
// }
//}
[Category("Section")]
//PROPGRID: Hide Subsection PH
[DisplayName("Section PrintHdr")]

View File

@@ -136,6 +136,29 @@ namespace VEPROMS.CSLA.Library
}
}
//[Category("Step Attributes")]
//[DisplayName("Step Placekeeper")]
//[RefreshProperties(RefreshProperties.All)]
//[Description("Step Placekeeper")]
public bool Step_Placekeeper
{
get
{
string s = _Xp["Step", "Placekeeper"];
//If there is no value to get, then get the parent value (a.k.a. default value).
if (s == string.Empty) return false;
if (s == "True") return true;
return false;
}
set
{
string s = _Xp["Step", "Placekeeper"];
if (value.ToString() == s) return;
_Xp["Step", "Placekeeper"] = value.ToString();
OnPropertyChanged("Step_Placekeeper");
}
}
//[Category("Step Attributes")]
//[DisplayName("Step Check Off Index")]
//[RefreshProperties(RefreshProperties.All)]
//[Description("Step Check Off Index")]

View File

@@ -631,6 +631,28 @@ namespace VEPROMS.CSLA.Library
(MyDocStyle.StructureStyle.Style & E_DocStructStyle.TableOfContents) == E_DocStructStyle.TableOfContents);
}
}
public bool IsPlacekeeperSection
{
get
{
if (!IsSection) return false;
if (MyDocStyle.StructureStyle.Style == null) return false;
return ((ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.AutoPlacekeeper) == E_PurchaseOptions.AutoPlacekeeper &&
(MyDocStyle.StructureStyle.Style & E_DocStructStyle.Placekeeper) == E_DocStructStyle.Placekeeper);
}
}
public bool CanSetPlacekeeper
{
get
{
SectionConfig scfg = (SectionConfig)MyActiveSection.MyConfig;
if (MyDocStyle.StructureStyle.Style == null || scfg == null) return false;
bool PlacekeepOption = ((ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.AutoPlacekeeper) == E_PurchaseOptions.AutoPlacekeeper)
&& scfg.Section_Placekeeper.Equals("Y");
//return (PlacekeepOption && IsHigh);
return (PlacekeepOption);
}
}
public bool MoreThanOneStepSection()
{
if (IsProcedure || IsSection) return false;

View File

@@ -173,8 +173,8 @@ namespace VEPROMS.CSLA.Library
private Dictionary<string, ROFSTLookup> dicLookups = new Dictionary<string, ROFSTLookup>();
public ROFSTLookup GetROFSTLookup(DocVersionInfo dvi)
{
string key = string.Format("{0}.{1}",dvi.DocVersionAssociations[0].ROFstID,dvi.DocVersionConfig.SelectedSlave);
if (!dicLookups.ContainsKey(key))
//string key = string.Format("{0}.{1}",dvi.DocVersionAssociations[0].ROFstID,dvi.DocVersionConfig.SelectedSlave);
string key = string.Format("{0}.{1}.{2}", ROFstID, dvi.DocVersionConfig.MaxSlaveIndex, dvi.DocVersionConfig.SelectedSlave); if (!dicLookups.ContainsKey(key))
dicLookups.Add(key, new ROFSTLookup(this, dvi));
return dicLookups[key];
}

View File

@@ -1708,6 +1708,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _UseMetaSections, "@UseMetaSections");
}
}
private LazyLoad<bool> _PrintPhoneList;
public bool PrintPhoneList
{
get
{
return LazyLoad(ref _PrintPhoneList, "@PrintPhoneList");
}
}
private LazyLoad<bool> _DefaultNoSubAutoIndent;
public bool DefaultNoSubAutoIndent
{