This commit is contained in:
parent
9fd12948f4
commit
4d24f93f3a
@ -222,14 +222,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string s = _Xp["format", "columns"];
|
string s = _Xp["Format", "Columns"];
|
||||||
|
|
||||||
//If there is no value to get, then get the parent value (a.k.a. default value).
|
//If there is no value to get, then get the parent value (a.k.a. default value).
|
||||||
if (s == string.Empty)
|
if (s == string.Empty)
|
||||||
s = _Xp.ParentValue("format", "columns"); // get the parent value
|
s = _Xp.ParentValue("Format", "Columns"); // get the parent value
|
||||||
// If there is no parent value, then use the volian default
|
// If there is no parent value, then use the volian default
|
||||||
if (s == string.Empty)
|
if (s == string.Empty)
|
||||||
return FormatColumns.Default;// default to volian default
|
return FormatColumns.TwoColumn;// At the procedure level, default to Two column
|
||||||
|
|
||||||
return (FormatColumns)int.Parse(s);
|
return (FormatColumns)int.Parse(s);
|
||||||
}
|
}
|
||||||
@ -238,15 +238,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// if value being saved is same as the parent value, then clear the value (save blank). This will
|
// 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.
|
// reset the data to use the parent value.
|
||||||
|
|
||||||
string parval = _Xp.ParentValue("format", "columns"); // get the parent value
|
string parval = _Xp.ParentValue("Format", "Columns"); // 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)(FormatColumns.Default)).ToString();
|
parval = ((int)(FormatColumns.Default)).ToString();
|
||||||
|
|
||||||
if (parval.Equals(((int)value).ToString()))
|
if (parval.Equals(((int)value).ToString()))
|
||||||
_Xp["format", "columns"] = string.Empty; // reset to parent value
|
_Xp["Format", "Columns"] = string.Empty; // reset to parent value
|
||||||
else
|
else
|
||||||
_Xp["format", "columns"] = ((int)value).ToString(); // save selected value
|
_Xp["Format", "Columns"] = ((int)value).ToString(); // save selected value
|
||||||
|
|
||||||
OnPropertyChanged("Format_Columns");
|
OnPropertyChanged("Format_Columns");
|
||||||
}
|
}
|
||||||
|
@ -470,9 +470,29 @@ namespace VEPROMS.CSLA.Library
|
|||||||
rval = (int)MyDefaultFormat.MyStepSectionLayoutData.PMode;
|
rval = (int)MyDefaultFormat.MyStepSectionLayoutData.PMode;
|
||||||
//return (SectionColumnMode)rval;
|
//return (SectionColumnMode)rval;
|
||||||
}
|
}
|
||||||
// if no pmode is defined, i.e. rval = 0, then default to single column
|
// if no pmode is defined, i.e. rval = 0, then go up to the procedure level & get
|
||||||
// this is what 16bit ve-proms did.
|
// it's format column.
|
||||||
if (rval == 0) rval = 1;
|
if (rval == 0)
|
||||||
|
{
|
||||||
|
SectionInfo si = _SectionInfo != null? _SectionInfo: SectionInfo.Get(_Section.ItemID);
|
||||||
|
if (si != null)
|
||||||
|
{
|
||||||
|
switch (si.MyProcedure.ProcedureConfig.Format_Columns)
|
||||||
|
{
|
||||||
|
case FormatColumns.OneColumn:
|
||||||
|
return SectionColumnMode.One;
|
||||||
|
break;
|
||||||
|
case FormatColumns.TwoColumn:
|
||||||
|
return SectionColumnMode.Two;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return SectionColumnMode.One;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return SectionColumnMode.One; // 16bit's default if nothing defined
|
||||||
|
}
|
||||||
return (SectionColumnMode)rval;
|
return (SectionColumnMode)rval;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user