コード例 #1
0
        protected override void InitControls()
        {
            base.InitControls();
            this.te_Value.Visible               = false;
            refCodeBox1                         = new SinoSZClientBase.RefCode.RefCodeBox();
            refCodeBox1.ForeColor               = Color.Blue;
            refCodeBox1.CanEdit                 = true;
            refCodeBox1.CanMultiSelect          = false;
            refCodeBox1.Dock                    = System.Windows.Forms.DockStyle.Fill;
            refCodeBox1.Location                = new System.Drawing.Point(0, 1);
            refCodeBox1.Name                    = "refCodeBox1";
            refCodeBox1.Properties.AutoHeight   = false;
            refCodeBox1.Properties.AllowFocused = false;
            //refCodeBox1.Properties.Appearance.Font = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            refCodeBox1.Properties.Appearance.Options.UseFont        = true;
            refCodeBox1.Properties.Appearance.Options.UseTextOptions = true;
            refCodeBox1.Properties.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Bottom;
            refCodeBox1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
                new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)
            });

            refCodeBox1.ReadOnly     = false;
            refCodeBox1.RefTableName = this.ColumnDefine.ColumnDefine.TableColumn.RefDMB;
            refCodeBox1.Size         = new System.Drawing.Size(450, 20);
            refCodeBox1.TabIndex     = 13;
            refCodeBox1.Properties.LookAndFeel.UseDefaultLookAndFeel = false;
            this.Controls.Add(refCodeBox1);
            refCodeBox1.BringToFront();
        }
コード例 #2
0
        protected override void InitControls()
        {
            Font UseFont = null;

            try
            {
                base.InitControls();
                this.te_Value.Visible = false;

                _uc                                              = new RefCodeBox();
                _uc.ForeColor                                    = Color.Blue;
                _uc.CanEdit                                      = true;
                _uc.CanMultiSelect                               = false;
                _uc.Dock                                         = System.Windows.Forms.DockStyle.Fill;
                _uc.Location                                     = new System.Drawing.Point(0, 1);
                _uc.Name                                         = "refCodeBox1";
                _uc.Properties.AutoHeight                        = false;
                _uc.Properties.AllowFocused                      = false;
                UseFont                                          = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                _uc.Properties.Appearance.Font                   = UseFont;
                _uc.Properties.Appearance.Options.UseFont        = true;
                _uc.Properties.Appearance.Options.UseTextOptions = true;
                _uc.Properties.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Bottom;
                _uc.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
                    new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)
                });
                //refCodeBox1.Properties.Name = "_properties";
                _uc.ReadOnly = false;
                if (paramDefine.CanSelectAll)
                {
                    _uc.AddAllCode(paramDefine.SelectAllCode);
                }

                _uc.RefTableName = paramDefine.RefTableName;
                _uc.Size         = new System.Drawing.Size(450, 20);
                _uc.TabIndex     = 13;
                _uc.Properties.LookAndFeel.UseDefaultLookAndFeel = false;

                _uc.CodeChanged += new EventHandler(_uc_CodeChanged);

                _uc.Dock = DockStyle.Fill;
                this.Controls.Add(_uc);
                _uc.BringToFront();
            }
            finally
            {
                if (UseFont != null)
                {
                    UseFont.Dispose();
                }
            }
        }