diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-17 18:30:01 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-17 18:30:01 +0200 |
| commit | 41b76ea576cdece6c5a2f1feb936dfb4a2a9854a (patch) | |
| tree | 42c16725f61d0cfb1fef4c1016f3c0a15f130d3f /src/GraphicObjects/TemplatedControl.cs | |
| parent | 3aba832ca7c6f9da0e9be8f5060013a2bbc6d345 (diff) | |
Combobox
Diffstat (limited to 'src/GraphicObjects/TemplatedControl.cs')
| -rw-r--r-- | src/GraphicObjects/TemplatedControl.cs | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index 0599c6e3..4dbe21e5 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -28,37 +28,44 @@ using System.Diagnostics; namespace go { - [AttributeUsage(AttributeTargets.Class)] - public class DefaultTemplate : Attribute +// [AttributeUsage(AttributeTargets.Class)] + public class TemplateAttribute : Attribute { public string Path = ""; - public DefaultTemplate(string path) + public TemplateAttribute(string path) { Path = path; } } [AttributeUsage(AttributeTargets.Class)] - public class DefaultItemTemplate : Attribute + public class DefaultTemplate : TemplateAttribute { - public string Path = ""; - public DefaultItemTemplate(string path) - { - Path = path; - } + public DefaultTemplate(string path) : base(path){} + } + [AttributeUsage(AttributeTargets.Class)] + public class DefaultOverlayTemplate : TemplateAttribute + { + public DefaultOverlayTemplate(string path) : base(path){} + } + [AttributeUsage(AttributeTargets.Class)] + public class DefaultItemTemplate : TemplateAttribute + { + public DefaultItemTemplate(string path) : base(path){} } public abstract class TemplatedControl : PrivateContainer, IXmlSerializable { - public TemplatedControl () : base() - { - } + #region CTOR + public TemplatedControl () : base() {} + #endregion + + string _template; -// string _templatePath; -// [XmlAttributeAttribute()] -// public virtual string Template { -// get { return _templatePath; } -// set { _templatePath = value; } -// } + [XmlAttributeAttribute][DefaultValue("#go.Templates.Template.goml")] + public string Template { + get { return _template; } + set { _template = value; } + } #region GraphicObject overrides [XmlAttributeAttribute()][DefaultValue(-1)] @@ -110,7 +117,6 @@ namespace go } #region IXmlSerializable - public override System.Xml.Schema.XmlSchema GetSchema(){ return null; } public override void ReadXml(System.Xml.XmlReader reader) { @@ -165,16 +171,9 @@ namespace go } public override void WriteXml(System.Xml.XmlWriter writer) { - base.WriteXml(writer); -// -// if (child == null) -// return; -// -// writer.WriteStartElement(child.GetType().Name); -// (child as IXmlSerializable).WriteXml(writer); -// writer.WriteEndElement(); + //TODO: + throw new NotImplementedException(); } - #endregion } } |