ARCed.Forms.SkinSettingsForm.groupBoxGradientSettings_CollapseBoxClickedEvent C# (CSharp) Method

groupBoxGradientSettings_CollapseBoxClickedEvent() private method

private groupBoxGradientSettings_CollapseBoxClickedEvent ( object sender ) : void
sender object
return void
        private void groupBoxGradientSettings_CollapseBoxClickedEvent(object sender)
        {
            int y = this.groupBoxGradientSettings.FullHeight - this.groupBoxGradientSettings.CollapsedHeight;
            if (this.groupBoxGradientSettings.IsCollapsed)
                y *= -1;
            Control[] ctrls = { this.buttonApply, this.buttonDefault };
            foreach (Control ctrl in ctrls)
                ctrl.Location = new Point(ctrl.Location.X, ctrl.Location.Y + y);
        }