Continuous Action Summary logic

Added a LazyLoad that passes in the default value
This commit is contained in:
2015-10-23 18:13:53 +00:00
parent 17d4c2b26b
commit 8708d0bbfc
4 changed files with 114 additions and 12 deletions

View File

@@ -112,29 +112,41 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Step_FloatingFoldout");
}
}
//[Category("Step Attributes")]
//[DisplayName("Step Continuous Action Summary")]
//[RefreshProperties(RefreshProperties.All)]
//[Description("Step Continuous Action Summary")]
public bool Step_CAS
public string Step_CAS
{
get
{
string s = _Xp["Step", "ContActSum"];
//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;
//If there is no value in the config, then return null. This will tell us to check the step type and format flag (ExcludeFromContActSum).
if (s == string.Empty) return null;
return s;
}
set
{
string s = _Xp["Step", "ContActSum"];
if (value.ToString() == s) return;
_Xp["Step", "ContActSum"] = value.ToString();
if (value == s) return;
_Xp["Step", "ContActSum"] = value;
OnPropertyChanged("Step_CAS");
}
}
//// Alternate text to use on the Continuous Action Summary
//public string Step_AlternateContActSumText
//{
// get
// {
// string s = _Xp["Step", "AlternateContActSumText"];
// //If there is no value to get, then we use the actual step text
// if (s == string.Empty) return null;
// return s;
// }
// set
// {
// string s = _Xp["Step", "AlternateContActSumText"];
// if (value == s) return;
// _Xp["Step", "AlternateContActSumText"] = value;
// OnPropertyChanged("Step_AlternateContActSumText");
// }
//}
//[Category("Step Attributes")]
//[DisplayName("Step Placekeeper")]
//[RefreshProperties(RefreshProperties.All)]