Example #1
0
 private void AdjustNowPos(LayoutLabel ll, SizeF sf, ref Rectangle R, ref Point NowPos)
 {
     if (ll.Pos != Point.Empty)
     {
         if (ll.Pos.X < 0)
         {
             if (ll.Align == TextAlign.Right)
             {
                 NowPos.X = R.Right + ll.Pos.X;
             }
             else
             {
                 NowPos.X = R.Right + ll.Pos.X - (int)sf.Width;
             }
         }
         else
         {
             NowPos.X = R.X + ll.Pos.X;
         }
         if (ll.Pos.Y < 0)
         {
             NowPos.Y = R.Bottom + ll.Pos.Y - (int)sf.Height;
         }
         else
         {
             NowPos.Y = R.Y + ll.Pos.Y;
         }
     }
 }
Example #2
0
        private void AddLabel()
        {
            LayoutLabel ll = new LayoutLabel();

            ll.Back       = NowBack;
            ll.BackColor  = NowBackColor;
            ll.Frame      = NowFrame;
            ll.FrameColor = NowFrameColor;
            ll.Pos        = NowPos;
            ll.Text       = NowText;
            ll.TextColor  = NowColor;
            ll.UseColor   = NowUseColor;
            ll.Icon       = NowIcon;
            ll.Align      = NowAlign;
            if (NowUseColor)
            {
                ll.TextFont = NowColorFont;
            }
            else
            {
                ll.TextFont = NowFont;
            }
            Labels.Add(ll);
        }
Example #3
0
 public void Remove(LayoutLabel ll)
 {
     List.Remove(ll);
 }
Example #4
0
 public virtual void Add(LayoutLabel ll)
 {
     this.List.Add(ll);
 }