Exemple #1
0
        public int CalcHeight(DevExpress.Utils.Drawing.GraphicsCache cache, int width)
        {
            RepositoryItemMyButtonEdit ri = (Item as RepositoryItemMyButtonEdit);
            RichTextEditViewInfo       vi = new RichTextEditViewInfo(ri.RichEdit);

            vi.EditValue = this.EditValue;
            return(vi.CalcHeight(width) + 6);
        }
Exemple #2
0
        private RichTextEditViewInfo GetViewInfo(ControlGraphicsInfoArgs info)
        {
            RepositoryItemMyButtonEdit ri = (info.ViewInfo as ButtonEditViewInfo).Item as RepositoryItemMyButtonEdit;
            RichTextEditViewInfo       vi = new RichTextEditViewInfo(ri.RichEdit);

            vi.Bounds    = info.ViewInfo.ContentRect;
            vi.EditValue = info.ViewInfo.DisplayText;
            vi.CalcViewInfo(info.Graphics);
            return(vi);
        }
Exemple #3
0
 static MyButtonEdit()
 {
     RepositoryItemMyButtonEdit.Register();
 }
Exemple #4
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
     DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
     this.gridControl1 = new DevExpress.XtraGrid.GridControl();
     this.gridView1    = new DevExpress.XtraGrid.Views.Grid.GridView();
     this.gridColumn1  = new DevExpress.XtraGrid.Columns.GridColumn();
     this.gridColumn2  = new DevExpress.XtraGrid.Columns.GridColumn();
     this.gridColumn3  = new DevExpress.XtraGrid.Columns.GridColumn();
     this.repositoryItemMyButtonEdit1 = new WindowsApplication1.RepositoryItemMyButtonEdit();
     this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
     this.repositoryItemMyButtonEdit2 = new WindowsApplication1.RepositoryItemMyButtonEdit();
     this.gridView2     = new DevExpress.XtraGrid.Views.Grid.GridView();
     this.myButtonEdit1 = new WindowsApplication1.MyButtonEdit();
     this.myButtonEdit2 = new WindowsApplication1.MyButtonEdit();
     ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMyButtonEdit1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMyButtonEdit2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.myButtonEdit1.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.myButtonEdit2.Properties)).BeginInit();
     this.SuspendLayout();
     //
     // gridControl1
     //
     this.gridControl1.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
     this.gridControl1.Dock           = System.Windows.Forms.DockStyle.Fill;
     this.gridControl1.Location       = new System.Drawing.Point(0, 0);
     this.gridControl1.MainView       = this.gridView1;
     this.gridControl1.Name           = "gridControl1";
     this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
         this.repositoryItemMyButtonEdit1,
         this.repositoryItemMyButtonEdit2
     });
     this.gridControl1.Size     = new System.Drawing.Size(584, 384);
     this.gridControl1.TabIndex = 2;
     this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
         this.gridView1,
         this.gridView2
     });
     //
     // gridView1
     //
     this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
         this.gridColumn1,
         this.gridColumn2,
         this.gridColumn3,
         this.gridColumn4
     });
     this.gridView1.GridControl = this.gridControl1;
     this.gridView1.Name        = "gridView1";
     //
     // gridColumn1
     //
     this.gridColumn1.Caption      = "gridColumn1";
     this.gridColumn1.FieldName    = "Date";
     this.gridColumn1.Name         = "gridColumn1";
     this.gridColumn1.Visible      = true;
     this.gridColumn1.VisibleIndex = 0;
     //
     // gridColumn2
     //
     this.gridColumn2.Caption      = "gridColumn2";
     this.gridColumn2.FieldName    = "Name";
     this.gridColumn2.Name         = "gridColumn2";
     this.gridColumn2.Visible      = true;
     this.gridColumn2.VisibleIndex = 1;
     //
     // gridColumn3
     //
     this.gridColumn3.Caption      = "gridColumn3";
     this.gridColumn3.ColumnEdit   = this.repositoryItemMyButtonEdit1;
     this.gridColumn3.FieldName    = "Button1";
     this.gridColumn3.Name         = "gridColumn3";
     this.gridColumn3.Visible      = true;
     this.gridColumn3.VisibleIndex = 2;
     //
     // repositoryItemMyButtonEdit1
     //
     this.repositoryItemMyButtonEdit1.AutoHeight = false;
     this.repositoryItemMyButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Button", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, "", null, null, true)
     });
     this.repositoryItemMyButtonEdit1.CheckedChar   = '1';
     this.repositoryItemMyButtonEdit1.Name          = "repositoryItemMyButtonEdit1";
     this.repositoryItemMyButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
     this.repositoryItemMyButtonEdit1.UnchekedChar  = '0';
     //
     // gridColumn4
     //
     this.gridColumn4.Caption      = "gridColumn4";
     this.gridColumn4.ColumnEdit   = this.repositoryItemMyButtonEdit2;
     this.gridColumn4.FieldName    = "Button2";
     this.gridColumn4.Name         = "gridColumn4";
     this.gridColumn4.Visible      = true;
     this.gridColumn4.VisibleIndex = 3;
     //
     // repositoryItemMyButtonEdit2
     //
     this.repositoryItemMyButtonEdit2.AutoHeight = false;
     this.repositoryItemMyButtonEdit2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Button", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject2, "", null, null, true),
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Second button", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject3, "", null, null, true)
     });
     this.repositoryItemMyButtonEdit2.CheckedChar   = '1';
     this.repositoryItemMyButtonEdit2.Name          = "repositoryItemMyButtonEdit2";
     this.repositoryItemMyButtonEdit2.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
     this.repositoryItemMyButtonEdit2.UnchekedChar  = '0';
     //
     // gridView2
     //
     this.gridView2.GridControl = this.gridControl1;
     this.gridView2.Name        = "gridView2";
     //
     // myButtonEdit1
     //
     this.myButtonEdit1.EditValue = "0";
     this.myButtonEdit1.Location  = new System.Drawing.Point(27, 12);
     this.myButtonEdit1.Name      = "myButtonEdit1";
     this.myButtonEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Button", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject4, "", null, null, true)
     });
     this.myButtonEdit1.Properties.CheckedChar   = '1';
     this.myButtonEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
     this.myButtonEdit1.Properties.UnchekedChar  = '0';
     this.myButtonEdit1.Size     = new System.Drawing.Size(100, 20);
     this.myButtonEdit1.TabIndex = 4;
     //
     // myButtonEdit2
     //
     this.myButtonEdit2.EditValue = "01010";
     this.myButtonEdit2.Location  = new System.Drawing.Point(160, 12);
     this.myButtonEdit2.Name      = "myButtonEdit2";
     this.myButtonEdit2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "TEST", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, "", null, null, true),
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "TEST", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject6, "", null, null, true),
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "TEST", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject7, "", null, null, true),
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "TEST", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject8, "", null, null, true),
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "TEST", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, "", null, null, true)
     });
     this.myButtonEdit2.Properties.CheckedChar   = '1';
     this.myButtonEdit2.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
     this.myButtonEdit2.Properties.UnchekedChar  = '0';
     this.myButtonEdit2.Size     = new System.Drawing.Size(412, 20);
     this.myButtonEdit2.TabIndex = 5;
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(584, 384);
     this.Controls.Add(this.myButtonEdit2);
     this.Controls.Add(this.myButtonEdit1);
     this.Controls.Add(this.gridControl1);
     this.Name  = "Form1";
     this.Text  = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMyButtonEdit1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMyButtonEdit2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.myButtonEdit1.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.myButtonEdit2.Properties)).EndInit();
     this.ResumeLayout(false);
 }