This commit is contained in:
@@ -175,18 +175,41 @@ namespace VEPROMS.CSLA.Library
|
||||
[Category("Format")]
|
||||
[DisplayName("Format")]
|
||||
[Description("Format")]
|
||||
[TypeConverter(typeof(FormatList))]
|
||||
[TypeConverter(typeof(FormatList))]
|
||||
public string FormatSelection
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Section != null && _Section.MyContent.MyFormat != null) return _Section.MyContent.MyFormat.PlantFormat.FormatData.Name;
|
||||
if (_SectionInfo != null && _SectionInfo.MyContent.MyFormat != null) return _SectionInfo.MyContent.MyFormat.PlantFormat.FormatData.Name;
|
||||
if (_Section != null && _Section.MyContent.MyFormat != null) return _Section.MyContent.MyFormat.FullName;
|
||||
if (_SectionInfo != null && _SectionInfo.MyContent.MyFormat != null) return _SectionInfo.MyContent.MyFormat.FullName;
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_Section != null) _Section.MyContent.MyFormat = FormatList.ToFormat(value); // Can only be set if _DocVersion is set
|
||||
if (_Section != null)
|
||||
{
|
||||
_Section.MyContent.MyFormat = FormatList.ToFormat(value); // Can only be set if _DocVersion is set
|
||||
_Section.ActiveFormat = null;
|
||||
DocStyleListConverter.MySection = _Section;
|
||||
}
|
||||
}
|
||||
}
|
||||
[Browsable(false)]
|
||||
public FormatInfo MyFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Section != null)
|
||||
{
|
||||
SectionInfo sectionInfo = SectionInfo.Get(_Section.ItemID);
|
||||
return sectionInfo.LocalFormat;
|
||||
}
|
||||
return _SectionInfo.LocalFormat;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_Section != null)
|
||||
_Section.MyContent.MyFormat = value == null ? null : value.Get();
|
||||
}
|
||||
}
|
||||
[Category("Format")]
|
||||
@@ -197,11 +220,64 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Section != null && _Section.ActiveParent != null && _Section.ActiveParent.ActiveFormat != null) return _Section.ActiveParent.ActiveFormat.PlantFormat.FormatData.Name;
|
||||
if (_SectionInfo != null && _SectionInfo.MyParent != null && _SectionInfo.MyParent.ActiveFormat != null) return _SectionInfo.MyParent.ActiveFormat.PlantFormat.FormatData.Name;
|
||||
if (_Section != null && _Section.ActiveParent != null && _Section.ActiveParent.ActiveFormat != null) return _Section.ActiveParent.ActiveFormat.FullName;
|
||||
if (_SectionInfo != null && _SectionInfo.MyParent != null && _SectionInfo.MyParent.ActiveFormat != null) return _SectionInfo.MyParent.ActiveFormat.FullName;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
[Browsable(false)]
|
||||
public FormatInfo MyDefaultFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Section != null)
|
||||
{
|
||||
SectionInfo sectionInfo = SectionInfo.Get(_Section.ItemID);
|
||||
return sectionInfo.ActiveParent.ActiveFormat;
|
||||
}
|
||||
return _SectionInfo.ActiveParent.ActiveFormat;
|
||||
}
|
||||
}
|
||||
//[Browsable(false)]
|
||||
[Category("Format")]
|
||||
[DisplayName("Section Type")]
|
||||
[Description("Section Type")]
|
||||
[TypeConverter(typeof(DocStyleListConverter))]
|
||||
public string MySectionType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Section != null)
|
||||
{
|
||||
return DocStyleListConverter.ToString(_Section.MyContent.Type);
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_Section != null)
|
||||
_Section.MyContent.Type = DocStyleListConverter.ToSectionType(value);
|
||||
}
|
||||
}
|
||||
[Browsable(false)]
|
||||
public int? SectionType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Section != null)
|
||||
{
|
||||
return _Section.MyContent.Type-10000;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_Section != null)
|
||||
_Section.MyContent.Type = value+10000;
|
||||
}
|
||||
}
|
||||
public Section MySection
|
||||
{ get { return _Section; } }
|
||||
#endregion
|
||||
#region ToString
|
||||
public override string ToString()
|
||||
@@ -331,7 +407,7 @@ namespace VEPROMS.CSLA.Library
|
||||
Default = 0,
|
||||
[Description("Single Column")]
|
||||
One,
|
||||
[Description("Duel Column")]
|
||||
[Description("Dual Column")]
|
||||
Two,
|
||||
[Description("Triple Column")]
|
||||
Three,
|
||||
|
Reference in New Issue
Block a user