Added config support for AnnotationType
This commit is contained in:
parent
d635be8452
commit
9931c454f3
92
PROMS/VEPROMS.CSLA.Library/Config/AnnotationTypeConfig.cs
Normal file
92
PROMS/VEPROMS.CSLA.Library/Config/AnnotationTypeConfig.cs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace VEPROMS.CSLA.Library
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||||
|
public class AnnotationTypeConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
private XMLProperties _Xp;
|
||||||
|
private XMLProperties Xp
|
||||||
|
{
|
||||||
|
get { return _Xp; }
|
||||||
|
}
|
||||||
|
public AnnotationTypeConfig(string xml)
|
||||||
|
{
|
||||||
|
if (xml == string.Empty) xml = "<Config/>";
|
||||||
|
_Xp = new XMLProperties(xml);
|
||||||
|
}
|
||||||
|
public AnnotationTypeConfig(AnnotationTypeInfo ati)
|
||||||
|
{
|
||||||
|
string xml = ati.Config;
|
||||||
|
if (xml == string.Empty) xml = "<Config/>";
|
||||||
|
_Xp = new XMLProperties(xml);
|
||||||
|
}
|
||||||
|
public AnnotationTypeConfig(AnnotationType t)
|
||||||
|
{
|
||||||
|
string xml = t.Config;
|
||||||
|
if (xml == string.Empty) xml = "<Config/>";
|
||||||
|
_Xp = new XMLProperties(xml);
|
||||||
|
}
|
||||||
|
public AnnotationTypeConfig()
|
||||||
|
{
|
||||||
|
_Xp = new XMLProperties();
|
||||||
|
}
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
string s = _Xp.ToString();
|
||||||
|
if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
#region AnnotationTypeConfigProperties
|
||||||
|
[Category("Integration")] // Special Editor for Annotation Type
|
||||||
|
[DisplayName("Executable")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("Executable")]
|
||||||
|
public string Integration_Executable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _Xp["Integration", "Executable"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Xp["Integration", "Executable"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[Category("Integration")] // Pipe from PROMs to Special Editor
|
||||||
|
[DisplayName("PipeOut")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("PipeOut")]
|
||||||
|
public string Integration_PipeOut
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _Xp["Integration", "PipeOut"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Xp["Integration", "PipeOut"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[Category("Integration")] // Pipe to PROMs from Special Editor
|
||||||
|
[DisplayName("PipeIn")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("PipeIn")]
|
||||||
|
public string Integration_PipeIn
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _Xp["Integration", "PipeIn"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Xp["Integration", "PipeIn"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -53,9 +53,36 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
return _Name;
|
return _Name;
|
||||||
}
|
}
|
||||||
|
[NonSerialized]
|
||||||
|
private AnnotationTypeConfig _AnnotationTypeConfig;
|
||||||
|
public AnnotationTypeConfig AnnotationTypeConfig
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_AnnotationTypeConfig == null)
|
||||||
|
{
|
||||||
|
_AnnotationTypeConfig = new AnnotationTypeConfig(this);
|
||||||
|
}
|
||||||
|
return _AnnotationTypeConfig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public partial class AnnotationTypeInfo
|
public partial class AnnotationTypeInfo
|
||||||
{
|
{
|
||||||
|
[NonSerialized]
|
||||||
|
private AnnotationTypeConfig _AnnotationTypeConfig;
|
||||||
|
public AnnotationTypeConfig AnnotationTypeConfig
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_AnnotationTypeConfig == null)
|
||||||
|
{
|
||||||
|
_AnnotationTypeConfig = new AnnotationTypeConfig(this);
|
||||||
|
}
|
||||||
|
return _AnnotationTypeConfig;
|
||||||
|
}
|
||||||
|
}
|
||||||
public static List<AnnotationTypeInfo> AllList()
|
public static List<AnnotationTypeInfo> AllList()
|
||||||
{
|
{
|
||||||
//return _AllList;
|
//return _AllList;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user