Habanero.Faces.Base.FlowLayoutManager.SetControlPosition C# (CSharp) Method

SetControlPosition() private method

Calculates the control's position in the user interface
private SetControlPosition ( IControlHabanero ctl ) : void
ctl IControlHabanero The control in question
return void
        private void SetControlPosition(IControlHabanero ctl)
        {
            int newLeft;
            if (_alignment == Alignments.Right)
            {
                newLeft = ManagedControl.Width - _currentPos.X - ctl.Width;
            }
            else
            {
                newLeft = _currentPos.X;
            }
// ReSharper disable RedundantCheckBeforeAssignment
            if (ctl.Left != newLeft) ctl.Left = newLeft;
            if (ctl.Top != _currentPos.Y) ctl.Top = _currentPos.Y;
// ReSharper restore RedundantCheckBeforeAssignment
        }