コード例 #1
0
        /// <include file='doc\UnitControl.uex' path='docs/doc[@for="UnitControl.InitControl"]/*' />
        /// <devdoc>
        ///     Create the contained controls and initialize their settings
        /// </devdoc>
        private void InitControl()
        {
            int editWidth = this.Width - (COMBO_X_SIZE + SEPARATOR_X_SIZE);

            if (editWidth < 0)
            {
                editWidth = 0;
            }

            valueEdit              = new NumberEdit();
            valueEdit.Location     = new Point(0, 0);
            valueEdit.Size         = new Size(editWidth, CTL_Y_SIZE);
            valueEdit.TabIndex     = 0;
            valueEdit.MaxLength    = 10;
            valueEdit.TextChanged += new EventHandler(this.OnValueTextChanged);
            valueEdit.LostFocus   += new EventHandler(this.OnValueLostFocus);

            unitCombo = new ComboBox();
            unitCombo.DropDownStyle         = ComboBoxStyle.DropDownList;
            unitCombo.Location              = new Point(editWidth + SEPARATOR_X_SIZE, 0);
            unitCombo.Size                  = new Size(COMBO_X_SIZE, CTL_Y_SIZE);
            unitCombo.TabIndex              = 1;
            unitCombo.MaxDropDownItems      = 9;
            unitCombo.SelectedIndexChanged += new EventHandler(this.OnUnitSelectedIndexChanged);

            this.Controls.Clear();
            this.Controls.AddRange(new Control[] {
                unitCombo,
                valueEdit
            });

            for (int i = UNIT_PX; i <= UNIT_EX; i++)
            {
                unitCombo.Items.Add(UNIT_VALUES[i]);
            }
            if (allowPercent)
            {
                unitCombo.Items.Add(UNIT_VALUES[UNIT_PERCENT]);
            }
            if (allowNonUnit)
            {
                unitCombo.Items.Add(UNIT_VALUES[UNIT_NONE]);
            }
        }
コード例 #2
0
        private void InitControl()
        {
            int width = base.Width - 0x2c;

            if (width < 0)
            {
                width = 0;
            }
            this.valueEdit                       = new NumberEdit();
            this.valueEdit.Location              = new Point(0, 0);
            this.valueEdit.Size                  = new Size(width, 0x15);
            this.valueEdit.TabIndex              = 0;
            this.valueEdit.MaxLength             = 10;
            this.valueEdit.TextChanged          += new EventHandler(this.OnValueTextChanged);
            this.valueEdit.LostFocus            += new EventHandler(this.OnValueLostFocus);
            this.unitCombo                       = new ComboBox();
            this.unitCombo.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.unitCombo.Location              = new Point(width + 4, 0);
            this.unitCombo.Size                  = new Size(40, 0x15);
            this.unitCombo.TabIndex              = 1;
            this.unitCombo.MaxDropDownItems      = 9;
            this.unitCombo.SelectedIndexChanged += new EventHandler(this.OnUnitSelectedIndexChanged);
            base.Controls.Clear();
            base.Controls.AddRange(new Control[] { this.unitCombo, this.valueEdit });
            for (int i = 0; i <= 7; i++)
            {
                this.unitCombo.Items.Add(UNIT_VALUES[i]);
            }
            if (this.allowPercent)
            {
                this.unitCombo.Items.Add(UNIT_VALUES[8]);
            }
            if (this.allowNonUnit)
            {
                this.unitCombo.Items.Add(UNIT_VALUES[9]);
            }
        }
