Пример #1
0
        private void AddInsetTypesColumn()
        {
            if (ItemsDataGrid.Columns.Contains("InsetTypesColumn"))
            {
                return;
            }
            DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle()
            {
                Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter,
                NullValue = false
            };

            ComponentFactory.Krypton.Toolkit.KryptonDataGridViewCheckBoxColumn CheckBoxColumn = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewCheckBoxColumn()
            {
                DefaultCellStyle   = dataGridViewCellStyle1,
                FalseValue         = null,
                HeaderText         = "",
                IndeterminateValue = null,
                Name         = "InsetTypesColumn",
                TrueValue    = null,
                AutoSizeMode = DataGridViewAutoSizeColumnMode.None,
                Width        = 60,
                ReadOnly     = false,
                SortMode     = DataGridViewColumnSortMode.Automatic,
                DisplayIndex = 0
            };
            ItemsDataGrid.Columns.Add(CheckBoxColumn);
        }
 /// <summary> 
 /// Método necesario para admitir el Diseñador. No se puede modificar 
 /// el contenido del método con el editor de código.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     this.kryptonHeader2 = new ComponentFactory.Krypton.Toolkit.KryptonHeader();
     this.kryptonPanel1 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.formularioKryptonDataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
     this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.formularioBindingSource = new System.Windows.Forms.BindingSource(this.components);
     this.panel1 = new System.Windows.Forms.Panel();
     this.cmbMenus = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
     this.menuBindingSource = new System.Windows.Forms.BindingSource(this.components);
     this.label2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
     this.dgvPermisos = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
     this.ID = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
     this.Accion = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
     this.Permitir = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewCheckBoxColumn();
     this.panel2 = new System.Windows.Forms.Panel();
     this.chkTodos = new ComponentFactory.Krypton.Toolkit.KryptonCheckBox();
     this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
     this.kryptonPanel1.SuspendLayout();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.formularioKryptonDataGridView)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.formularioBindingSource)).BeginInit();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.cmbMenus)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.menuBindingSource)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dgvPermisos)).BeginInit();
     this.panel2.SuspendLayout();
     this.SuspendLayout();
     //
     // kryptonHeader2
     //
     this.kryptonHeader2.Dock = System.Windows.Forms.DockStyle.Top;
     this.kryptonHeader2.HeaderStyle = ComponentFactory.Krypton.Toolkit.HeaderStyle.Secondary;
     this.kryptonHeader2.Location = new System.Drawing.Point(0, 0);
     this.kryptonHeader2.Name = "kryptonHeader2";
     this.kryptonHeader2.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.kryptonHeader2.Size = new System.Drawing.Size(689, 22);
     this.kryptonHeader2.TabIndex = 1;
     this.kryptonHeader2.Text = "Permisos";
     this.kryptonHeader2.Values.Description = "";
     this.kryptonHeader2.Values.Heading = "Permisos";
     this.kryptonHeader2.Values.Image = null;
     //
     // kryptonPanel1
     //
     this.kryptonPanel1.Controls.Add(this.splitContainer1);
     this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.kryptonPanel1.Location = new System.Drawing.Point(0, 22);
     this.kryptonPanel1.Name = "kryptonPanel1";
     this.kryptonPanel1.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.kryptonPanel1.PanelBackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.PanelClient;
     this.kryptonPanel1.Size = new System.Drawing.Size(689, 174);
     this.kryptonPanel1.TabIndex = 2;
     //
     // splitContainer1
     //
     this.splitContainer1.BackColor = System.Drawing.Color.Transparent;
     this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     this.splitContainer1.Location = new System.Drawing.Point(0, 0);
     this.splitContainer1.Name = "splitContainer1";
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.AutoScroll = true;
     this.splitContainer1.Panel1.Controls.Add(this.formularioKryptonDataGridView);
     this.splitContainer1.Panel1.Controls.Add(this.panel1);
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.dgvPermisos);
     this.splitContainer1.Panel2.Controls.Add(this.panel2);
     this.splitContainer1.Size = new System.Drawing.Size(689, 174);
     this.splitContainer1.SplitterDistance = 421;
     this.splitContainer1.TabIndex = 0;
     //
     // formularioKryptonDataGridView
     //
     this.formularioKryptonDataGridView.AllowUserToAddRows = false;
     this.formularioKryptonDataGridView.AllowUserToDeleteRows = false;
     this.formularioKryptonDataGridView.AutoGenerateColumns = false;
     this.formularioKryptonDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.dataGridViewTextBoxColumn2,
     this.dataGridViewTextBoxColumn3,
     this.dataGridViewTextBoxColumn5});
     this.formularioKryptonDataGridView.DataSource = this.formularioBindingSource;
     this.formularioKryptonDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
     this.formularioKryptonDataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Sheet;
     this.formularioKryptonDataGridView.GridStyles.StyleBackground = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundSheet;
     this.formularioKryptonDataGridView.GridStyles.StyleColumn = ComponentFactory.Krypton.Toolkit.GridStyle.Sheet;
     this.formularioKryptonDataGridView.GridStyles.StyleDataCells = ComponentFactory.Krypton.Toolkit.GridStyle.Sheet;
     this.formularioKryptonDataGridView.GridStyles.StyleRow = ComponentFactory.Krypton.Toolkit.GridStyle.Sheet;
     this.formularioKryptonDataGridView.Location = new System.Drawing.Point(0, 40);
     this.formularioKryptonDataGridView.Name = "formularioKryptonDataGridView";
     this.formularioKryptonDataGridView.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.formularioKryptonDataGridView.ReadOnly = true;
     this.formularioKryptonDataGridView.RowHeadersWidth = 10;
     this.formularioKryptonDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.formularioKryptonDataGridView.Size = new System.Drawing.Size(421, 134);
     this.formularioKryptonDataGridView.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundSheet;
     this.formularioKryptonDataGridView.TabIndex = 1;
     this.formularioKryptonDataGridView.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvFormularios_CellEnter);
     //
     // dataGridViewTextBoxColumn2
     //
     this.dataGridViewTextBoxColumn2.DataPropertyName = "FormularioID";
     this.dataGridViewTextBoxColumn2.HeaderText = "ID";
     this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
     this.dataGridViewTextBoxColumn2.ReadOnly = true;
     this.dataGridViewTextBoxColumn2.Width = 40;
     //
     // dataGridViewTextBoxColumn3
     //
     this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
     this.dataGridViewTextBoxColumn3.DataPropertyName = "Nombre";
     this.dataGridViewTextBoxColumn3.HeaderText = "Nombre";
     this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
     this.dataGridViewTextBoxColumn3.ReadOnly = true;
     //
     // dataGridViewTextBoxColumn5
     //
     this.dataGridViewTextBoxColumn5.DataPropertyName = "Descripcion";
     this.dataGridViewTextBoxColumn5.HeaderText = "Descripcion";
     this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
     this.dataGridViewTextBoxColumn5.ReadOnly = true;
     //
     // formularioBindingSource
     //
     this.formularioBindingSource.DataSource = typeof(ExactTarget.Business.Entities.Formulario);
     //
     // panel1
     //
     this.panel1.Controls.Add(this.cmbMenus);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(421, 40);
     this.panel1.TabIndex = 0;
     //
     // cmbMenus
     //
     this.cmbMenus.DataSource = this.menuBindingSource;
     this.cmbMenus.DisplayMember = "Nombre";
     this.cmbMenus.DropBackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.ControlClient;
     this.cmbMenus.DropButtonStyle = ComponentFactory.Krypton.Toolkit.ButtonStyle.InputControl;
     this.cmbMenus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmbMenus.DropDownWidth = 190;
     this.cmbMenus.InputControlStyle = ComponentFactory.Krypton.Toolkit.InputControlStyle.Standalone;
     this.cmbMenus.ItemStyle = ComponentFactory.Krypton.Toolkit.ButtonStyle.ListItem;
     this.cmbMenus.Location = new System.Drawing.Point(90, 9);
     this.cmbMenus.Name = "cmbMenus";
     this.cmbMenus.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.cmbMenus.Size = new System.Drawing.Size(190, 21);
     this.cmbMenus.TabIndex = 4;
     this.cmbMenus.ValueMember = "MenuID";
     this.cmbMenus.SelectedIndexChanged += new System.EventHandler(this.cmbMenus_SelectedIndexChanged);
     //
     // menuBindingSource
     //
     this.menuBindingSource.DataSource = typeof(ExactTarget.Business.Entities.Menu);
     //
     // label2
     //
     this.label2.LabelStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
     this.label2.Location = new System.Drawing.Point(15, 8);
     this.label2.Name = "label2";
     this.label2.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.label2.Size = new System.Drawing.Size(56, 20);
     this.label2.TabIndex = 3;
     this.label2.Text = "Modulo:";
     this.label2.Values.ExtraText = "";
     this.label2.Values.Image = null;
     this.label2.Values.Text = "Modulo:";
     //
     // dgvPermisos
     //
     this.dgvPermisos.AllowUserToAddRows = false;
     this.dgvPermisos.AllowUserToDeleteRows = false;
     this.dgvPermisos.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.ID,
     this.Accion,
     this.Permitir});
     this.dgvPermisos.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dgvPermisos.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Sheet;
     this.dgvPermisos.GridStyles.StyleBackground = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundSheet;
     this.dgvPermisos.GridStyles.StyleColumn = ComponentFactory.Krypton.Toolkit.GridStyle.Sheet;
     this.dgvPermisos.GridStyles.StyleDataCells = ComponentFactory.Krypton.Toolkit.GridStyle.Sheet;
     this.dgvPermisos.GridStyles.StyleRow = ComponentFactory.Krypton.Toolkit.GridStyle.Sheet;
     this.dgvPermisos.Location = new System.Drawing.Point(0, 40);
     this.dgvPermisos.Name = "dgvPermisos";
     this.dgvPermisos.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.dgvPermisos.ReadOnly = true;
     this.dgvPermisos.RowHeadersWidth = 10;
     this.dgvPermisos.Size = new System.Drawing.Size(264, 134);
     this.dgvPermisos.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundSheet;
     this.dgvPermisos.TabIndex = 2;
     this.dgvPermisos.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPermisos_CellContentClick);
     //
     // ID
     //
     this.ID.HeaderText = "ID";
     this.ID.Name = "ID";
     this.ID.ReadOnly = true;
     this.ID.Width = 40;
     //
     // Accion
     //
     this.Accion.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
     this.Accion.HeaderText = "Accion";
     this.Accion.Name = "Accion";
     this.Accion.ReadOnly = true;
     //
     // Permitir
     //
     dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
     dataGridViewCellStyle2.NullValue = false;
     this.Permitir.DefaultCellStyle = dataGridViewCellStyle2;
     this.Permitir.FalseValue = null;
     this.Permitir.HeaderText = "Permitir";
     this.Permitir.IndeterminateValue = null;
     this.Permitir.Name = "Permitir";
     this.Permitir.ReadOnly = true;
     this.Permitir.TrueValue = null;
     //
     // panel2
     //
     this.panel2.Controls.Add(this.chkTodos);
     this.panel2.Controls.Add(this.kryptonLabel1);
     this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
     this.panel2.Location = new System.Drawing.Point(0, 0);
     this.panel2.Name = "panel2";
     this.panel2.Size = new System.Drawing.Size(264, 40);
     this.panel2.TabIndex = 1;
     //
     // chkTodos
     //
     this.chkTodos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.chkTodos.LabelStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
     this.chkTodos.Location = new System.Drawing.Point(168, 10);
     this.chkTodos.Name = "chkTodos";
     this.chkTodos.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.chkTodos.Size = new System.Drawing.Size(93, 20);
     this.chkTodos.TabIndex = 4;
     this.chkTodos.Text = "Marcar Todo";
     this.chkTodos.Values.ExtraText = "";
     this.chkTodos.Values.Image = null;
     this.chkTodos.Values.Text = "Marcar Todo";
     this.chkTodos.CheckedChanged += new System.EventHandler(this.chkTodos_CheckedChanged);
     //
     // kryptonLabel1
     //
     this.kryptonLabel1.LabelStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
     this.kryptonLabel1.Location = new System.Drawing.Point(16, 7);
     this.kryptonLabel1.Name = "kryptonLabel1";
     this.kryptonLabel1.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Global;
     this.kryptonLabel1.Size = new System.Drawing.Size(145, 20);
     this.kryptonLabel1.TabIndex = 3;
     this.kryptonLabel1.Text = "Acciones del formulario::";
     this.kryptonLabel1.Values.ExtraText = "";
     this.kryptonLabel1.Values.Image = null;
     this.kryptonLabel1.Values.Text = "Acciones del formulario::";
     //
     // PermisosFormulario
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.kryptonPanel1);
     this.Controls.Add(this.kryptonHeader2);
     this.Name = "PermisosFormulario";
     this.Size = new System.Drawing.Size(689, 196);
     this.Load += new System.EventHandler(this.PermisosFormulario_Load);
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
     this.kryptonPanel1.ResumeLayout(false);
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.formularioKryptonDataGridView)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.formularioBindingSource)).EndInit();
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.cmbMenus)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.menuBindingSource)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dgvPermisos)).EndInit();
     this.panel2.ResumeLayout(false);
     this.panel2.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }