fixed Bookmark wording

debugged and fixed many issues in the property pages
This commit is contained in:
2010-06-04 19:24:52 +00:00
parent d0c1b9d2b2
commit 1dcda26a99
2 changed files with 175 additions and 19 deletions

View File

@@ -64,7 +64,8 @@ namespace VEPROMS.CSLA.Library
if (retval != string.Empty) return retval;
sect = (SectionInfo)sect.ActiveParent;
}
ProcedureInfo proc = (ProcedureInfo)sect.ActiveParent;
ProcedureInfo proc = ProcedureInfo.Get(((ItemInfo)sect.ActiveParent).ItemID);
//ProcedureInfo proc = (ProcedureInfo)sect.ActiveParent;
retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
if (retval != string.Empty) return retval;
while (proc.ActiveParent.GetType() == typeof(ProcedureInfo))
@@ -255,9 +256,11 @@ namespace VEPROMS.CSLA.Library
}
#endregion
#region SectionCategory // from sequence number in 16-bit database.
[TypeConverter(typeof(EnumDescConverter))]
public enum SectionPagination : int
{
Default = 0, Continuous, Separate
//Default = 0, Continuous, Separate
Continuous = 1, Separate = 2
}
[Category("Format")]
[DisplayName("Section Pagination")]
@@ -271,10 +274,13 @@ namespace VEPROMS.CSLA.Library
//If there is no value to get, then get the parent value (a.k.a. default value).
if (s == string.Empty)
s = _Xp.ParentValue("Section", "Pagination"); // get the parent value
// If there is no parent value, then use the volian default
s = _Xp.ParentValue("Section", "Pagination"); // get the parent value
//If there is no parent value, then use the volian default
if (s == string.Empty)
return SectionPagination.Default;// default to volian default
{
bool rval = MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.BreakOnSections;
return (rval)? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
}
return (SectionPagination)int.Parse(s);
}
@@ -286,7 +292,11 @@ namespace VEPROMS.CSLA.Library
string parval = _Xp.ParentValue("Section", "Pagination"); // get the parent value
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
parval = ((int)(SectionPagination.Default)).ToString();
{
bool rval = MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.BreakOnSections;
parval = (rval) ? ((int)(SectionPagination.Separate)).ToString() : ((int)(SectionPagination.Continuous)).ToString();
//parval = ((int)(SectionPagination.Default)).ToString();
}
if (parval.Equals(((int)value).ToString()))
_Xp["Section", "Pagination"] = string.Empty; // reset to parent value
@@ -387,7 +397,8 @@ namespace VEPROMS.CSLA.Library
[TypeConverter(typeof(EnumDescConverter))]
public enum SectionColumnMode : int
{
Default = 0,
//[Description("Format Default")]
//Default = 0,
[Description("Single Column")]
One = 1,
[Description("Dual Column")]
@@ -409,12 +420,20 @@ namespace VEPROMS.CSLA.Library
//If there is no value to get, then get the parent value (a.k.a. default value).
if (s == string.Empty)
s = _Xp.ParentValue("Section", "ColumnMode"); // get the parent value
s = _Xp.ParentValue("Section", "ColumnMode"); // get the parent value
// If there is no parent value, then use the volian default
if (s == string.Empty)
return SectionColumnMode.Default;// default to volian default
{
int rval = (int)MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PMode;
return (SectionColumnMode)rval;//SectionColumnMode.Two; //SectionColumnMode.Default;// default to volian default
}
else
return (SectionColumnMode)int.Parse(s);
return (SectionColumnMode)int.Parse(s);
//if (s == string.Empty)
// return SectionColumnMode.Default;
//return (SectionColumnMode)int.Parse(s);
}
set
{
@@ -424,7 +443,11 @@ namespace VEPROMS.CSLA.Library
string parval = _Xp.ParentValue("Section", "ColumnMode"); // get the parent value
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
parval = ((int)(SectionColumnMode.Default)).ToString();
{
int rval = (int)MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PMode;
parval = ((SectionColumnMode)rval).ToString();
//parval = ((int)(SectionColumnMode.Default)).ToString();
}
if (parval.Equals(((int)value).ToString()))
_Xp["Section", "ColumnMode"] = string.Empty; // reset to parent value
@@ -434,6 +457,139 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Section_ColumnMode");
}
}
//char * far printtypes[] = {
// "Compressed, 8 lines per inch",
// "Elite, 6 lines per inch",
// "Pica, 6 lines per inch",
// "Default font, 4 Lines Per Inch",
// "Default font, 6 Lines Per Inch",
// "Compressed 6 LPI",
// "Default font, 7 Lines Per Inch",
// "Special Landscape, Elite, 6 lines per inch"
//};
//[TypeConverter(typeof(EnumDescConverter))]
//public enum AttPrintSize : int
//{
// [Description("Compressed, 8 lines per inch")]
// Cmp8lpi = 0,
// [Description("Elite, 6 lines per inch")]
// Elite6lpi = 1,
// [Description("Pica, 6 lines per inch")]
// Pica6lpi = 2,
// [Description("Default font, 4 Lines Per Inch")]
// Def4lpi = 3,
// [Description("Default font, 6 Lines Per Inch")]
// Def6lpi = 4,
// [Description("Compressed 6 LPI")]
// Cmp6lpi = 5,
// [Description("Default font, 7 Lines Per Inch")]
// Def7lpi = 6,
// [Description("Landscape, Elite, 6 lines per inch")]
// landElite6lpi = 7
//}
//[Category("Format")]
//[DisplayName("Attachment PrintSize")]
//[RefreshProperties(RefreshProperties.All)]
//[Description("Attachment Print Size")]
//public AttPrintSize Section_AttachmentPrintSize
//{
// get
// {
// string lpiSettings = "*pP46f7L";
// string s = _Xp["Section", "OldType"];
// int idx = -1;
// //If there is no value to get, then get the parent value (a.k.a. default value).
// if (s == string.Empty)
// s = _Xp.ParentValue("Section", "OldType"); // get the parent value
// // If there is no parent value, then use the volian default
// if (s == string.Empty)
// return AttPrintSize.Def6lpi;// default to volian default
// idx = lpiSettings.IndexOf(s[1]);
// if (idx == -1) idx = 4;
// return (AttPrintSize)idx;
// //return (AttPrintSize)int.Parse(s);
// }
// set
// {
// // 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 lpiSettings = "*pP46f7L";
// string parval = _Xp.ParentValue("Section", "OldType"); // get the parent value
// StringBuilder sb = new StringBuilder();
// string curval = parval[1].ToString();
// sb.Append(parval[0]); // save first part of OldType
// if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
// {
// //parval = ((int)(AttPrintSize.Def6lpi)).ToString();
// //sb.Append(((int)(AttPrintSize.Def6lpi)).ToString());
// sb.Append(lpiSettings[(int)(AttPrintSize.Def6lpi)]);
// }
// if (curval.Equals(((int)value).ToString()))
// _Xp["Section", "OldType"] = string.Empty; // reset to parent value
// else
// {
// //sb.Append(((int)value).ToString());
// sb.Append(lpiSettings[(int)value]);
// _Xp["Section", "OldType"] = sb.ToString(); // save selected value
// }
// OnPropertyChanged("Section_AttachmentPrintSize");
// }
//}
/*
int chkOffType = (rid[0] & 0x007F) - '0';
if (chkOffType > 0)
ci.AddItem("Section", "CheckoffSelection", chkOffType.ToString());
if (stype.Length > 1)
{
int chkOffHeading = (stype[1] & 0x007F) - '0';
if (chkOffHeading > 0)
ci.AddItem("Section", "CheckoffHeading", chkOffHeading.ToString());
*/
[Category("Format")]
[DisplayName("Checkoff List Selection")]
[Description("Checkoff List Selection")]
public int Section_CheckoffListSelection
{
get
{
string s = _Xp["Section", "CheckoffSelection"];
if (s != null && !s.Equals(string.Empty))
return Convert.ToInt32(s);
return 0;
}
set
{
string s = value.ToString();
_Xp["Section", "CheckoffSelection"] = s;
}
}
[Category("Format")]
[DisplayName("Checkoff Header Selection")]
[Description("Checkoff Header Selection")]
public int Section_CheckoffHeaderSelection
{
get
{
string s = _Xp["Section", "CheckoffHeading"];
if (s != null && s.Equals(string.Empty))
return Convert.ToInt32(s);
return 0;
}
set
{
string s = value.ToString();
_Xp["Section", "CheckoffHeading"] = s;
}
}
#endregion
#region SubSectionCategory // from sequence number in 16-bit database.
[Category("SubSection")]