コード例 #3
0
 private void InitControl()
 {
     int width = base.Width - 0x2c;
     if (width < 0)
     {
         width = 0;
     }
     this.valueEdit = new NumberEdit();
     this.valueEdit.Location = new Point(0, 0);
     this.valueEdit.Size = new Size(width, 0x15);
     this.valueEdit.TabIndex = 0;
     this.valueEdit.MaxLength = 10;
     this.valueEdit.TextChanged += new EventHandler(this.OnValueTextChanged);
     this.valueEdit.LostFocus += new EventHandler(this.OnValueLostFocus);
     this.unitCombo = new ComboBox();
     this.unitCombo.DropDownStyle = ComboBoxStyle.DropDownList;
     this.unitCombo.Location = new Point(width + 4, 0);
     this.unitCombo.Size = new Size(40, 0x15);
     this.unitCombo.TabIndex = 1;
     this.unitCombo.MaxDropDownItems = 9;
     this.unitCombo.SelectedIndexChanged += new EventHandler(this.OnUnitSelectedIndexChanged);
     base.Controls.Clear();
     base.Controls.AddRange(new Control[] { this.unitCombo, this.valueEdit });
     for (int i = 0; i <= 7; i++)
     {
         this.unitCombo.Items.Add(UNIT_VALUES[i]);
     }
     if (this.allowPercent)
     {
         this.unitCombo.Items.Add(UNIT_VALUES[8]);
     }
     if (this.allowNonUnit)
     {
         this.unitCombo.Items.Add(UNIT_VALUES[9]);
     }
 }
 private void InitForm()
 {
     GroupLabel label = new GroupLabel();
     this.showHeaderCheck = new System.Windows.Forms.CheckBox();
     this.showFooterCheck = new System.Windows.Forms.CheckBox();
     GroupLabel label2 = new GroupLabel();
     System.Windows.Forms.Label label3 = new System.Windows.Forms.Label();
     this.repeatColumnsEdit = new NumberEdit();
     System.Windows.Forms.Label label4 = new System.Windows.Forms.Label();
     this.repeatDirectionCombo = new ComboBox();
     System.Windows.Forms.Label label5 = new System.Windows.Forms.Label();
     this.repeatLayoutCombo = new ComboBox();
     GroupLabel label6 = new GroupLabel();
     this.extractRowsCheck = new System.Windows.Forms.CheckBox();
     label.SetBounds(4, 4, 360, 0x10);
     label.Text = System.Design.SR.GetString("DLGen_HeaderFooterGroup");
     label.TabIndex = 7;
     label.TabStop = false;
     this.showHeaderCheck.SetBounds(8, 0x18, 170, 0x10);
     this.showHeaderCheck.TabIndex = 8;
     this.showHeaderCheck.Text = System.Design.SR.GetString("DLGen_ShowHeader");
     this.showHeaderCheck.TextAlign = ContentAlignment.MiddleLeft;
     this.showHeaderCheck.FlatStyle = FlatStyle.System;
     this.showHeaderCheck.CheckedChanged += new EventHandler(this.OnCheckChangedShowHeader);
     this.showFooterCheck.SetBounds(8, 0x2a, 170, 0x10);
     this.showFooterCheck.TabIndex = 9;
     this.showFooterCheck.Text = System.Design.SR.GetString("DLGen_ShowFooter");
     this.showFooterCheck.TextAlign = ContentAlignment.MiddleLeft;
     this.showFooterCheck.FlatStyle = FlatStyle.System;
     this.showFooterCheck.CheckedChanged += new EventHandler(this.OnCheckChangedShowFooter);
     label2.SetBounds(4, 0x44, 360, 0x10);
     label2.Text = System.Design.SR.GetString("DLGen_RepeatLayoutGroup");
     label2.TabIndex = 10;
     label2.TabStop = false;
     label3.SetBounds(8, 0x58, 0x6a, 0x10);
     label3.Text = System.Design.SR.GetString("DLGen_RepeatColumns");
     label3.TabStop = false;
     label3.TabIndex = 11;
     this.repeatColumnsEdit.SetBounds(0x70, 0x54, 40, 0x15);
     this.repeatColumnsEdit.AllowDecimal = false;
     this.repeatColumnsEdit.AllowNegative = false;
     this.repeatColumnsEdit.TabIndex = 12;
     this.repeatColumnsEdit.TextChanged += new EventHandler(this.OnChangedRepeatProps);
     label4.SetBounds(8, 0x71, 0x6a, 0x10);
     label4.Text = System.Design.SR.GetString("DLGen_RepeatDirection");
     label4.TabStop = false;
     label4.TabIndex = 13;
     this.repeatDirectionCombo.SetBounds(0x70, 0x6d, 140, 0x38);
     this.repeatDirectionCombo.DropDownStyle = ComboBoxStyle.DropDownList;
     this.repeatDirectionCombo.Items.AddRange(new object[] { System.Design.SR.GetString("DLGen_RD_Horz"), System.Design.SR.GetString("DLGen_RD_Vert") });
     this.repeatDirectionCombo.TabIndex = 14;
     this.repeatDirectionCombo.SelectedIndexChanged += new EventHandler(this.OnChangedRepeatProps);
     label5.SetBounds(8, 0x8a, 0x6a, 0x10);
     label5.Text = System.Design.SR.GetString("DLGen_RepeatLayout");
     label5.TabStop = false;
     label5.TabIndex = 15;
     this.repeatLayoutCombo.SetBounds(0x70, 0x86, 140, 0x15);
     this.repeatLayoutCombo.DropDownStyle = ComboBoxStyle.DropDownList;
     this.repeatLayoutCombo.Items.AddRange(new object[] { System.Design.SR.GetString("DLGen_RL_Table"), System.Design.SR.GetString("DLGen_RL_Flow") });
     this.repeatLayoutCombo.TabIndex = 0x10;
     this.repeatLayoutCombo.SelectedIndexChanged += new EventHandler(this.OnChangedRepeatProps);
     label6.SetBounds(4, 0xa2, 360, 0x10);
     label6.Text = System.Design.SR.GetString("DLGen_Templates");
     label6.TabIndex = 0x11;
     label6.TabStop = false;
     label6.Visible = false;
     this.extractRowsCheck.SetBounds(8, 0xb6, 260, 0x10);
     this.extractRowsCheck.Text = System.Design.SR.GetString("DLGen_ExtractRows");
     this.extractRowsCheck.TabIndex = 0x12;
     this.extractRowsCheck.Visible = false;
     this.extractRowsCheck.FlatStyle = FlatStyle.System;
     this.extractRowsCheck.CheckedChanged += new EventHandler(this.OnCheckChangedExtractRows);
     this.Text = System.Design.SR.GetString("DLGen_Text");
     base.AccessibleDescription = System.Design.SR.GetString("DLGen_Desc");
     base.Size = new Size(0x170, 280);
     base.CommitOnDeactivate = true;
     base.Icon = new Icon(base.GetType(), "DataListGeneralPage.ico");
     base.Controls.Clear();
     base.Controls.AddRange(new Control[] { this.extractRowsCheck, label6, this.repeatLayoutCombo, label5, this.repeatDirectionCombo, label4, this.repeatColumnsEdit, label3, label2, this.showFooterCheck, this.showHeaderCheck, label });
 }
 private void InitForm()
 {
     GroupLabel label = new GroupLabel();
     this.allowPagingCheck = new System.Windows.Forms.CheckBox();
     this.allowCustomPagingCheck = new System.Windows.Forms.CheckBox();
     System.Windows.Forms.Label label2 = new System.Windows.Forms.Label();
     this.pageSizeEdit = new NumberEdit();
     System.Windows.Forms.Label label3 = new System.Windows.Forms.Label();
     GroupLabel label4 = new GroupLabel();
     this.visibleCheck = new System.Windows.Forms.CheckBox();
     System.Windows.Forms.Label label5 = new System.Windows.Forms.Label();
     this.posCombo = new ComboBox();
     System.Windows.Forms.Label label6 = new System.Windows.Forms.Label();
     this.modeCombo = new ComboBox();
     System.Windows.Forms.Label label7 = new System.Windows.Forms.Label();
     this.nextPageTextEdit = new System.Windows.Forms.TextBox();
     System.Windows.Forms.Label label8 = new System.Windows.Forms.Label();
     this.prevPageTextEdit = new System.Windows.Forms.TextBox();
     System.Windows.Forms.Label label9 = new System.Windows.Forms.Label();
     this.pageButtonCountEdit = new NumberEdit();
     label.SetBounds(4, 4, 0x1af, 0x10);
     label.Text = System.Design.SR.GetString("DGPg_PagingGroup");
     label.TabStop = false;
     label.TabIndex = 0;
     this.allowPagingCheck.SetBounds(12, 0x18, 180, 0x10);
     this.allowPagingCheck.Text = System.Design.SR.GetString("DGPg_AllowPaging");
     this.allowPagingCheck.TextAlign = ContentAlignment.MiddleLeft;
     this.allowPagingCheck.TabIndex = 1;
     this.allowPagingCheck.FlatStyle = FlatStyle.System;
     this.allowPagingCheck.CheckedChanged += new EventHandler(this.OnCheckChangedAllowPaging);
     this.allowCustomPagingCheck.SetBounds(220, 0x18, 180, 0x10);
     this.allowCustomPagingCheck.Text = System.Design.SR.GetString("DGPg_AllowCustomPaging");
     this.allowCustomPagingCheck.TextAlign = ContentAlignment.MiddleLeft;
     this.allowCustomPagingCheck.TabIndex = 2;
     this.allowCustomPagingCheck.FlatStyle = FlatStyle.System;
     this.allowCustomPagingCheck.CheckedChanged += new EventHandler(this.OnCheckChangedAllowCustomPaging);
     label2.SetBounds(12, 50, 100, 14);
     label2.Text = System.Design.SR.GetString("DGPg_PageSize");
     label2.TabStop = false;
     label2.TabIndex = 3;
     this.pageSizeEdit.SetBounds(0x70, 0x2e, 40, 0x18);
     this.pageSizeEdit.TabIndex = 4;
     this.pageSizeEdit.AllowDecimal = false;
     this.pageSizeEdit.AllowNegative = false;
     this.pageSizeEdit.TextChanged += new EventHandler(this.OnTextChangedPageSize);
     label3.SetBounds(0x9e, 50, 80, 14);
     label3.Text = System.Design.SR.GetString("DGPg_Rows");
     label3.TabStop = false;
     label3.TabIndex = 5;
     label4.SetBounds(4, 0x4e, 0x1af, 14);
     label4.Text = System.Design.SR.GetString("DGPg_NavigationGroup");
     label4.TabStop = false;
     label4.TabIndex = 6;
     this.visibleCheck.SetBounds(12, 100, 260, 0x10);
     this.visibleCheck.Text = System.Design.SR.GetString("DGPg_Visible");
     this.visibleCheck.TextAlign = ContentAlignment.MiddleLeft;
     this.visibleCheck.TabIndex = 7;
     this.visibleCheck.FlatStyle = FlatStyle.System;
     this.visibleCheck.CheckedChanged += new EventHandler(this.OnCheckChangedVisible);
     label5.SetBounds(12, 0x7a, 150, 14);
     label5.Text = System.Design.SR.GetString("DGPg_Position");
     label5.TabStop = false;
     label5.TabIndex = 8;
     this.posCombo.SetBounds(12, 0x8a, 0x90, 0x15);
     this.posCombo.TabIndex = 9;
     this.posCombo.DropDownStyle = ComboBoxStyle.DropDownList;
     this.posCombo.Items.AddRange(new object[] { System.Design.SR.GetString("DGPg_Pos_Top"), System.Design.SR.GetString("DGPg_Pos_Bottom"), System.Design.SR.GetString("DGPg_Pos_TopBottom") });
     this.posCombo.SelectedIndexChanged += new EventHandler(this.OnPagerChanged);
     label6.SetBounds(12, 0xa6, 150, 14);
     label6.Text = System.Design.SR.GetString("DGPg_Mode");
     label6.TabStop = false;
     label6.TabIndex = 10;
     this.modeCombo.SetBounds(12, 0xb6, 0x90, 0x40);
     this.modeCombo.TabIndex = 11;
     this.modeCombo.DropDownStyle = ComboBoxStyle.DropDownList;
     this.modeCombo.Items.AddRange(new object[] { System.Design.SR.GetString("DGPg_Mode_Buttons"), System.Design.SR.GetString("DGPg_Mode_Numbers") });
     this.modeCombo.SelectedIndexChanged += new EventHandler(this.OnPagerChanged);
     label7.SetBounds(12, 210, 200, 14);
     label7.Text = System.Design.SR.GetString("DGPg_NextPage");
     label7.TabStop = false;
     label7.TabIndex = 12;
     this.nextPageTextEdit.SetBounds(12, 0xe2, 0x90, 0x18);
     this.nextPageTextEdit.TabIndex = 13;
     this.nextPageTextEdit.TextChanged += new EventHandler(this.OnPagerChanged);
     label8.SetBounds(220, 210, 200, 14);
     label8.Text = System.Design.SR.GetString("DGPg_PrevPage");
     label8.TabStop = false;
     label8.TabIndex = 14;
     this.prevPageTextEdit.SetBounds(220, 0xe2, 140, 0x18);
     this.prevPageTextEdit.TabIndex = 15;
     this.prevPageTextEdit.TextChanged += new EventHandler(this.OnPagerChanged);
     label9.SetBounds(12, 0xfe, 200, 14);
     label9.Text = System.Design.SR.GetString("DGPg_ButtonCount");
     label9.TabStop = false;
     label9.TabIndex = 0x10;
     this.pageButtonCountEdit.SetBounds(12, 270, 40, 0x18);
     this.pageButtonCountEdit.TabIndex = 0x11;
     this.pageButtonCountEdit.AllowDecimal = false;
     this.pageButtonCountEdit.AllowNegative = false;
     this.pageButtonCountEdit.TextChanged += new EventHandler(this.OnPagerChanged);
     this.Text = System.Design.SR.GetString("DGPg_Text");
     base.AccessibleDescription = System.Design.SR.GetString("DGPg_Desc");
     base.Size = new Size(0x1d0, 300);
     base.CommitOnDeactivate = true;
     base.Icon = new Icon(base.GetType(), "DataGridPagingPage.ico");
     base.Controls.Clear();
     base.Controls.AddRange(new Control[] { 
         this.pageButtonCountEdit, label9, this.prevPageTextEdit, label8, this.nextPageTextEdit, label7, this.modeCombo, label6, this.posCombo, label5, this.visibleCheck, label4, label3, this.pageSizeEdit, label2, this.allowCustomPagingCheck, 
         this.allowPagingCheck, label
      });
 }
