コード例 #1
0
 public ItemValueControl()
 {
     InitializeComponent();
     tb                = new TextBox();
     tb.ForeColor      = Color.Blue;
     tb.AcceptsReturn  = true;
     tb.AcceptsTab     = true;
     tb.Dock           = DockStyle.Fill;
     nud               = new NumericUpDown();
     nud.ForeColor     = Color.Blue;
     nud.DecimalPlaces = 2;
     nud.Maximum       = 1000000000;
     nud.Minimum       = -999999999;
     nud.Dock          = DockStyle.Fill;
     dtp               = new DateTimePicker();
     dtp.ForeColor     = Color.Blue;
     dtp.CustomFormat  = "yyyy-MM-dd HH:mm:ss";
     dtp.Format        = DateTimePickerFormat.Custom;
     dtp.Dock          = DockStyle.Fill;
     uc                = new UploadControl();
     uc.Dock           = DockStyle.Fill;
     panel1.Controls.Add(tb);
     comboBox1.Items.Clear();
     SystemType[] types = (SystemType[])Enum.GetValues(typeof(SystemType));
     foreach (SystemType type in types)
     {
         comboBox1.Items.Add(type);
     }
     comboBox1.SelectedIndex = GetIndexByType(SystemType.字符, comboBox1);
     loadOver = true;
 }
コード例 #2
0
 public DocEditControl()
 {
     InitializeComponent();
     tb                      = new TextBox();
     tb.ForeColor            = Color.Blue;
     tb.AcceptsReturn        = true;
     tb.AcceptsTab           = true;
     tb.Dock                 = DockStyle.Fill;
     nud                     = new NumericUpDown();
     nud.ForeColor           = Color.Blue;
     nud.DecimalPlaces       = 2;
     nud.Maximum             = 1000000000;
     nud.Minimum             = -999999999;
     nud.Dock                = DockStyle.Fill;
     dtp                     = new DateTimePicker();
     dtp.ForeColor           = Color.Blue;
     dtp.CustomFormat        = "yyyy-MM-dd HH:mm:ss";
     dtp.Format              = DateTimePickerFormat.Custom;
     dtp.Dock                = DockStyle.Fill;
     uc                      = new UploadControl();
     uc.Dock                 = DockStyle.Fill;
     comboBox1.SelectedIndex = 0;
     field                   = new FormItem();
 }