SIL.FieldWorks.WelcomeToFieldWorksDlg.ReLayoutCorrectly C# (CSharp) Méthode

ReLayoutCorrectly() private méthode

Adjust dialog so that the height of the main FlowLayoutPanel is the right value to contain the displayed controls. A better solution will be to fix Mono FlowLayoutPanel to not include non-Visible controls in the FlowLayoutPanel height calculation, if that is what it is doing when it AutoSizes.
private ReLayoutCorrectly ( ) : void
Résultat void
		private void ReLayoutCorrectly()
		{
			var shrunkWidth = this.mainVerticalLayout.Width;
			this.mainVerticalLayout.AutoSize = false;
			this.mainVerticalLayout.Width = shrunkWidth;

			var heightOfVisibleControls = 0;
			foreach (Control control in this.mainVerticalLayout.Controls)
			{
				if (control.Visible == false)
					continue;
				heightOfVisibleControls += control.Height;
				heightOfVisibleControls += control.Margin.Top;
				heightOfVisibleControls += control.Margin.Bottom;
			}
			this.mainVerticalLayout.Height = heightOfVisibleControls;
		}
		#endregion