protected override void setControl() { AgcControl agcCheckBox = new AgcControl(); this.MCheckBox = new CheckBox(); this.MCheckBox.AutoSize = true; this.MCheckBox.Name = this.generateName(); this.MCheckBox.TabIndex = this.Index; this.MCheckBox.Text = this.Title; this.MCheckBox.Width = this.MCheckBox.PreferredSize.Width; this.MCheckBox.CheckedChanged += new EventHandler(MCheckBox_CheckedChanged); agcCheckBox.MControl = this.MCheckBox; AgcControl agcText = new AgcControl(); agcText.MarginTop = -4; agcText.MarginLeft = 2; agcText.Index = 2; this.MTextBox = new TextBox(); this.MTextBox.TabIndex = this.Index + 1; this.MTextBox.Name = this.generateName(); this.MTextBox.Size = new System.Drawing.Size(mTextWidth, 21); this.MTextBox.TabIndex = this.Index; this.MTextBox.MaxLength = mMaxLength; this.MTextBox.Enabled = false; agcText.MControl = this.MTextBox; this.MAgcCtlList.Add(agcCheckBox); this.MAgcCtlList.Add(agcText); }
private void addControl(int labelIndex, int dtpIndex) { AgcControl agcLabel = new AgcControl(); agcLabel.Index = labelIndex; this.MLabel = new Label(); this.MLabel.AutoSize = true; this.MLabel.Name = this.generateName(); this.MLabel.Text = this.Title; this.MLabel.Width = this.MLabel.PreferredWidth; if (mFontBold) { this.MLabel.Font = new System.Drawing.Font(this.MLabel.Font, System.Drawing.FontStyle.Bold); } agcLabel.MControl = this.MLabel; AgcControl agcDtp = new AgcControl(); agcDtp.Index = dtpIndex; agcDtp.MarginLeft = 2; agcDtp.MarginTop = -4; agcDtp.MarginRight = 2; this.MDateTimePicker = new DateTimePicker(); this.MDateTimePicker.Size = new System.Drawing.Size(mDateWidth, 21); this.MDateTimePicker.Name = this.generateName(); this.MDateTimePicker.TabIndex = this.Index; this.MDateTimePicker.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00"); agcDtp.MControl = this.MDateTimePicker; this.MAgcCtlList.Add(agcLabel); this.MAgcCtlList.Add(agcDtp); }
protected override void setControl() { AgcControl agcbutton = new AgcControl(); agcbutton.Index = 1; this.MButton = new Button(); if (mBtnWidth == 0 && mBtnHeight == 0) { this.MButton.AutoSize = true; } else { this.MButton.Size = new System.Drawing.Size(mBtnWidth, mBtnHeight); } this.MButton.Name = this.generateName(); this.MButton.Text = this.Title; this.MButton.UseVisualStyleBackColor = true; this.MButton.Width = this.MButton.PreferredSize.Width; if (mEventHandler != null) { this.MButton.Click += mEventHandler; } agcbutton.MControl = this.MButton; MAgcCtlList.Add(agcbutton); }
protected override void setControl() { AgcControl agcLabel = new AgcControl(); agcLabel.Index = 1; this.MLabel = new Label(); this.MLabel.AutoSize = true; this.MLabel.Name = this.generateName(); this.MLabel.Text = Title; this.MLabel.Width = this.MLabel.PreferredWidth; if (mFontBold) { this.MLabel.Font = new System.Drawing.Font(this.MLabel.Font, System.Drawing.FontStyle.Bold); } agcLabel.MControl = this.MLabel; AgcControl agcPanel = new AgcControl(); agcPanel.MarginTop = -11; agcPanel.MarginLeft = -8; agcPanel.Index = 2; this.MPanel = new Panel(); this.MPanel.TabIndex = this.Index; this.MPanel.Name = this.generateName(); this.MPanel.Size = new System.Drawing.Size(mPanelWidth, 25); this.MPanel.TabIndex = this.Index; agcPanel.MControl = this.MPanel; this.MAgcCtlList.Add(agcLabel); this.MAgcCtlList.Add(agcPanel); }
protected override void setControl() { AgcControl agcLabelTitle = new AgcControl(); agcLabelTitle.Index = 1; this.MLabelTitle = new Label(); this.MLabelTitle.AutoSize = true; this.MLabelTitle.Name = this.generateName(); this.MLabelTitle.Text = this.Title; this.MLabelTitle.Width = this.MLabelTitle.PreferredWidth; if (mFontBold) { this.MLabelTitle.Font = new Font(this.MLabelTitle.Font, FontStyle.Bold); } agcLabelTitle.MControl = this.MLabelTitle; AgcControl agcLabelValue = new AgcControl(); agcLabelValue.Index = 2; agcLabelValue.MarginLeft = 2; this.MLabelValue = new Label(); this.MLabelValue.AutoSize = true; this.MLabelValue.Name = this.generateName(); this.MLabelValue.Text = String.Empty; this.MLabelValue.Width = this.MLabelValue.PreferredWidth; agcLabelValue.MControl = this.MLabelValue; this.MAgcCtlList.Add(agcLabelTitle); this.MAgcCtlList.Add(agcLabelValue); }
protected override void setControl() { AgcControl agcLabel = new AgcControl(); agcLabel.Index = 1; this.MLabel = new Label(); this.MLabel.AutoSize = true; this.MLabel.Name = this.generateName(); this.MLabel.Text = Title; this.MLabel.Width = this.MLabel.PreferredWidth; if (mFontBold) { this.MLabel.Font = new System.Drawing.Font(this.MLabel.Font, System.Drawing.FontStyle.Bold); } agcLabel.MControl = this.MLabel; AgcControl agcText = new AgcControl(); agcText.MarginTop = -4; agcText.MarginLeft = 2; agcText.Index = 2; this.MTextBox = new TextBox(); this.MTextBox.TabIndex = this.Index; this.MTextBox.Name = this.generateName(); this.MTextBox.Size = new System.Drawing.Size(textWidth, 21); this.MTextBox.TabIndex = this.Index; this.MTextBox.MaxLength = mMaxLength; agcText.MControl = this.MTextBox; this.MAgcCtlList.Add(agcLabel); this.MAgcCtlList.Add(agcText); }
protected override void setControl() { AgcControl agc = new AgcControl(); this.MRadioButton = new RadioButton(); this.MRadioButton.AutoSize = true; this.MRadioButton.Name = this.generateName(); this.MRadioButton.TabIndex = this.Index; this.MRadioButton.Text = this.Title; this.MRadioButton.Width = this.MRadioButton.PreferredSize.Width; agc.MControl = this.MRadioButton; this.MAgcCtlList.Add(agc); }
protected override void setControl() { AgcControl agcCheckBox = new AgcControl(); this.MCheckBox = new CheckBox(); this.MCheckBox.AutoSize = true; this.MCheckBox.Name = this.generateName(); this.MCheckBox.TabIndex = this.Index; this.MCheckBox.Text = this.Title; this.MCheckBox.Width = this.MCheckBox.PreferredSize.Width; agcCheckBox.MControl = this.MCheckBox; this.MAgcCtlList.Add(agcCheckBox); }
protected override void setControl() { base.setControl(); AgcControl agcBehind = new AgcControl(); agcBehind.Index = 3; this.MLabelBehine = new Label(); this.MLabelBehine.AutoSize = true; this.MLabelBehine.Name = this.generateName(); this.MLabelBehine.Text = mBehineText; this.MLabelBehine.Width = this.MLabelBehine.PreferredWidth; agcBehind.MControl = this.MLabelBehine; MAgcCtlList.Add(agcBehind); }
protected override void setControl() { AgcControl agcLabel = new AgcControl(); agcLabel.Index = 1; this.MLabel = new Label(); this.MLabel.AutoSize = true; this.MLabel.Name = this.generateName(); this.MLabel.Text = this.Title; this.MLabel.Width = this.MLabel.PreferredWidth; if (mFontBold) { this.MLabel.Font = new System.Drawing.Font(this.MLabel.Font, System.Drawing.FontStyle.Bold); } agcLabel.MControl = this.MLabel; AgcControl agcComboBox = new AgcControl(); agcComboBox.Index = 2; agcComboBox.MarginTop = -4; agcComboBox.MarginLeft = 2; this.MComboBox = new ComboBox(); this.MComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.MComboBox.FormattingEnabled = true; this.MComboBox.Name = this.generateName(); this.MComboBox.Size = new System.Drawing.Size(mCbLength, 20); this.MComboBox.TabIndex = this.Index; List <AgcKeyValue> list = new List <AgcKeyValue>(); foreach (String var in mOptions) { String[] o = var.Split('='); if (o.Length != 2) { continue; } list.Add(new AgcKeyValue(o[0].Trim(), o[1].Trim())); } this.MComboBox.DataSource = list; this.MComboBox.DisplayMember = "Value"; this.MComboBox.ValueMember = "Key"; //this.MComboBox.SelectedIndex = 0; agcComboBox.MControl = this.MComboBox; this.MAgcCtlList.Add(agcLabel); this.MAgcCtlList.Add(agcComboBox); }