/// <include file='doc\DataGridGeneralPage.uex' path='docs/doc[@for="DataGridGeneralPage.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(); this.columnInfoLabel = new Label(); GroupLabel headerFooterGroup = new GroupLabel(); this.showHeaderCheck = new CheckBox(); this.showFooterCheck = new CheckBox(); GroupLabel behaviorGroup = new GroupLabel(); this.allowSortingCheck = new CheckBox(); dataGroup.SetBounds(4, 4, 431, 16); dataGroup.Text = SR.GetString(SR.DGGen_DataGroup); dataGroup.TabIndex = 0; dataGroup.TabStop = false; dataSourceLabel.SetBounds(12, 24, 170, 16); dataSourceLabel.Text = SR.GetString(SR.DGGen_DataSource); dataSourceLabel.TabStop = false; dataSourceLabel.TabIndex = 1; dataSourceCombo.SetBounds(12, 40, 140, 64); dataSourceCombo.DropDownStyle = ComboBoxStyle.DropDownList; dataSourceCombo.Sorted = true; dataSourceCombo.TabIndex = 2; dataSourceCombo.NotSetText = SR.GetString(SR.DGGen_DSUnbound); dataSourceCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataSource); dataMemberLabel.SetBounds(184, 24, 170, 16); dataMemberLabel.Text = SR.GetString(SR.DGGen_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.DGGen_DMNone); dataMemberCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataMember); dataKeyFieldLabel.SetBounds(12, 66, 170, 16); dataKeyFieldLabel.Text = SR.GetString(SR.DGGen_DataKey); dataKeyFieldLabel.TabStop = false; dataKeyFieldLabel.TabIndex = 5; dataKeyFieldCombo.SetBounds(12, 82, 140, 64); dataKeyFieldCombo.DropDownStyle = ComboBoxStyle.DropDownList; dataKeyFieldCombo.Sorted = true; dataKeyFieldCombo.TabIndex = 6; dataKeyFieldCombo.NotSetText = SR.GetString(SR.DGGen_DKNone); dataKeyFieldCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataKeyField); columnInfoLabel.SetBounds(8, 112, 420, 48); columnInfoLabel.TabStop = false; columnInfoLabel.TabIndex = 7; headerFooterGroup.SetBounds(4, 162, 431, 16); headerFooterGroup.Text = SR.GetString(SR.DGGen_HeaderFooterGroup); headerFooterGroup.TabIndex = 8; headerFooterGroup.TabStop = false; showHeaderCheck.SetBounds(12, 182, 160, 16); showHeaderCheck.TabIndex = 9; showHeaderCheck.Text = SR.GetString(SR.DGGen_ShowHeader); showHeaderCheck.TextAlign = ContentAlignment.MiddleLeft; showHeaderCheck.FlatStyle = FlatStyle.System; showHeaderCheck.CheckedChanged += new EventHandler(this.OnCheckChangedShowHeader); showFooterCheck.SetBounds(12, 202, 160, 16); showFooterCheck.TabIndex = 10; showFooterCheck.Text = SR.GetString(SR.DGGen_ShowFooter); showFooterCheck.TextAlign = ContentAlignment.MiddleLeft; showFooterCheck.FlatStyle = FlatStyle.System; showFooterCheck.CheckedChanged += new EventHandler(this.OnCheckChangedShowFooter); behaviorGroup.SetBounds(4, 228, 431, 16); behaviorGroup.Text = SR.GetString(SR.DGGen_BehaviorGroup); behaviorGroup.TabIndex = 11; behaviorGroup.TabStop = false; allowSortingCheck.SetBounds(12, 246, 160, 16); allowSortingCheck.Text = SR.GetString(SR.DGGen_AllowSorting); allowSortingCheck.TabIndex = 12; allowSortingCheck.TextAlign = ContentAlignment.MiddleLeft; allowSortingCheck.FlatStyle = FlatStyle.System; allowSortingCheck.CheckedChanged += new EventHandler(this.OnCheckChangedAllowSorting); this.Text = SR.GetString(SR.DGGen_Text); this.Size = new Size(464, 272); this.CommitOnDeactivate = true; this.Icon = new Icon(this.GetType(), "DataGridGeneralPage.ico"); Controls.Clear(); Controls.AddRange(new Control[] { allowSortingCheck, behaviorGroup, showFooterCheck, showHeaderCheck, headerFooterGroup, columnInfoLabel, dataKeyFieldCombo, dataKeyFieldLabel, dataMemberCombo, dataMemberLabel, dataSourceCombo, dataSourceLabel, dataGroup }); }
protected override void InitForm() { base.InitForm(); this._objectList = (ObjectList)Component; this.CommitOnDeactivate = true; this.Icon = new Icon( typeof(System.Web.UI.Design.MobileControls.MobileControlDesigner), "Fields.ico" ); this.Size = new Size(402, 300); this.Text = SR.GetString(SR.ObjectListFieldsPage_Title); _ckbAutoGenerateFields = new CheckBox(); _cmbDataField = new UnsettableComboBox(); _ckbVisible = new CheckBox(); _txtDataFormatString = new TextBox(); _txtTitle = new TextBox(); _ckbAutoGenerateFields.SetBounds(4, 4, 396, LabelHeight); _ckbAutoGenerateFields.Text = SR.GetString(SR.ObjectListFieldsPage_AutoGenerateFieldsCaption); _ckbAutoGenerateFields.FlatStyle = FlatStyle.System; _ckbAutoGenerateFields.CheckedChanged += new EventHandler(this.OnSetPageDirty); _ckbAutoGenerateFields.TabIndex = 0; GroupLabel grplblFieldList = new GroupLabel(); grplblFieldList.SetBounds(4, 32, 392, LabelHeight); grplblFieldList.Text = SR.GetString(SR.ObjectListFieldsPage_FieldListGroupLabel); grplblFieldList.TabIndex = 1; grplblFieldList.TabStop = false; TreeList.TabIndex = 2; Label lblDataField = new Label(); lblDataField.SetBounds(X, Y, ControlWidth, LabelHeight); lblDataField.Text = SR.GetString(SR.ObjectListFieldsPage_DataFieldCaption); lblDataField.TabStop = false; lblDataField.TabIndex = Index; Y += LabelHeight; _cmbDataField.SetBounds(X, Y, ControlWidth, CmbHeight); _cmbDataField.DropDownStyle = ComboBoxStyle.DropDown; _cmbDataField.Sorted = true; _cmbDataField.NotSetText = SR.GetString(SR.ObjectListFieldsPage_NoneComboEntry); _cmbDataField.TextChanged += new EventHandler(this.OnPropertyChanged); _cmbDataField.SelectedIndexChanged += new EventHandler(this.OnPropertyChanged); _cmbDataField.TabIndex = Index + 1; Y += CellSpace; Label lblDataFormatString = new Label(); lblDataFormatString.SetBounds(X, Y, ControlWidth, LabelHeight); lblDataFormatString.Text = SR.GetString(SR.ObjectListFieldsPage_DataFormatStringCaption); lblDataFormatString.TabStop = false; lblDataFormatString.TabIndex = Index + 2; Y += LabelHeight; _txtDataFormatString.SetBounds(X, Y, ControlWidth, CmbHeight); _txtDataFormatString.TextChanged += new EventHandler(this.OnPropertyChanged); _txtDataFormatString.TabIndex = Index + 3; Y += CellSpace; Label lblTitle = new Label(); lblTitle.SetBounds(X, Y, ControlWidth, LabelHeight); lblTitle.Text = SR.GetString(SR.ObjectListFieldsPage_TitleCaption); lblTitle.TabStop = false; lblTitle.TabIndex = Index + 4; Y += LabelHeight; _txtTitle.SetBounds(X, Y, ControlWidth, CmbHeight); _txtTitle.TextChanged += new EventHandler(this.OnPropertyChanged); _txtTitle.TabIndex = Index + 5; Y += CellSpace; _ckbVisible.SetBounds(X, Y, ControlWidth, CmbHeight); _ckbVisible.FlatStyle = System.Windows.Forms.FlatStyle.System; _ckbVisible.Text = SR.GetString(SR.ObjectListFieldsPage_VisibleCaption); _ckbVisible.CheckedChanged += new EventHandler(this.OnPropertyChanged); _ckbVisible.TabIndex = Index + 6; this.Controls.AddRange(new Control[] { _ckbAutoGenerateFields, grplblFieldList, lblDataField, _cmbDataField, lblDataFormatString, _txtDataFormatString, lblTitle, _txtTitle, _ckbVisible }); }
private void InitForm() { this._cmbDataSource = new UnsettableComboBox(); this._cmbLabelField = new UnsettableComboBox(); this._cmbDataMember = new UnsettableComboBox(); this._xLists = new InterchangeableLists(); GroupLabel grplblData = new GroupLabel(); grplblData.SetBounds(4, 4, 392, 16); grplblData.Text = SR.GetString(SR.ObjectListGeneralPage_DataGroupLabel); grplblData.TabIndex = 0; grplblData.TabStop = false; Label lblDataSource = new Label(); lblDataSource.SetBounds(12, 24, 174, 16); lblDataSource.Text = SR.GetString(SR.ObjectListGeneralPage_DataSourceCaption); lblDataSource.TabStop = false; lblDataSource.TabIndex = 1; _cmbDataSource.SetBounds(12, 40, 154, 64); _cmbDataSource.DropDownStyle = ComboBoxStyle.DropDownList; _cmbDataSource.Sorted = true; _cmbDataSource.TabIndex = 2; _cmbDataSource.NotSetText = SR.GetString(SR.ObjectListGeneralPage_UnboundComboEntry); _cmbDataSource.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataSource); Label lblDataMember = new Label(); lblDataMember.SetBounds(206, 24, 174, 16); lblDataMember.Text = SR.GetString(SR.ObjectListGeneralPage_DataMemberCaption); lblDataMember.TabStop = false; lblDataMember.TabIndex = 3; _cmbDataMember.SetBounds(206, 40, 154, 64); _cmbDataMember.DropDownStyle = ComboBoxStyle.DropDownList; _cmbDataMember.Sorted = true; _cmbDataMember.TabIndex = 4; _cmbDataMember.NotSetText = SR.GetString(SR.ObjectListGeneralPage_NoneComboEntry); _cmbDataMember.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataMember); Label lblLabelField = new Label(); lblLabelField.SetBounds(12, 67, 174, 16); lblLabelField.Text = SR.GetString(SR.ObjectListGeneralPage_LabelFieldCaption); lblLabelField.TabStop = false; lblLabelField.TabIndex = 5; _cmbLabelField.SetBounds(12, 83, 154, 64); _cmbLabelField.DropDownStyle = ComboBoxStyle.DropDownList; _cmbLabelField.Sorted = true; _cmbLabelField.TabIndex = 6; _cmbLabelField.NotSetText = SR.GetString(SR.ObjectListGeneralPage_NoneComboEntry); _cmbLabelField.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty); _cmbLabelField.TextChanged += new EventHandler(this.OnSetPageDirty); GroupLabel grplblTableFields = new GroupLabel(); grplblTableFields.SetBounds(4, 118, 392, 16); grplblTableFields.Text = SR.GetString(SR.ObjectListGeneralPage_TableFieldsGroupLabel); grplblTableFields.TabIndex = 9; grplblTableFields.TabStop = false; _xLists.Location = new System.Drawing.Point(4, 130); _xLists.TabIndex = 10; _xLists.OnComponentChanged += new EventHandler(this.OnSetPageDirty); _xLists.TabStop = true; _xLists.SetTitles(SR.GetString(SR.ObjectListGeneralPage_TableFieldsAvailableListLabel), SR.GetString(SR.ObjectListGeneralPage_TableFieldsSelectedListLabel)); GroupLabel grplblAppearance = new GroupLabel(); grplblAppearance.SetBounds(4, 257, 392, 16); grplblAppearance.Text = SR.GetString(SR.ObjectListGeneralPage_AppearanceGroupLabel); grplblAppearance.TabIndex = 11; grplblAppearance.TabStop = false; Label lblBackCommandText = new Label(); lblBackCommandText.SetBounds(12, 277, 174, 16); lblBackCommandText.Text = SR.GetString(SR.ObjectListGeneralPage_BackCommandTextCaption); lblBackCommandText.TabStop = false; lblBackCommandText.TabIndex = 12; _txtBackCommandText = new TextBox(); _txtBackCommandText.SetBounds(12, 293, 154, 20); _txtBackCommandText.TabIndex = 13; _txtBackCommandText.TextChanged += new EventHandler(this.OnSetPageDirty); Label lblDetailsCommandText = new Label(); lblDetailsCommandText.SetBounds(206, 277, 174, 16); lblDetailsCommandText.Text = SR.GetString(SR.ObjectListGeneralPage_DetailsCommandTextCaption); lblDetailsCommandText.TabStop = false; lblDetailsCommandText.TabIndex = 14; _txtDetailsCommandText = new TextBox(); _txtDetailsCommandText.SetBounds(206, 293, 154, 20); _txtDetailsCommandText.TabIndex = 15; _txtDetailsCommandText.TextChanged += new EventHandler(this.OnSetPageDirty); Label lblMoreText = new Label(); lblMoreText.SetBounds(12, 320, 174, 16); lblMoreText.Text = SR.GetString(SR.ObjectListGeneralPage_MoreTextCaption); lblMoreText.TabStop = false; lblMoreText.TabIndex = 16; _txtMoreText = new TextBox(); _txtMoreText.SetBounds(12, 336, 154, 20); _txtMoreText.TabIndex = 17; _txtMoreText.TextChanged += new EventHandler(this.OnSetPageDirty); GroupLabel pagingGroup = new GroupLabel(); Label itemCountLabel = new Label(); _txtItemCount = new TextBox(); Label itemsPerPageLabel = new Label(); _txtItemsPerPage = new TextBox(); pagingGroup.SetBounds(4, 371, 392, 16); pagingGroup.Text = SR.GetString(SR.ListGeneralPage_PagingGroupLabel); pagingGroup.TabIndex = 18; pagingGroup.TabStop = false; itemCountLabel.SetBounds(12, 391, 174, 16); itemCountLabel.Text = SR.GetString(SR.ListGeneralPage_ItemCountCaption); itemCountLabel.TabStop = false; itemCountLabel.TabIndex = 19; _txtItemCount.SetBounds(12, 407, 154, 20); _txtItemCount.TextChanged += new EventHandler(this.OnSetPageDirty); _txtItemCount.KeyPress += new KeyPressEventHandler(this.OnKeyPressNumberTextBox); _txtItemCount.TabIndex = 20; itemsPerPageLabel.SetBounds(206, 391, 174, 16); itemsPerPageLabel.Text = SR.GetString(SR.ListGeneralPage_ItemsPerPageCaption); itemsPerPageLabel.TabStop = false; itemsPerPageLabel.TabIndex = 21; _txtItemsPerPage.SetBounds(206, 407, 154, 20); _txtItemsPerPage.TextChanged += new EventHandler(this.OnSetPageDirty); _txtItemsPerPage.KeyPress += new KeyPressEventHandler(this.OnKeyPressNumberTextBox); _txtItemsPerPage.TabIndex = 22; this.Text = SR.GetString(SR.ObjectListGeneralPage_Title); this.Size = new Size(402, 436); this.CommitOnDeactivate = true; this.Icon = new Icon( typeof(System.Web.UI.Design.MobileControls.MobileControlDesigner), "General.ico" ); this.Controls.AddRange(new Control[] { grplblData, lblDataSource, _cmbDataSource, lblDataMember, _cmbDataMember, lblLabelField, _cmbLabelField, grplblTableFields, _xLists, grplblAppearance, lblBackCommandText, _txtBackCommandText, lblDetailsCommandText, _txtDetailsCommandText, lblMoreText, _txtMoreText, pagingGroup, itemCountLabel, _txtItemCount, itemsPerPageLabel, _txtItemsPerPage }); }
/// <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 }); }
/// <summary> /// Initializes the UI of the form. /// </summary> private void InitForm() { Debug.Assert(GetBaseControl() != null); _isBaseControlList = (GetBaseControl() is List); // SelectionList otherwise. GroupLabel dataGroup = new GroupLabel(); Label dataSourceLabel = new Label(); _dataSourceCombo = new UnsettableComboBox(); Label dataMemberLabel = new Label(); _dataMemberCombo = new UnsettableComboBox(); Label dataTextFieldLabel = new Label(); _dataTextFieldCombo = new UnsettableComboBox(); Label dataValueFieldLabel = new Label(); _dataValueFieldCombo = new UnsettableComboBox(); GroupLabel appearanceGroup = new GroupLabel(); GroupLabel pagingGroup = null; Label itemCountLabel = null; Label itemsPerPageLabel = null; Label rowsLabel = null; Label decorationLabel = null; Label selectTypeLabel = null; if (_isBaseControlList) { pagingGroup = new GroupLabel(); itemCountLabel = new Label(); _itemCountTextBox = new TextBox(); itemsPerPageLabel = new Label(); _itemsPerPageTextBox = new TextBox(); decorationLabel = new Label(); _decorationCombo = new ComboBox(); } else { rowsLabel = new Label(); _rowsTextBox = new TextBox(); selectTypeLabel = new Label(); _selectTypeCombo = new ComboBox(); } dataGroup.SetBounds(4, 4, 372, 16); dataGroup.Text = SR.GetString(SR.ListGeneralPage_DataGroupLabel); dataGroup.TabIndex = 0; dataGroup.TabStop = false; dataSourceLabel.SetBounds(8, 24, 161, 16); dataSourceLabel.Text = SR.GetString(SR.ListGeneralPage_DataSourceCaption); dataSourceLabel.TabStop = false; dataSourceLabel.TabIndex = 1; _dataSourceCombo.SetBounds(8, 40, 161, 21); _dataSourceCombo.DropDownStyle = ComboBoxStyle.DropDownList; _dataSourceCombo.Sorted = true; _dataSourceCombo.TabIndex = 2; _dataSourceCombo.NotSetText = SR.GetString(SR.ListGeneralPage_UnboundComboEntry); _dataSourceCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataSource); dataMemberLabel.SetBounds(211, 24, 161, 16); dataMemberLabel.Text = SR.GetString(SR.ListGeneralPage_DataMemberCaption); dataMemberLabel.TabStop = false; dataMemberLabel.TabIndex = 3; _dataMemberCombo.SetBounds(211, 40, 161, 21); _dataMemberCombo.DropDownStyle = ComboBoxStyle.DropDownList; _dataMemberCombo.Sorted = true; _dataMemberCombo.TabIndex = 4; _dataMemberCombo.NotSetText = SR.GetString(SR.ListGeneralPage_NoneComboEntry); _dataMemberCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDataMember); dataTextFieldLabel.SetBounds(8, 67, 161, 16); dataTextFieldLabel.Text = SR.GetString(SR.ListGeneralPage_DataTextFieldCaption); dataTextFieldLabel.TabStop = false; dataTextFieldLabel.TabIndex = 5; _dataTextFieldCombo.SetBounds(8, 83, 161, 21); _dataTextFieldCombo.DropDownStyle = ComboBoxStyle.DropDownList; _dataTextFieldCombo.Sorted = true; _dataTextFieldCombo.TabIndex = 6; _dataTextFieldCombo.NotSetText = SR.GetString(SR.ListGeneralPage_NoneComboEntry); _dataTextFieldCombo.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty); dataValueFieldLabel.SetBounds(211, 67, 161, 16); dataValueFieldLabel.Text = SR.GetString(SR.ListGeneralPage_DataValueFieldCaption); dataValueFieldLabel.TabStop = false; dataValueFieldLabel.TabIndex = 7; _dataValueFieldCombo.SetBounds(211, 83, 161, 21); _dataValueFieldCombo.DropDownStyle = ComboBoxStyle.DropDownList; _dataValueFieldCombo.Sorted = true; _dataValueFieldCombo.TabIndex = 8; _dataValueFieldCombo.NotSetText = SR.GetString(SR.ListGeneralPage_NoneComboEntry); _dataValueFieldCombo.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty); appearanceGroup.SetBounds(4, 120, 372, 16); appearanceGroup.Text = SR.GetString(SR.ListGeneralPage_AppearanceGroupLabel); appearanceGroup.TabIndex = 9; appearanceGroup.TabStop = false; if (_isBaseControlList) { decorationLabel.SetBounds(8, 140, 200, 16); decorationLabel.Text = SR.GetString(SR.ListGeneralPage_DecorationCaption); decorationLabel.TabStop = false; decorationLabel.TabIndex = 10; _decorationCombo.SetBounds(8, 156, 161, 21); _decorationCombo.DropDownStyle = ComboBoxStyle.DropDownList; _decorationCombo.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty); _decorationCombo.Items.AddRange(new object[] { SR.GetString(SR.ListGeneralPage_DecorationNone), SR.GetString(SR.ListGeneralPage_DecorationBulleted), SR.GetString(SR.ListGeneralPage_DecorationNumbered) }); _decorationCombo.TabIndex = 11; pagingGroup.SetBounds(4, 193, 372, 16); pagingGroup.Text = SR.GetString(SR.ListGeneralPage_PagingGroupLabel); pagingGroup.TabIndex = 12; pagingGroup.TabStop = false; itemCountLabel.SetBounds(8, 213, 161, 16); itemCountLabel.Text = SR.GetString(SR.ListGeneralPage_ItemCountCaption); itemCountLabel.TabStop = false; itemCountLabel.TabIndex = 13; _itemCountTextBox.SetBounds(8, 229, 161, 20); _itemCountTextBox.TextChanged += new EventHandler(this.OnSetPageDirty); _itemCountTextBox.KeyPress += new KeyPressEventHandler(this.OnKeyPressNumberTextBox); _itemCountTextBox.TabIndex = 14; itemsPerPageLabel.SetBounds(211, 213, 161, 16); itemsPerPageLabel.Text = SR.GetString(SR.ListGeneralPage_ItemsPerPageCaption); itemsPerPageLabel.TabStop = false; itemsPerPageLabel.TabIndex = 15; _itemsPerPageTextBox.SetBounds(211, 229, 161, 20); _itemsPerPageTextBox.TextChanged += new EventHandler(this.OnSetPageDirty); _itemsPerPageTextBox.KeyPress += new KeyPressEventHandler(this.OnKeyPressNumberTextBox); _itemsPerPageTextBox.TabIndex = 16; } else { selectTypeLabel.SetBounds(8, 140, 161, 16); selectTypeLabel.Text = SR.GetString(SR.ListGeneralPage_SelectTypeCaption); selectTypeLabel.TabStop = false; selectTypeLabel.TabIndex = 10; _selectTypeCombo.SetBounds(8, 156, 161, 21); _selectTypeCombo.DropDownStyle = ComboBoxStyle.DropDownList; _selectTypeCombo.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty); _selectTypeCombo.Items.AddRange(new object[] { SR.GetString(SR.ListGeneralPage_SelectTypeDropDown), SR.GetString(SR.ListGeneralPage_SelectTypeListBox), SR.GetString(SR.ListGeneralPage_SelectTypeRadio), SR.GetString(SR.ListGeneralPage_SelectTypeMultiSelectListBox), SR.GetString(SR.ListGeneralPage_SelectTypeCheckBox) }); _selectTypeCombo.TabIndex = 11; rowsLabel.SetBounds(211, 140, 161, 16); rowsLabel.Text = SR.GetString(SR.ListGeneralPage_RowsCaption); rowsLabel.TabStop = false; rowsLabel.TabIndex = 12; _rowsTextBox.SetBounds(211, 156, 161, 20); _rowsTextBox.TextChanged += new EventHandler(this.OnSetPageDirty); _rowsTextBox.KeyPress += new KeyPressEventHandler(this.OnKeyPressNumberTextBox); _rowsTextBox.TabIndex = 13; } this.Text = SR.GetString(SR.ListGeneralPage_Title); this.Size = new Size(382, 270); this.CommitOnDeactivate = true; this.Icon = new Icon( typeof(System.Web.UI.Design.MobileControls.MobileControlDesigner), "General.ico" ); this.Controls.AddRange(new Control[] { _dataTextFieldCombo, dataTextFieldLabel, _dataValueFieldCombo, dataValueFieldLabel, _dataMemberCombo, dataMemberLabel, _dataSourceCombo, dataSourceLabel, dataGroup, appearanceGroup }); if (_isBaseControlList) { this.Controls.AddRange(new Control[] { _itemsPerPageTextBox, itemsPerPageLabel, _itemCountTextBox, itemCountLabel, pagingGroup, decorationLabel, _decorationCombo }); } else { this.Controls.AddRange(new Control[] { _rowsTextBox, rowsLabel, selectTypeLabel, _selectTypeCombo }); } }