Files
SourceCode/PROMS/VEPROMS.CSLA.Library/Config/TransitionConfig.cs
T
2026-08-28 11:15:35 -04:00

56 lines
1.4 KiB
C#

using System;
using System.ComponentModel;
namespace VEPROMS.CSLA.Library
{
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class TransitionConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
{
private readonly XMLProperties _Xp;
public TransitionConfig(string xml)
{
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
public TransitionConfig(TransitionInfo ti)
{
string xml = ti.Config;
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
public TransitionConfig(Transition t)
{
string xml = t.Config;
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
public TransitionConfig()
{
_Xp = new XMLProperties();
}
public override string ToString()
{
string s = _Xp.ToString();
return s == "<Config/>" || s == "<Config></Config>" ? string.Empty : s;
}
#region GeneralTransitionProperties
[Category("Formatted")] // format transition, i.e. include page number
[DisplayName("Formatted")]
[RefreshProperties(RefreshProperties.All)]
[Description("Formatted")]
public string Transition_Formatted
{
get
{
return _Xp["Transition", "Formatted"];
}
set
{
_Xp["Transition", "Formatted"] = value;
}
}
#endregion
}
}