Beispiel #1
0
        public void SetDecoration(Control control, DecorationType decoration)
        {
            DecorationControl control2 = this.DecorationByControls.ContainsKey(control) ? this.DecorationByControls[control] : null;

            if (decoration == DecorationType.None)
            {
                if (control2 != null)
                {
                    control2.Dispose();
                }
                this.DecorationByControls.Remove(control);
            }
            else
            {
                if (control2 == null)
                {
                    control2 = new DecorationControl(decoration, control);
                }
                control2.DecorationType            = decoration;
                this.DecorationByControls[control] = control2;
            }
        }
Beispiel #2
0
 public void SetDecoration(Control control, DecorationType decoration)
 {
     DecorationControl control2 = this.DecorationByControls.ContainsKey(control) ? this.DecorationByControls[control] : null;
     if (decoration == DecorationType.None)
     {
         if (control2 != null)
         {
             control2.Dispose();
         }
         this.DecorationByControls.Remove(control);
     }
     else
     {
         if (control2 == null)
         {
             control2 = new DecorationControl(decoration, control);
         }
         control2.DecorationType = decoration;
         this.DecorationByControls[control] = control2;
     }
 }