本文整理汇总了C#中DotNetNuke.UI.WebControls.PropertyEditorEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PropertyEditorEventArgs类的具体用法?C# PropertyEditorEventArgs怎么用?C# PropertyEditorEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyEditorEventArgs类属于DotNetNuke.UI.WebControls命名空间,在下文中一共展示了PropertyEditorEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateValue
public virtual bool UpdateValue( PropertyEditorEventArgs e )
{
string key;
string name = e.Name;
object oldValue = e.OldValue;
object newValue = e.Value;
object stringValue = e.StringValue;
bool _IsDirty = Null.NullBoolean;
Hashtable settings = (Hashtable)DataSource;
IDictionaryEnumerator settingsEnumerator = settings.GetEnumerator();
while (settingsEnumerator.MoveNext())
{
key = Convert.ToString(settingsEnumerator.Key);
//Do we have the item in the Hashtable being changed
if (key == name)
{
//Set the Value property to the new value
if (!(newValue == oldValue))
{
settings[key] = newValue;
_IsDirty = true;
break;
}
}
}
return _IsDirty;
}
示例2: ctlSkin_ItemDeleted
protected void ctlSkin_ItemDeleted(object sender, PropertyEditorEventArgs e)
{
if (e.Key != null)
{
SkinController.DeleteSkin(Convert.ToInt32(e.Key));
}
BindSkin();
}
示例3: OnDataChanged
protected override void OnDataChanged(EventArgs e)
{
var args = new PropertyEditorEventArgs(Name);
args.Value = TimeZoneInfo.FindSystemTimeZoneById(StringValue);
args.OldValue = OldStringValue;
args.StringValue = StringValue;
base.OnValueChanged(args);
}
示例4: OnDataChanged
/// <Summary>
/// OnDataChanged runs when the PostbackData has changed. It raises the ValueChanged
/// Event
/// </Summary>
protected override void OnDataChanged( EventArgs e )
{
PropertyEditorEventArgs args = new PropertyEditorEventArgs( Name );
args.Value = StringValue;
args.OldValue = OldStringValue;
args.StringValue = StringValue;
base.OnValueChanged( args );
}
示例5: ctlSkin_ItemAdded
protected void ctlSkin_ItemAdded(object sender, PropertyEditorEventArgs e)
{
if (!string.IsNullOrEmpty(e.StringValue))
{
SkinPackageInfo skin = SkinController.GetSkinByPackageID(PackageID);
SkinController.AddSkin(skin.SkinPackageID, e.StringValue);
}
BindSkin();
}
示例6: OnDataChanged
/// <Summary>
/// OnDataChanged runs when the PostbackData has changed. It raises the ValueChanged
/// Event
/// </Summary>
protected override void OnDataChanged( EventArgs e )
{
int intValue = Convert.ToInt32(Value);
int intOldValue = Convert.ToInt32(OldValue);
PropertyEditorEventArgs args = new PropertyEditorEventArgs(Name);
args.Value = Enum.ToObject(EnumType, intValue);
args.OldValue = Enum.ToObject(EnumType, intOldValue);
base.OnValueChanged(args);
}
示例7: OnDataChanged
/// <Summary>
/// OnDataChanged runs when the PostbackData has changed. It raises the ValueChanged
/// Event
/// </Summary>
protected override void OnDataChanged( EventArgs e )
{
string strValue = Convert.ToString(Value);
string strOldValue = Convert.ToString(OldValue);
PropertyEditorEventArgs args = new PropertyEditorEventArgs(Name);
args.Value = this.Page.Server.HtmlEncode(strValue);
args.OldValue = this.Page.Server.HtmlEncode(strOldValue);
args.StringValue = this.Page.Server.HtmlEncode(StringValue);
base.OnValueChanged(args);
}
示例8: UpdateValue
public bool UpdateValue(PropertyEditorEventArgs e)
{
string NameDataField = Convert.ToString(FieldNames["Name"]);
string ValueDataField = Convert.ToString(FieldNames["Value"]);
PropertyInfo objProperty;
string PropertyName = "";
bool changed = e.Changed;
string name = e.Name;
object oldValue = e.OldValue;
object newValue = e.Value;
object stringValue = e.StringValue;
bool _IsDirty = Null.NullBoolean;
//Get the Name Property
objProperty = DataSource.GetType().GetProperty(NameDataField);
if (objProperty != null)
{
PropertyName = Convert.ToString(objProperty.GetValue(DataSource, null));
//Do we have the item in the IEnumerable Collection being changed
PropertyName = PropertyName.Replace(" ", "_");
if (PropertyName == name)
{
//Get the Value Property
objProperty = DataSource.GetType().GetProperty(ValueDataField);
//Set the Value property to the new value
if ((!(ReferenceEquals(newValue, oldValue))) || changed)
{
if (objProperty.PropertyType.FullName == "System.String")
{
objProperty.SetValue(DataSource, stringValue, null);
}
else
{
objProperty.SetValue(DataSource, newValue, null);
}
_IsDirty = true;
}
}
}
return _IsDirty;
}
示例9: UpdateValue
public bool UpdateValue(PropertyEditorEventArgs e)
{
bool changed = e.Changed;
object oldValue = e.OldValue;
object newValue = e.Value;
bool _IsDirty = Null.NullBoolean;
if (DataSource != null)
{
PropertyInfo objProperty = DataSource.GetType().GetProperty(e.Name);
if (objProperty != null)
{
if ((!(ReferenceEquals(newValue, oldValue))) || changed)
{
objProperty.SetValue(DataSource, newValue, null);
_IsDirty = true;
}
}
}
return _IsDirty;
}
示例10: OnItemChanged
void OnItemChanged(object sender, PropertyEditorEventArgs e)
{
var regionContainer = ControlUtilities.FindControl<Control>(Parent, "Region", true);
if (regionContainer != null)
{
var regionControl = ControlUtilities.FindFirstDescendent<DNNRegionEditControl>(regionContainer);
if (regionControl != null)
{
var listController = new ListController();
var countries = listController.GetListEntryInfoItems("Country");
foreach (var checkCountry in countries)
{
if (checkCountry.Text == e.StringValue)
{
var attributes = new object[1];
attributes[0] = new ListAttribute("Region", "Country." + checkCountry.Value, ListBoundField.Text, ListBoundField.Text);
regionControl.CustomAttributes = attributes;
break;
}
}
}
}
}
示例11: OnDataChanged
/// -----------------------------------------------------------------------------
/// <summary>
/// OnDataChanged runs when the PostbackData has changed. It raises the ValueChanged
/// Event
/// </summary>
/// <history>
/// [cnurse] 02/05/2008 created
/// </history>
/// -----------------------------------------------------------------------------
protected override void OnDataChanged(EventArgs e)
{
var args = new PropertyEditorEventArgs(Name);
args.Value = DictionaryValue;
args.OldValue = OldDictionaryValue;
args.StringValue = "";
args.Changed = true;
base.OnValueChanged(args);
}
示例12: UpdateVisibility
public virtual bool UpdateVisibility( PropertyEditorEventArgs e )
{
string NameDataField = Convert.ToString(FieldNames["Name"]);
string VisibilityDataField = Convert.ToString(FieldNames["Visibility"]);
PropertyInfo objProperty;
string PropertyName = "";
string name = e.Name;
object newValue = e.Value;
bool _IsDirty = Null.NullBoolean;
//Get the Name Property
objProperty = DataSource.GetType().GetProperty(NameDataField);
if (objProperty != null)
{
PropertyName = Convert.ToString(objProperty.GetValue(DataSource, null));
//Do we have the item in the IEnumerable Collection being changed
if (PropertyName == name)
{
//Get the Visibility Property
objProperty = DataSource.GetType().GetProperty(VisibilityDataField);
//Set the Visibility property to the new value
objProperty.SetValue(DataSource, newValue, null);
_IsDirty = true;
}
}
return _IsDirty;
}
示例13: OnValueChanged
/// <Summary>
/// OnValueChanged runs when the Value has changed. It raises the ValueChanged
/// Event
/// </Summary>
protected virtual void OnValueChanged( PropertyEditorEventArgs e )
{
if (ValueChangedEvent != null)
{
ValueChangedEvent(this, e);
}
}
示例14: RaisePostDataChangedEvent
/// <summary>
/// RaisePostDataChangedEvent runs when the PostBackData has changed. It triggers
/// a ValueChanged Event
/// </summary>
/// <history>
/// [cnurse] 05/03/2006 created
/// </history>
public void RaisePostDataChangedEvent()
{
//Raise the VisibilityChanged Event
var args = new PropertyEditorEventArgs(Name) {Value = Value};
OnVisibilityChanged(args);
}
示例15: OnVisibilityChanged
/// <summary>
/// OnVisibilityChanged runs when the Visibility has changed. It raises the VisibilityChanged
/// Event
/// </summary>
/// <history>
/// [cnurse] 05/03/2006 created
/// </history>
protected virtual void OnVisibilityChanged(PropertyEditorEventArgs e)
{
if (VisibilityChanged != null)
{
VisibilityChanged(this, e);
}
}