/// <include file='doc\DataListGeneralPage.uex' path='docs/doc[@for="DataListGeneralPage.InitForm"]/*' /> /// <devdoc> /// Initializes the UI of the form. /// </devdoc> private void InitForm() { GroupLabel dataGroup = new GroupLabel(); Label dataSourceLabel = new Label(); this.dataSourceCombo = new UnsettableComboBox(); Label dataMemberLabel = new Label(); this.dataMemberCombo = new UnsettableComboBox(); Label dataKeyFieldLabel = new Label(); this.dataKeyFieldCombo = new UnsettableComboBox(); GroupLabel headerFooterGroup = new GroupLabel(); this.showHeaderCheck = new CheckBox(); this.showFooterCheck = new CheckBox(); GroupLabel repeatGroup = new GroupLabel(); Label repeatColumnsLabel = new Label(); this.repeatColumnsEdit = new NumberEdit(); Label repeatDirectionLabel = new Label(); this.repeatDirectionCombo = new ComboBox(); Label repeatLayoutLabel = new Label(); this.repeatLayoutCombo = new ComboBox(); GroupLabel templatesGroup = new GroupLabel(); this.extractRowsCheck = new CheckBox(); dataGroup.SetBounds(4, 4, 360, 16); dataGroup.Text = SR.GetString(SR.DLGen_DataGroup); dataGroup.TabIndex = 0; dataGroup.TabStop = false; dataSourceLabel.SetBounds(8, 24, 170, 16); dataSourceLabel.Text = SR.GetString(SR.DLGen_DataSource); dataSourceLabel.TabStop = false; dataSourceLabel.TabIndex = 1; dataSourceCombo.SetBounds(8, 40, 140, 21); dataSourceCombo.DropDownStyle = ComboBoxStyle.DropDownList; dataSourceCombo.Sorted = true; dataSourceCombo.TabIndex = 2; dataSourceCombo.NotSetText = SR.GetString(SR.DLGen_DSUnbound); dataSourceCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataSource); dataMemberLabel.SetBounds(184, 24, 170, 16); dataMemberLabel.Text = SR.GetString(SR.DLGen_DataMember); dataMemberLabel.TabStop = false; dataMemberLabel.TabIndex = 3; dataMemberCombo.SetBounds(184, 40, 140, 21); dataMemberCombo.DropDownStyle = ComboBoxStyle.DropDownList; dataMemberCombo.Sorted = true; dataMemberCombo.TabIndex = 4; dataMemberCombo.NotSetText = SR.GetString(SR.DLGen_DMNone); dataMemberCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataMember); dataKeyFieldLabel.SetBounds(8, 66, 170, 16); dataKeyFieldLabel.Text = SR.GetString(SR.DLGen_DataKey); dataKeyFieldLabel.TabStop = false; dataKeyFieldLabel.TabIndex = 4; dataKeyFieldCombo.SetBounds(8, 82, 140, 21); dataKeyFieldCombo.DropDownStyle = ComboBoxStyle.DropDownList; dataKeyFieldCombo.Sorted = true; dataKeyFieldCombo.TabIndex = 5; dataKeyFieldCombo.NotSetText = SR.GetString(SR.DLGen_DKNone); dataKeyFieldCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataKeyField); headerFooterGroup.SetBounds(4, 108, 360, 16); headerFooterGroup.Text = SR.GetString(SR.DLGen_HeaderFooterGroup); headerFooterGroup.TabIndex = 6; headerFooterGroup.TabStop = false; showHeaderCheck.SetBounds(8, 128, 170, 16); showHeaderCheck.TabIndex = 7; showHeaderCheck.Text = SR.GetString(SR.DLGen_ShowHeader); showHeaderCheck.TextAlign = ContentAlignment.MiddleLeft; showHeaderCheck.FlatStyle = FlatStyle.System; showHeaderCheck.CheckedChanged += new EventHandler(this.OnCheckChangedShowHeader); showFooterCheck.SetBounds(8, 146, 170, 16); showFooterCheck.TabIndex = 8; showFooterCheck.Text = SR.GetString(SR.DLGen_ShowFooter); showFooterCheck.TextAlign = ContentAlignment.MiddleLeft; showFooterCheck.FlatStyle = FlatStyle.System; showFooterCheck.CheckedChanged += new EventHandler(this.OnCheckChangedShowFooter); repeatGroup.SetBounds(4, 172, 360, 16); repeatGroup.Text = SR.GetString(SR.DLGen_RepeatLayoutGroup); repeatGroup.TabIndex = 9; repeatGroup.TabStop = false; repeatColumnsLabel.SetBounds(8, 192, 106, 16); repeatColumnsLabel.Text = SR.GetString(SR.DLGen_RepeatColumns); repeatColumnsLabel.TabStop = false; repeatColumnsLabel.TabIndex = 10; repeatColumnsEdit.SetBounds(112, 188, 40, 21); repeatColumnsEdit.AllowDecimal = false; repeatColumnsEdit.AllowNegative = false; repeatColumnsEdit.TabIndex = 11; repeatColumnsEdit.TextChanged += new EventHandler(this.OnChangedRepeatProps); repeatDirectionLabel.SetBounds(8, 217, 106, 16); repeatDirectionLabel.Text = SR.GetString(SR.DLGen_RepeatDirection); repeatDirectionLabel.TabStop = false; repeatDirectionLabel.TabIndex = 12; repeatDirectionCombo.SetBounds(112, 213, 140, 56); repeatDirectionCombo.DropDownStyle = ComboBoxStyle.DropDownList; repeatDirectionCombo.Items.AddRange(new object[] { SR.GetString(SR.DLGen_RD_Horz), SR.GetString(SR.DLGen_RD_Vert) }); repeatDirectionCombo.TabIndex = 13; repeatDirectionCombo.SelectedIndexChanged += new EventHandler(this.OnChangedRepeatProps); repeatLayoutLabel.SetBounds(8, 242, 106, 16); repeatLayoutLabel.Text = SR.GetString(SR.DLGen_RepeatLayout); repeatLayoutLabel.TabStop = false; repeatLayoutLabel.TabIndex = 14; repeatLayoutCombo.SetBounds(112, 238, 140, 21); repeatLayoutCombo.DropDownStyle = ComboBoxStyle.DropDownList; repeatLayoutCombo.Items.AddRange(new object[] { SR.GetString(SR.DLGen_RL_Table), SR.GetString(SR.DLGen_RL_Flow) }); repeatLayoutCombo.TabIndex = 15; repeatLayoutCombo.SelectedIndexChanged += new EventHandler(this.OnChangedRepeatProps); templatesGroup.SetBounds(4, 266, 360, 16); templatesGroup.Text = "Templates"; templatesGroup.TabIndex = 16; templatesGroup.TabStop = false; templatesGroup.Visible = false; extractRowsCheck.SetBounds(8, 286, 260, 16); extractRowsCheck.Text = "Extract rows from Tables in template content"; extractRowsCheck.TabIndex = 17; extractRowsCheck.Visible = false; extractRowsCheck.FlatStyle = FlatStyle.System; extractRowsCheck.CheckedChanged += new EventHandler(this.OnCheckChangedExtractRows); this.Text = SR.GetString(SR.DLGen_Text); this.Size = new Size(368, 280); this.CommitOnDeactivate = true; this.Icon = new Icon(this.GetType(), "DataListGeneralPage.ico"); Controls.Clear(); Controls.AddRange(new Control[] { extractRowsCheck, templatesGroup, repeatLayoutCombo, repeatLayoutLabel, repeatDirectionCombo, repeatDirectionLabel, repeatColumnsEdit, repeatColumnsLabel, repeatGroup, showFooterCheck, showHeaderCheck, headerFooterGroup, dataKeyFieldCombo, dataKeyFieldLabel, dataMemberCombo, dataMemberLabel, dataSourceCombo, dataSourceLabel, dataGroup }); }
/// <include file='doc\BordersPage.uex' path='docs/doc[@for="BordersPage.InitForm"]/*' /> /// <devdoc> /// Creates the UI of the page. /// </devdoc> private void InitForm() { GroupLabel cellMarginGroup = new GroupLabel(); Label cellPaddingLabel = new Label(); this.cellPaddingEdit = new NumberEdit(); Label cellSpacingLabel = new Label(); this.cellSpacingEdit = new NumberEdit(); GroupLabel borderLinesGroup = new GroupLabel(); Label gridLinesLabel = new Label(); this.gridLinesCombo = new ComboBox(); Label colorLabel = new Label(); this.borderColorCombo = new ColorComboBox(); this.borderColorPickerButton = new Button(); Label borderWidthLabel = new Label(); this.borderWidthUnit = new UnitControl(); cellMarginGroup.SetBounds(4, 4, 300, 16); cellMarginGroup.Text = SR.GetString(SR.BDLBor_CellMarginsGroup); cellMarginGroup.TabStop = false; cellMarginGroup.TabIndex = 0; cellPaddingLabel.Text = SR.GetString(SR.BDLBor_CellPadding); cellPaddingLabel.SetBounds(12, 24, 120, 14); cellPaddingLabel.TabStop = false; cellPaddingLabel.TabIndex = 1; cellPaddingEdit.SetBounds(12, 40, 70, 20); cellPaddingEdit.AllowDecimal = false; cellPaddingEdit.AllowNegative = false; cellPaddingEdit.TabIndex = 2; cellPaddingEdit.TextChanged += new EventHandler(this.OnBordersChanged); cellSpacingLabel.Text = SR.GetString(SR.BDLBor_CellSpacing); cellSpacingLabel.SetBounds(160, 24, 120, 14); cellSpacingLabel.TabStop = false; cellSpacingLabel.TabIndex = 3; cellSpacingEdit.SetBounds(160, 40, 70, 20); cellSpacingEdit.AllowDecimal = false; cellSpacingEdit.AllowNegative = false; cellSpacingEdit.TabIndex = 4; cellSpacingEdit.TextChanged += new EventHandler(this.OnBordersChanged); borderLinesGroup.SetBounds(4, 70, 300, 16); borderLinesGroup.Text = SR.GetString(SR.BDLBor_BorderLinesGroup); borderLinesGroup.TabStop = false; borderLinesGroup.TabIndex = 5; gridLinesLabel.Text = SR.GetString(SR.BDLBor_GridLines); gridLinesLabel.SetBounds(12, 90, 150, 14); gridLinesLabel.TabStop = false; gridLinesLabel.TabIndex = 6; gridLinesCombo.SetBounds(12, 106, 140, 21); gridLinesCombo.DropDownStyle = ComboBoxStyle.DropDownList; gridLinesCombo.Items.Clear(); gridLinesCombo.Items.AddRange(new object[] { SR.GetString(SR.BDLBor_GL_Horz), SR.GetString(SR.BDLBor_GL_Vert), SR.GetString(SR.BDLBor_GL_Both), SR.GetString(SR.BDLBor_GL_None) }); gridLinesCombo.TabIndex = 7; gridLinesCombo.SelectedIndexChanged += new EventHandler(this.OnBordersChanged); colorLabel.Text = SR.GetString(SR.BDLBor_BorderColor); colorLabel.SetBounds(12, 134, 150, 14); colorLabel.TabStop = false; colorLabel.TabIndex = 8; borderColorCombo.SetBounds(12, 150, 140, 21); borderColorCombo.TabIndex = 9; borderColorCombo.TextChanged += new EventHandler(this.OnBordersChanged); borderColorCombo.SelectedIndexChanged += new EventHandler(this.OnBordersChanged); borderColorPickerButton.SetBounds(156, 149, 24, 22); borderColorPickerButton.Text = "..."; borderColorPickerButton.TabIndex = 10; borderColorPickerButton.FlatStyle = FlatStyle.System; borderColorPickerButton.Click += new EventHandler(this.OnClickColorPicker); borderWidthLabel.Text = SR.GetString(SR.BDLBor_BorderWidth); borderWidthLabel.SetBounds(12, 178, 150, 14); borderWidthLabel.TabStop = false; borderWidthLabel.TabIndex = 11; borderWidthUnit.SetBounds(12, 194, 102, 22); borderWidthUnit.AllowNegativeValues = false; borderWidthUnit.AllowPercentValues = false; borderWidthUnit.DefaultUnit = UnitControl.UNIT_PX; borderWidthUnit.TabIndex = 12; borderWidthUnit.Changed += new EventHandler(OnBordersChanged); this.Text = SR.GetString(SR.BDLBor_Text); this.Size = new Size(308, 156); this.CommitOnDeactivate = true; this.Icon = new Icon(this.GetType(), "BordersPage.ico"); this.Controls.Clear(); this.Controls.AddRange(new Control[] { borderWidthUnit, borderWidthLabel, borderColorPickerButton, borderColorCombo, colorLabel, gridLinesCombo, gridLinesLabel, borderLinesGroup, cellSpacingEdit, cellSpacingLabel, cellPaddingEdit, cellPaddingLabel, cellMarginGroup }); }
/// <include file='doc\DataGridPagingPage.uex' path='docs/doc[@for="DataGridPagingPage.InitForm"]/*' /> /// <devdoc> /// Creates the UI of the page. /// </devdoc> private void InitForm() { GroupLabel pagingGroup = new GroupLabel(); this.allowPagingCheck = new CheckBox(); this.allowCustomPagingCheck = new CheckBox(); Label pageSizeLabel = new Label(); this.pageSizeEdit = new NumberEdit(); Label miscLabel = new Label(); GroupLabel navigationGroup = new GroupLabel(); this.visibleCheck = new CheckBox(); Label pagingPosLabel = new Label(); this.posCombo = new ComboBox(); Label pagingModeLabel = new Label(); this.modeCombo = new ComboBox(); Label nextPageLabel = new Label(); this.nextPageTextEdit = new TextBox(); Label prevPageLabel = new Label(); this.prevPageTextEdit = new TextBox(); Label pageButtonCountLabel = new Label(); this.pageButtonCountEdit = new NumberEdit(); pagingGroup.SetBounds(4, 4, 431, 16); pagingGroup.Text = SR.GetString(SR.DGPg_PagingGroup); pagingGroup.TabStop = false; pagingGroup.TabIndex = 0; allowPagingCheck.SetBounds(12, 24, 180, 16); allowPagingCheck.Text = SR.GetString(SR.DGPg_AllowPaging); allowPagingCheck.TextAlign = ContentAlignment.MiddleLeft; allowPagingCheck.TabIndex = 1; allowPagingCheck.FlatStyle = FlatStyle.System; allowPagingCheck.CheckedChanged += new EventHandler(this.OnCheckChangedAllowPaging); allowCustomPagingCheck.SetBounds(220, 24, 180, 16); allowCustomPagingCheck.Text = SR.GetString(SR.DGPg_AllowCustomPaging); allowCustomPagingCheck.TextAlign = ContentAlignment.MiddleLeft; allowCustomPagingCheck.TabIndex = 2; allowCustomPagingCheck.FlatStyle = FlatStyle.System; allowCustomPagingCheck.CheckedChanged += new EventHandler(this.OnCheckChangedAllowCustomPaging); pageSizeLabel.SetBounds(12, 50, 100, 14); pageSizeLabel.Text = SR.GetString(SR.DGPg_PageSize); pageSizeLabel.TabStop = false; pageSizeLabel.TabIndex = 3; pageSizeEdit.SetBounds(112, 46, 40, 24); pageSizeEdit.TabIndex = 4; pageSizeEdit.AllowDecimal = false; pageSizeEdit.AllowNegative = false; pageSizeEdit.TextChanged += new EventHandler(this.OnTextChangedPageSize); miscLabel.SetBounds(158, 50, 80, 14); miscLabel.Text = SR.GetString(SR.DGPg_Rows); miscLabel.TabStop = false; miscLabel.TabIndex = 5; navigationGroup.SetBounds(4, 78, 431, 14); navigationGroup.Text = SR.GetString(SR.DGPg_NavigationGroup); navigationGroup.TabStop = false; navigationGroup.TabIndex = 6; visibleCheck.SetBounds(12, 100, 260, 16); visibleCheck.Text = SR.GetString(SR.DGPg_Visible); visibleCheck.TextAlign = ContentAlignment.MiddleLeft; visibleCheck.TabIndex = 7; visibleCheck.FlatStyle = FlatStyle.System; visibleCheck.CheckedChanged += new EventHandler(this.OnCheckChangedVisible); pagingPosLabel.SetBounds(12, 122, 150, 14); pagingPosLabel.Text = SR.GetString(SR.DGPg_Position); pagingPosLabel.TabStop = false; pagingPosLabel.TabIndex = 8; posCombo.SetBounds(12, 138, 144, 21); posCombo.TabIndex = 9; posCombo.DropDownStyle = ComboBoxStyle.DropDownList; posCombo.Items.AddRange(new object[] { SR.GetString(SR.DGPg_Pos_Top), SR.GetString(SR.DGPg_Pos_Bottom), SR.GetString(SR.DGPg_Pos_TopBottom) }); posCombo.SelectedIndexChanged += new EventHandler(this.OnPagerChanged); pagingModeLabel.SetBounds(12, 166, 150, 14); pagingModeLabel.Text = SR.GetString(SR.DGPg_Mode); pagingModeLabel.TabStop = false; pagingModeLabel.TabIndex = 10; modeCombo.SetBounds(12, 182, 144, 64); modeCombo.TabIndex = 11; modeCombo.DropDownStyle = ComboBoxStyle.DropDownList; modeCombo.Items.AddRange(new object[] { SR.GetString(SR.DGPg_Mode_Buttons), SR.GetString(SR.DGPg_Mode_Numbers) }); modeCombo.SelectedIndexChanged += new EventHandler(this.OnPagerChanged); nextPageLabel.SetBounds(12, 210, 200, 14); nextPageLabel.Text = SR.GetString(SR.DGPg_NextPage); nextPageLabel.TabStop = false; nextPageLabel.TabIndex = 12; nextPageTextEdit.SetBounds(12, 226, 144, 24); nextPageTextEdit.TabIndex = 13; nextPageTextEdit.TextChanged += new EventHandler(this.OnPagerChanged); prevPageLabel.SetBounds(220, 210, 200, 14); prevPageLabel.Text = SR.GetString(SR.DGPg_PrevPage); prevPageLabel.TabStop = false; prevPageLabel.TabIndex = 14; prevPageTextEdit.SetBounds(220, 226, 140, 24); prevPageTextEdit.TabIndex = 15; prevPageTextEdit.TextChanged += new EventHandler(this.OnPagerChanged); pageButtonCountLabel.SetBounds(12, 254, 200, 14); pageButtonCountLabel.Text = SR.GetString(SR.DGPg_ButtonCount); pageButtonCountLabel.TabStop = false; pageButtonCountLabel.TabIndex = 16; pageButtonCountEdit.SetBounds(12, 270, 40, 24); pageButtonCountEdit.TabIndex = 17; pageButtonCountEdit.AllowDecimal = false; pageButtonCountEdit.AllowNegative = false; pageButtonCountEdit.TextChanged += new EventHandler(this.OnPagerChanged); this.Text = SR.GetString(SR.DGPg_Text); this.Size = new Size(464, 300); this.CommitOnDeactivate = true; this.Icon = new Icon(this.GetType(), "DataGridPagingPage.ico"); this.Controls.Clear(); this.Controls.AddRange(new Control[] { pageButtonCountEdit, pageButtonCountLabel, prevPageTextEdit, prevPageLabel, nextPageTextEdit, nextPageLabel, modeCombo, pagingModeLabel, posCombo, pagingPosLabel, visibleCheck, navigationGroup, miscLabel, pageSizeEdit, pageSizeLabel, allowCustomPagingCheck, allowPagingCheck, pagingGroup }); }