コード例 #6
0
 private void InitForm()
 {
     GroupLabel label = new GroupLabel();
     System.Windows.Forms.Label label2 = new System.Windows.Forms.Label();
     this.cellPaddingEdit = new NumberEdit();
     System.Windows.Forms.Label label3 = new System.Windows.Forms.Label();
     this.cellSpacingEdit = new NumberEdit();
     GroupLabel label4 = new GroupLabel();
     System.Windows.Forms.Label label5 = new System.Windows.Forms.Label();
     this.gridLinesCombo = new ComboBox();
     System.Windows.Forms.Label label6 = new System.Windows.Forms.Label();
     this.borderColorCombo = new ColorComboBox();
     this.borderColorPickerButton = new System.Windows.Forms.Button();
     System.Windows.Forms.Label label7 = new System.Windows.Forms.Label();
     this.borderWidthUnit = new UnitControl();
     label.SetBounds(4, 4, 300, 0x10);
     label.Text = System.Design.SR.GetString("BDLBor_CellMarginsGroup");
     label.TabStop = false;
     label.TabIndex = 0;
     label2.Text = System.Design.SR.GetString("BDLBor_CellPadding");
     label2.SetBounds(12, 0x18, 120, 14);
     label2.TabStop = false;
     label2.TabIndex = 1;
     this.cellPaddingEdit.SetBounds(12, 40, 70, 20);
     this.cellPaddingEdit.AllowDecimal = false;
     this.cellPaddingEdit.AllowNegative = false;
     this.cellPaddingEdit.TabIndex = 2;
     this.cellPaddingEdit.TextChanged += new EventHandler(this.OnBordersChanged);
     label3.Text = System.Design.SR.GetString("BDLBor_CellSpacing");
     label3.SetBounds(160, 0x18, 120, 14);
     label3.TabStop = false;
     label3.TabIndex = 3;
     this.cellSpacingEdit.SetBounds(160, 40, 70, 20);
     this.cellSpacingEdit.AllowDecimal = false;
     this.cellSpacingEdit.AllowNegative = false;
     this.cellSpacingEdit.TabIndex = 4;
     this.cellSpacingEdit.TextChanged += new EventHandler(this.OnBordersChanged);
     label4.SetBounds(4, 70, 300, 0x10);
     label4.Text = System.Design.SR.GetString("BDLBor_BorderLinesGroup");
     label4.TabStop = false;
     label4.TabIndex = 5;
     label5.Text = System.Design.SR.GetString("BDLBor_GridLines");
     label5.SetBounds(12, 90, 150, 14);
     label5.TabStop = false;
     label5.TabIndex = 6;
     this.gridLinesCombo.SetBounds(12, 0x6a, 140, 0x15);
     this.gridLinesCombo.DropDownStyle = ComboBoxStyle.DropDownList;
     this.gridLinesCombo.Items.Clear();
     this.gridLinesCombo.Items.AddRange(new object[] { System.Design.SR.GetString("BDLBor_GL_Horz"), System.Design.SR.GetString("BDLBor_GL_Vert"), System.Design.SR.GetString("BDLBor_GL_Both"), System.Design.SR.GetString("BDLBor_GL_None") });
     this.gridLinesCombo.TabIndex = 7;
     this.gridLinesCombo.SelectedIndexChanged += new EventHandler(this.OnBordersChanged);
     label6.Text = System.Design.SR.GetString("BDLBor_BorderColor");
     label6.SetBounds(12, 0x86, 150, 14);
     label6.TabStop = false;
     label6.TabIndex = 8;
     this.borderColorCombo.SetBounds(12, 150, 140, 0x15);
     this.borderColorCombo.TabIndex = 9;
     this.borderColorCombo.TextChanged += new EventHandler(this.OnBordersChanged);
     this.borderColorCombo.SelectedIndexChanged += new EventHandler(this.OnBordersChanged);
     this.borderColorPickerButton.SetBounds(0x9c, 0x95, 0x18, 0x16);
     this.borderColorPickerButton.Text = "...";
     this.borderColorPickerButton.TabIndex = 10;
     this.borderColorPickerButton.FlatStyle = FlatStyle.System;
     this.borderColorPickerButton.Click += new EventHandler(this.OnClickColorPicker);
     this.borderColorPickerButton.AccessibleName = System.Design.SR.GetString("BDLBor_ChooseColorButton");
     this.borderColorPickerButton.AccessibleDescription = System.Design.SR.GetString("BDLBor_ChooseColorDesc");
     label7.Text = System.Design.SR.GetString("BDLBor_BorderWidth");
     label7.SetBounds(12, 0xb2, 150, 14);
     label7.TabStop = false;
     label7.TabIndex = 11;
     this.borderWidthUnit.SetBounds(12, 0xc2, 0x66, 0x16);
     this.borderWidthUnit.AllowNegativeValues = false;
     this.borderWidthUnit.AllowPercentValues = false;
     this.borderWidthUnit.DefaultUnit = 0;
     this.borderWidthUnit.TabIndex = 12;
     this.borderWidthUnit.Changed += new EventHandler(this.OnBordersChanged);
     this.borderWidthUnit.ValueAccessibleDescription = System.Design.SR.GetString("BDLBor_BorderWidthValueDesc");
     this.borderWidthUnit.ValueAccessibleName = System.Design.SR.GetString("BDLBor_BorderWidthValueName");
     this.borderWidthUnit.UnitAccessibleDescription = System.Design.SR.GetString("BDLBor_BorderWidthUnitDesc");
     this.borderWidthUnit.UnitAccessibleName = System.Design.SR.GetString("BDLBor_BorderWidthUnitName");
     this.Text = System.Design.SR.GetString("BDLBor_Text");
     base.AccessibleDescription = System.Design.SR.GetString("BDLBor_Desc");
     base.Size = new Size(0x134, 0x9c);
     base.CommitOnDeactivate = true;
     base.Icon = new Icon(base.GetType(), "BordersPage.ico");
     base.Controls.Clear();
     base.Controls.AddRange(new Control[] { this.borderWidthUnit, label7, this.borderColorPickerButton, this.borderColorCombo, label6, this.gridLinesCombo, label5, label4, this.cellSpacingEdit, label3, this.cellPaddingEdit, label2, label });
 }