private void FormatControls() { Control[] controlArray1 = new Control[8] { (Control)this.m_pnlCBOHolder, (Control)this.btnDeleteColumn, (Control)this.btnEstimated, (Control)this.lblBasicScore, (Control)this.lblFinalScore, (Control)this.lblSoilType, (Control)this.lblDivider, (Control)this.cboBuildingType }; int index1 = 0; while (index1 < controlArray1.Length) { controlArray1[index1].Size = AssessmentHelpers.GetButtonSize; checked { ++index1; } } Control[] controlArray2 = new Control[3] { (Control)this.lblBasicScore, (Control)this.lblFinalScore, (Control)this.lblSoilType }; int index2 = 0; while (index2 < controlArray2.Length) { AssessmentHelpers.LabelWithMargins labelWithMargins = (AssessmentHelpers.LabelWithMargins)controlArray2[index2]; labelWithMargins.Dock = DockStyle.Fill; labelWithMargins.TextAlign = ContentAlignment.MiddleCenter; checked { ++index2; } } this.btnDeleteColumn.Image = (Image)BuilderRED.My.Resources.Resources.Symbol_Delete; this.btnDeleteColumn.Click += new EventHandler(this.btnDeleteColumn_click); this.btnEstimated.Appearance = Appearance.Button; this.lblFinalScore.Font = new Font(this.lblFinalScore.Font.FontFamily, this.lblFinalScore.Font.Size, FontStyle.Bold); this.tblColumn.RowStyles.Add(new RowStyle(SizeType.AutoSize)); this.tblColumn.Controls.Add((Control)this.btnDeleteColumn); this.m_pnlCBOHolder.Controls.Add((Control)this.NewBuildingType()); this.tblColumn.Controls.Add((Control)this.m_pnlCBOHolder); }
public ctrlSeismicBuildingType(string Type, int iSoil = 0, int iSeismicity = 0) { this.m_aryModifiers = new ArrayList(); this.cboBuildingType = new ComboBox(); this.btnDeleteColumn = new Button(); this.btnEstimated = new AssessmentHelpers.CheckButtonWithValue(); this.lblFinalScore = new AssessmentHelpers.LabelWithMargins(); this.lblBasicScore = new AssessmentHelpers.LabelWithMargins(); this.lblSoilType = new AssessmentHelpers.LabelWithMargins(); this.lblDivider = new AssessmentHelpers.LabelWithMargins(); this.m_pnlCBOHolder = new Panel(); this.m_oGroupControl = new ctrlGroupButtons(); this.InitializeComponent(); this.Dock = DockStyle.Left; if ((uint)Microsoft.VisualBasic.CompilerServices.Operators.CompareString(Type, "BuildingType", false) > 0U) { int num = 1; do { AssessmentHelpers.LabelWithMargins labelWithMargins = new AssessmentHelpers.LabelWithMargins(); labelWithMargins.Size = AssessmentHelpers.GetButtonSize; labelWithMargins.TextAlign = ContentAlignment.MiddleRight; if (num != 11) { this.tblColumn.Controls.Add((Control)labelWithMargins); } else if ((uint)Microsoft.VisualBasic.CompilerServices.Operators.CompareString(Type, "Add", false) > 0U) { this.tblColumn.Controls.Add((Control)this.lblDivider); } checked { ++num; } }while (num <= 13); if (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(Type, "Label", false) == 0) { this.MakeLabelColumn(); } } else { this.m_Seismicity = iSeismicity; this.m_SoilType = iSoil; this.FormatControls(); } this.lblDivider.Height = 1; this.lblDivider.BorderStyle = BorderStyle.Fixed3D; this.lblDivider.Font = new Font("", 1f); this.m_BuildingTypeID = mdUtility.GetUniqueID(); }