This commit is contained in:
Kathy Ruffing 2012-09-12 13:03:59 +00:00
parent fdf285fea4
commit 445b71ac38
2 changed files with 93 additions and 0 deletions

View File

@ -227,6 +227,29 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Graphics_defaultext"); OnPropertyChanged("Graphics_defaultext");
} }
} }
[Category("Referenced Objects")]
[DisplayName("Images Zipped")]
[RefreshProperties(RefreshProperties.All)]
[Description("Images Stored as Zipped")]
public bool Images_zipped
{
get
{
string s = _Xp["Images", "zipped"];// get the saved value
//Dont't bother getting parent value, this is stored on 'top' node when the images
// are zipped.
if (s == string.Empty)
return false;
if (s.ToUpper() == "TRUE") return true;
return false;
}
set
{
_Xp["Images", "zipped"] = value?"TRUE":"FALSE";
OnPropertyChanged("Images_zipped");
}
}
#endregion #endregion
//#region ColorCategory // From veproms.ini //#region ColorCategory // From veproms.ini
//// ** Note that not all possibilities from 16-bit will be added here, until //// ** Note that not all possibilities from 16-bit will be added here, until

View File

@ -0,0 +1,70 @@
using System;
using System.ComponentModel;
namespace VEPROMS.CSLA.Library
{
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ROImageConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
{
#region DynamicTypeDescriptor
internal override bool IsReadOnly
{
get { return _ROImageInfo == null; }
}
#endregion
#region XML
private XMLProperties _Xp;
private XMLProperties Xp
{
get { return _Xp; }
}
#endregion
#region Constructors
private ROImageInfo _ROImageInfo;
public ROImageConfig(ROImageInfo rOImageInfo)
{
_ROImageInfo = rOImageInfo;
string xml = rOImageInfo.Config;
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
public ROImageConfig()
{
string xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
internal string GetValue(string group, string item)
{
return _Xp[group, item];
}
#endregion
#region Local Properties
[Category("Image")]
[Browsable(false)]
[DisplayName("Size")]
[RefreshProperties(RefreshProperties.All)]
[Description("Size")]
public string Image_Size
{
get
{
return _Xp["Image", "Size"];
}
set
{
_Xp["Image", "Size"] = value;
OnPropertyChanged("Image_Size");
}
}
#endregion
#region ToString
public override string ToString()
{
string s = _Xp.ToString();
if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
return s;
}
#endregion
}
}