Exemplo n.º 1
0
        private void rightAlignTextFields()
        {
            int rightLoc;

            if (message != null)
            {
                rightLoc = HMath.Max(this.name.Location.X, this.location.Location.X, Time.Location.X, EType.Location.X, message.Location.X);
            }
            else
            {
                rightLoc = HMath.Max(this.name.Location.X, this.location.Location.X, Time.Location.X, EType.Location.X, messagePic.Location.X);
            }
            name.Location     = new Point(rightLoc, this.name.Location.Y);
            location.Location = new Point(rightLoc, this.location.Location.Y);
            Time.Location     = new Point(rightLoc, Time.Location.Y);
            EType.Location    = new Point(rightLoc, EType.Location.Y);
            if (message != null)
            {
                message.Location = new Point(rightLoc, message.Location.Y);
            }
            else
            {
                messagePic.Location = new Point(rightLoc, messagePic.Location.Y);
            }
        }