当前位置: 首页>>代码示例>>C#>>正文


C# WebControls.PropertyEditorEventArgs类代码示例

本文整理汇总了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;
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:29,代码来源:SettingsEditorInfoAdapter.cs

示例2: ctlSkin_ItemDeleted

 protected void ctlSkin_ItemDeleted(object sender, PropertyEditorEventArgs e)
 {
     if (e.Key != null)
     {
         SkinController.DeleteSkin(Convert.ToInt32(e.Key));
     }
     BindSkin();
 }
开发者ID:rcedev,项目名称:evans-software-solutions,代码行数:8,代码来源:SkinEditor.ascx.cs

示例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);
 }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:8,代码来源:DnnTimeZoneEditControl.cs

示例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 );
 }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:12,代码来源:TextEditControl.cs

示例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();
 }
开发者ID:rcedev,项目名称:evans-software-solutions,代码行数:9,代码来源:SkinEditor.ascx.cs

示例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);
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:15,代码来源:EnumEditControl.cs

示例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);
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:16,代码来源:DNNRichTextEditControl.cs

示例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;
        }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:42,代码来源:CollectionEditorInfoAdapter.cs

示例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;
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:20,代码来源:StandardEditorInfoAdapter.cs

示例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;
                 }
             }
         }
     }
 }
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:23,代码来源:DNNCountryEditControl.cs

示例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);
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:18,代码来源:SkinsEditControl.cs

示例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;
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:30,代码来源:CollectionEditorInfoAdapter.cs

示例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);
     }
 }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:11,代码来源:EditControl.cs

示例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);
		}
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:13,代码来源:VisibilityControl.cs

示例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);
			}
		}
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:14,代码来源:VisibilityControl.cs


注:本文中的DotNetNuke.UI.WebControls.PropertyEditorEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。