Esempio n. 1
0
        /// <internalonly/>
        public override void CopyFrom(Style s)
        {
            if (s != null && !s.IsEmpty)
            {
                base.CopyFrom(s);

                if (s is WebPartMenuStyle)
                {
                    WebPartMenuStyle ms = (WebPartMenuStyle)s;

                    // Only copy the BackImageUrl if it isn't in the source Style's registered CSS class
                    if (s.RegisteredCssClass.Length != 0)
                    {
                        if (ms.IsSet(PROP_SHADOWCOLOR))
                        {
                            ViewState.Remove("ShadowColor");
                            ClearBit(PROP_SHADOWCOLOR);
                        }
                    }
                    else
                    {
                        if (ms.IsSet(PROP_SHADOWCOLOR))
                        {
                            this.ShadowColor = ms.ShadowColor;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        /// <internalonly/>
        public override void MergeWith(Style s)
        {
            if (s != null && !s.IsEmpty)
            {
                if (IsEmpty)
                {
                    // merge into an empty style is equivalent to a copy,
                    // which is more efficient
                    CopyFrom(s);
                    return;
                }

                base.MergeWith(s);

                if (s is WebPartMenuStyle)
                {
                    WebPartMenuStyle ms = (WebPartMenuStyle)s;

                    // Since we're already copying the registered CSS class in base.MergeWith, we don't
                    // need to any attributes that would be included in that class.
                    if (s.RegisteredCssClass.Length == 0)
                    {
                        if (ms.IsSet(PROP_SHADOWCOLOR) && !this.IsSet(PROP_SHADOWCOLOR))
                        {
                            this.ShadowColor = ms.ShadowColor;
                        }
                    }
                }
            }
        }
Esempio n. 3
0
 public override void CopyFrom(Style s)
 {
     if ((s != null) && !s.IsEmpty)
     {
         base.CopyFrom(s);
         if (s is WebPartMenuStyle)
         {
             WebPartMenuStyle style = (WebPartMenuStyle)s;
             if (s.RegisteredCssClass.Length != 0)
             {
                 if (style.IsSet(0x200000))
                 {
                     base.ViewState.Remove("ShadowColor");
                     base.ClearBit(0x200000);
                 }
             }
             else if (style.IsSet(0x200000))
             {
                 this.ShadowColor = style.ShadowColor;
             }
         }
     }
 }
Esempio n. 4
0
 public override void MergeWith(Style s)
 {
     if ((s != null) && !s.IsEmpty)
     {
         if (this.IsEmpty)
         {
             this.CopyFrom(s);
         }
         else
         {
             base.MergeWith(s);
             if (s is WebPartMenuStyle)
             {
                 WebPartMenuStyle style = (WebPartMenuStyle)s;
                 if (((s.RegisteredCssClass.Length == 0) && style.IsSet(0x200000)) && !base.IsSet(0x200000))
                 {
                     this.ShadowColor = style.ShadowColor;
                 }
             }
         }
     }
 }