コード例 #1
0
        /// <summary>
        /// Removes a CSS attribute.
        /// </summary>
        /// <param name="name">The CSS attribute name.</param>
        public void Remove(string name)
        {
            string val = this[name];

            BaseRemove(name.ToLower());

            Dirty = true;

            if (ItemRemoved != null)
            {
                CssEventArgs e = new CssEventArgs(name, val);
                ItemRemoved(this, e);
            }
        }
コード例 #2
0
        /// <summary>
        /// Adds a new CSS attribute/value pair.
        /// </summary>
        /// <param name="name">The CSS attribute name.</param>
        /// <param name="value">The CSS value.</param>
        public void Add(string name, string value)
        {
            name = name.ToLower().Trim();

            if (this[name] != null)
            {
                BaseRemove(name);
            }

            BaseAdd((string)name.Clone(), value.Clone());

            Dirty = true;

            if (ItemAdded != null)
            {
                CssEventArgs e = new CssEventArgs(name, value);
                ItemAdded(this, e);
            }
        }
コード例 #3
0
ファイル: CssWrapper.cs プロジェクト: lokygb/FrontDesk
 /// <summary>
 /// Called when an item is removed.
 /// </summary>
 /// <param name="c">The collection</param>
 /// <param name="e">Event arguments</param>
 private void OnRemove(CssCollection c, CssEventArgs e)
 {
     Style.Remove(e.Name);
 }
コード例 #4
0
ファイル: CssWrapper.cs プロジェクト: lokygb/FrontDesk
 /// <summary>
 /// Called when an item is added.
 /// </summary>
 /// <param name="c">The collection</param>
 /// <param name="e">Event arguments</param>
 private void OnAdd(CssCollection c, CssEventArgs e)
 {
     Style.Add(e.Name, e.Value);
 }
コード例 #5
0
        /// <summary>
        /// Removes a CSS attribute.
        /// </summary>
        /// <param name="name">The CSS attribute name.</param>
        public void Remove(string name)
        {
            string val = this[name];
            BaseRemove(name.ToLower());

            Dirty = true;

            if (ItemRemoved != null)
            {
                CssEventArgs e = new CssEventArgs(name, val);
                ItemRemoved(this, e);
            }
        }
コード例 #6
0
        /// <summary>
        /// Adds a new CSS attribute/value pair.
        /// </summary>
        /// <param name="name">The CSS attribute name.</param>
        /// <param name="value">The CSS value.</param>
        public void Add(string name, string value)
        {
            name = name.ToLower().Trim();

            if (this[name] != null)
                BaseRemove(name);

            BaseAdd((string)name.Clone(), value.Clone());

            Dirty = true;

            if (ItemAdded != null)
            {
                CssEventArgs e = new CssEventArgs(name, value);
                ItemAdded(this, e);
            }
        }