Exemplo n.º 1
0
        public StylingGridView()
        {
            RowTemplate.Height = 45;

            ColumnHeadersHeight         = 30;
            ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;

            ThemePart  = Theme.Instance.PanelThemePart;
            BackColor  = Color.FromArgb(128, 128, 255);
            BackColor2 = Color.Navy;

            SelectionTheme.ThemePart  = Theme.Instance.PanelThemePart;
            SelectionTheme.BackColor  = Color.Lime;
            SelectionTheme.BackColor2 = Color.Green;

            NormalTheme.ThemePart  = Theme.Instance.PanelThemePart;
            NormalTheme.BackColor  = Color.White;
            NormalTheme.BackColor2 = Color.WhiteSmoke;

            CellPainting += new DataGridViewCellPaintingEventHandler(StylingGridView_CellPainting);

            Font       = new Font("Verdana", 9, FontStyle.Regular);
            NormalFont = new Font("Verdana", 9, FontStyle.Regular);
            BoldFont   = new Font("Verdana", 9, FontStyle.Bold);
            ItalicFont = new Font("Verdana", 9, FontStyle.Italic);

            ForeColor = Color.FromArgb(45, 45, 45);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// datagridviewcellpaintingeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this DataGridViewCellPaintingEventHandler datagridviewcellpaintingeventhandler, Object sender, DataGridViewCellPaintingEventArgs e, AsyncCallback callback)
        {
            if (datagridviewcellpaintingeventhandler == null)
            {
                throw new ArgumentNullException("datagridviewcellpaintingeventhandler");
            }

            return(datagridviewcellpaintingeventhandler.BeginInvoke(sender, e, callback, null));
        }
 public ucCheckBoxGridView()
 {
     AddHeaderCheckBox();
     HeaderCheckBox.KeyUp += new KeyEventHandler(HeaderCheckBox_KeyUp);
     HeaderCheckBox.MouseClick += new MouseEventHandler(HeaderCheckBox_MouseClick);
     CellValueChanged += new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
     CurrentCellDirtyStateChanged += new EventHandler(dataGridView_CurrentCellDirtyStateChanged);
     CellPainting += new DataGridViewCellPaintingEventHandler(dataGridView_CellPainting);
     CellBeginEdit += new DataGridViewCellCancelEventHandler(dataGridView_CellBeginEdit);
     DataBindingComplete += new DataGridViewBindingCompleteEventHandler(dataGridView_DataBindingComplete);
     CheckBoxCollumn = new DataGridViewCheckBoxColumn();
     CheckBoxCollumn.Name = CheckBoxCollumnName;
     CheckBoxCollumn.HeaderText = "";
     Columns.Add(CheckBoxCollumn);
     AllowUserToAddRows = false;
 }
Exemplo n.º 4
0
        /// <summary>
        /// 弹出选择列表窗体
        /// </summary>
        /// <param name="list">数据列表</param>
        /// <param name="displayName">需要显示的字段</param>
        /// <param name="parent">调用的控件</param>
        /// <param name="point">显示坐标</param>
        /// <param name="size">显示大小</param>
        /// <param name="eventHandle"></param>
        public static void Show(IEnumerable list, string displayName, Control parent, Point point, Size size, EventHandler eventHandle, ListType listType, bool multiSelect, bool autoCalPoint, DataGridViewCellPaintingEventHandler cellPaintingEventHandle)
        {
            if (list == null)
            {
                return;
            }
            IEnumerator en = list.GetEnumerator();

            if (!en.MoveNext())
            {
                return;
            }
            if (en.Current == null)
            {
                return;
            }
            _list       = list;
            _filtString = "";
            _point      = point;
            ContextMenuForm contextMenuForm = new ContextMenuForm();

            contextMenuForm.ShowInTaskbar = false;
            switch (listType)
            {
            case ListType.ListBox:
                ListBox lst = new ListBox();
                lst.Font = new Font("宋体", 12);   // 20);
                foreach (object obj in list)
                {
                    Type   type        = obj.GetType();
                    string displayText = "";
                    try
                    {
                        displayText = type.GetProperty(displayName).GetValue(obj, null).ToString();
                    }
                    catch
                    {
                        displayText = obj.ToString();
                    }
                    lst.Items.Add(displayText);
                }
                lst.SelectedIndexChanged += new EventHandler(delegate(object sender1, EventArgs e1)
                {
                    if (eventHandle != null)
                    {
                        eventHandle(lst.SelectedIndex, null);
                    }
                    contextMenuForm.Close();
                });
                contextMenuForm.Show(parent, point, size, lst);
                break;

            case ListType.ListView:
                ListView listView = new ListView();
                listView.Font = new Font("宋体", 12);   // 20);
                listView.View = View.List;
                listView.Columns.Add("选项");
                listView.FullRowSelect  = true;
                listView.HoverSelection = true;
                listView.LabelEdit      = false;
                listView.HeaderStyle    = ColumnHeaderStyle.None;
                listView.Resize        += new EventHandler(delegate(object sender1, EventArgs e1)
                {
                    listView.Columns[0].Width = listView.Width - 5;
                });
                listView.Columns[0].AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
                foreach (object obj in list)
                {
                    Type   type        = obj.GetType();
                    string displayText = "";
                    try
                    {
                        displayText = type.GetProperty(displayName).GetValue(obj, null).ToString();
                    }
                    catch
                    {
                        displayText = obj.ToString();
                    }
                    listView.Items.Add(displayText);
                }
                listView.KeyDown += new KeyEventHandler(delegate(object sender, KeyEventArgs e)
                {
                    if (e.KeyCode == Keys.Enter)
                    {
                        if (listView.SelectedIndices != null && listView.SelectedIndices.Count > 0)
                        {
                            if (eventHandle != null)
                            {
                                eventHandle(listView.SelectedIndices[0], null);
                            }
                            contextMenuForm.Close();
                        }
                    }
                });
                listView.Click += new EventHandler(delegate(object sender1, EventArgs e1)
                {
                    if (listView.SelectedIndices != null && listView.SelectedIndices.Count > 0)
                    {
                        if (eventHandle != null)
                        {
                            eventHandle(listView.SelectedIndices[0], null);
                        }
                        contextMenuForm.Close();
                    }
                });
                contextMenuForm.Show(parent, point, size, listView);
                break;

            case ListType.DataGridView:
                ShowDataGridView(list, displayName, parent, point, size, eventHandle, multiSelect, autoCalPoint, cellPaintingEventHandle, contextMenuForm);
                break;

            case ListType.PopupMenu:
                if (list != null)
                {
                    ContextMenuStrip popupMenu = new ContextMenuStrip();
                    popupMenu.KeyDown  += new KeyEventHandler(popupMenu_KeyDown);
                    popupMenu.KeyPress += new KeyPressEventHandler(popupMenu_KeyPress);
                    //popupMenu.Font = new Font("宋体", 12);// 21.75f);
                    foreach (object obj in list)
                    {
                        Type   type        = obj.GetType();
                        string displayText = "";
                        try
                        {
                            displayText = type.GetProperty(displayName).GetValue(obj, null).ToString();
                        }
                        catch
                        {
                            displayText = obj.ToString();
                        }
                        ToolStripItem item = popupMenu.Items.Add(displayText);
                        item.Click += new EventHandler(delegate(object sender1, EventArgs e1)
                        {
                            if (eventHandle != null)
                            {
                                eventHandle(popupMenu.Items.IndexOf(item), null);
                            }
                        });
                    }
                    _point = parent.PointToScreen(point);
                    popupMenu.Show(parent, point);
                }
                break;
            }
        }
Exemplo n.º 5
0
        public static void Show(DataTable dataTable, string displayName, Control parent, Point point, Size size, EventHandler eventHandle, bool multiSelect, bool autoCalPoint, DataGridViewCellPaintingEventHandler cellPaintingEventHandle)
        {
            if (dataTable == null)
            {
                return;
            }
            _filtString = "";
            _point      = point;
            ContextMenuForm contextMenuForm = new ContextMenuForm();

            contextMenuForm.ShowInTaskbar = false;
            ShowDevGridView(dataTable, displayName, parent, point, size, eventHandle, multiSelect, autoCalPoint, cellPaintingEventHandle, contextMenuForm);
        }
Exemplo n.º 6
0
        private static void ShowDevGridView(DataTable dataTable, string displayName, Control parent, Point point, Size size, EventHandler eventHandle, bool multiSelect, bool autoCalPoint, DataGridViewCellPaintingEventHandler cellPaintingEventHandle, ContextMenuForm contextMenuForm)
        {
            _callControl = parent;
            DevExpress.XtraGrid.GridControl         gridControl  = new DevExpress.XtraGrid.GridControl();
            DevExpress.XtraGrid.Views.Grid.GridView dataGridView = new DevExpress.XtraGrid.Views.Grid.GridView();
            gridControl.MainView = dataGridView;
            dataGridView.OptionsView.ShowColumnHeaders = false;
            dataGridView.OptionsView.ShowGroupPanel    = false;
            dataGridView.OptionsView.ShowIndicator     = false;
            //dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            //dataGridView.ColumnHeadersHeight = 18;
            //dataGridView.BackgroundColor = dataGridView.DefaultCellStyle.BackColor;
            //dataGridView.CellPainting += cellPaintingEventHandle;
            //dataGridView.CellPainting += new DataGridViewCellPaintingEventHandler(dataGridView_CellPainting);
            //dataGridView.GridColor = dataGridView.BackgroundColor;
            dataGridView.KeyPress += new KeyPressEventHandler(dataGridView_KeyPress);
            dataGridView.OptionsBehavior.ReadOnly = true;
            dataGridView.Tag = eventHandle;
            //DevExpress.XtraGrid.Columns.GridColumn column = dataGridView.Columns.Add();
            //column.FieldName =
            //"字典选择器", "字典选择器");
            //dataGridView.AllowUserToResizeRows = false;
            //dataGridView.AllowUserToResizeColumns = false;
            //dataGridView.ScrollBars = ScrollBars.Vertical;
            //dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            //dataGridView.Cursor = Cursors.Hand;
            string[] displayNames = null;
            string   ddd          = displayName;

            if (displayName != null)
            {
                displayNames = displayName.Split(new char[] { ',', ';' });
                for (int i = 0; i < displayNames.Length; i++)
                {
                    DevExpress.XtraGrid.Columns.GridColumn column = dataGridView.Columns.Add();
                    column.FieldName = displayNames[i];
                    column.OptionsColumn.AllowEdit       = false;
                    column.OptionsFilter.AllowAutoFilter = false;
                    column.OptionsFilter.AllowFilter     = false;
                    column.Visible      = true;
                    column.VisibleIndex = 0;
                    if (i == 0)
                    {
                        ddd = displayNames[i];
                    }
                }
            }
            _displayNames = displayNames;
            SetDataGridViewList(dataGridView, TransTable(dataTable, ddd));
            //dataGridView.Resize += new EventHandler(delegate(object sender1, EventArgs e1)
            //{
            //    for (int i = 0; i < dataGridView.Columns.Count - 1; i++)
            //    {
            //        dataGridView.Columns[i].Width = 120;
            //    }
            //    int width = dataGridView.Width - 120 * (dataGridView.Columns.Count - 1);
            //    if (width < 1)
            //    {
            //        dataGridView.Columns[dataGridView.Columns.Count - 1].Visible = false;
            //    }
            //    else
            //    {
            //        dataGridView.Columns[dataGridView.Columns.Count - 1].Width = width;
            //    }
            //});
            //dataGridView.CellDoubleClick += new DataGridViewCellEventHandler(delegate(object sender, DataGridViewCellEventArgs e)
            //{
            //    if (dataGridView.CurrentRow != null && dataGridView.CurrentRow.Index >= 0)
            //    {
            //        if (eventHandle != null)
            //        {
            //            if (multiSelect)
            //            {
            //                List<int> selectedIndexes = new List<int>();
            //                foreach (DataGridViewCell cell in dataGridView.SelectedCells)
            //                {
            //                    selectedIndexes.Add(_showListItems[cell.RowIndex].Index);
            //                }
            //                selectedIndexes.Reverse();
            //                eventHandle(selectedIndexes.ToArray(), null);
            //                if (dataGridView.Parent != null && dataGridView.Parent is DevExpress.XtraEditors.XtraForm)
            //                {
            //                    (dataGridView.Parent as DevExpress.XtraEditors.XtraForm).Close();
            //                }
            //                dataGridView.Dispose();
            //            }
            //        }
            //    }
            //});
            dataGridView.KeyDown += new KeyEventHandler(dataGridView_KeyDown);
            if (!multiSelect)
            {
                //dataGridView.MouseMove += new MouseEventHandler(delegate(object sender, MouseEventArgs e)
                //{
                //    int rowIndex = dataGridView.get .HitTest(e.X, e.Y).RowIndex;
                //    if (rowIndex >= 0)
                //    {
                //        dataGridView.CurrentCell = dataGridView.Rows[rowIndex].Cells[0];
                //    }
                //});
                //dataGridView.CellClick += new DataGridViewCellEventHandler(delegate(object sender, DataGridViewCellEventArgs e)
                dataGridView.RowCellClick += new DevExpress.XtraGrid.Views.Grid.RowCellClickEventHandler(delegate(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
                {
                    if (eventHandle != null)
                    {
                        eventHandle(dataGridView.GetDataRow(e.RowHandle), e);
                    }
                    try
                    {
                        if (gridControl.Parent != null && gridControl.Parent is DevExpress.XtraEditors.XtraForm)
                        {
                            (gridControl.Parent as DevExpress.XtraEditors.XtraForm).Close();
                        }
                        dataGridView.Dispose();
                        gridControl.Dispose();
                    }
                    catch
                    {
                    }
                });
            }
            if (size.Width < 100)
            {
                size.Width = 100;
            }
            //dataGridView.CellMouseDown += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseDown);
            //dataGridView.CellMouseMove += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseMove);
            //dataGridView.CellMouseUp += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseUp);

            DevExpress.XtraEditors.XtraForm form = new DevExpress.XtraEditors.XtraForm();
            form.TopMost       = true;
            form.StartPosition = FormStartPosition.Manual;
            form.Location      = parent.PointToScreen(point);
            form.Size          = size;
            if (parent != null && !(parent is DataGridView))
            {
                form.Width = parent.Width;
            }
            form.Controls.Add(gridControl);
            gridControl.Dock     = DockStyle.Fill;
            form.Deactivate     += new EventHandler(form_Deactivate);
            form.FormBorderStyle = FormBorderStyle.None;
            if (form.Bottom > Screen.PrimaryScreen.Bounds.Height)
            {
                if (form.Top >= form.Height)
                {
                    form.Top -= form.Height;
                }
                else
                {
                    form.Top = 0;
                }
            }
            form.Width = size.Width;
            form.Show();
        }
Exemplo n.º 7
0
        private static void ShowDataGridView(IEnumerable list, string displayName, Control parent, Point point, Size size, EventHandler eventHandle, bool multiSelect, bool autoCalPoint, DataGridViewCellPaintingEventHandler cellPaintingEventHandle, ContextMenuForm contextMenuForm)
        {
            _callControl = parent;
            DataGridView dataGridView = new DataGridView();

            dataGridView.ColumnHeadersVisible        = false;
            dataGridView.RowHeadersVisible           = false;
            dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            dataGridView.ColumnHeadersHeight         = 18;
            dataGridView.BackgroundColor             = dataGridView.DefaultCellStyle.BackColor;
            dataGridView.CellPainting         += cellPaintingEventHandle;
            dataGridView.CellPainting         += new DataGridViewCellPaintingEventHandler(dataGridView_CellPainting);
            dataGridView.GridColor             = dataGridView.BackgroundColor;
            dataGridView.KeyPress             += new KeyPressEventHandler(dataGridView_KeyPress);
            dataGridView.ReadOnly              = true;
            dataGridView.AllowUserToAddRows    = false;
            dataGridView.AllowUserToDeleteRows = false;
            dataGridView.Columns.Add("字典选择器", "字典选择器");
            dataGridView.AllowUserToResizeRows    = false;
            dataGridView.AllowUserToResizeColumns = false;

            dataGridView.ScrollBars = ScrollBars.Vertical;

            dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dataGridView.Cursor        = Cursors.Hand;
            string[] displayNames = null;
            if (displayName != null)
            {
                displayNames = displayName.Split(new char[] { ',', ';' });
                for (int i = 1; i < displayNames.Length; i++)
                {
                    dataGridView.Columns.Add("Column" + i.ToString(), "Column");
                }
                if (dataGridView.Columns.Count > 1)
                {
                    dataGridView.ScrollBars = ScrollBars.Both;
                }
            }
            _displayNames = displayNames;
            GenListItems();
            SetDataGridViewList(dataGridView);

            dataGridView.Resize += new EventHandler(delegate(object sender1, EventArgs e1)
            {
                for (int i = 0; i < dataGridView.Columns.Count - 1; i++)
                {
                    //dataGridView.Columns[i].Width = 120;
                    dataGridView.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                }
                //Modify by wenpei.x@2014-02-12
                //新增人员选择下拉框显示User_ID,故宽度不应该再有限制
                if (dataGridView.Columns.Count <= 1)
                {
                    int width = dataGridView.Width - 120 * (dataGridView.Columns.Count - 1);
                    if (width < 1)
                    {
                        dataGridView.Columns[dataGridView.Columns.Count - 1].Visible = false;
                    }
                    else
                    {
                        dataGridView.Columns[dataGridView.Columns.Count - 1].Width = width;
                    }
                }
            });
            dataGridView.CellDoubleClick += new DataGridViewCellEventHandler(delegate(object sender, DataGridViewCellEventArgs e)
            {
                if (dataGridView.CurrentRow != null && dataGridView.CurrentRow.Index >= 0)
                {
                    if (eventHandle != null)
                    {
                        if (multiSelect)
                        {
                            List <int> selectedIndexes = new List <int>();
                            foreach (DataGridViewCell cell in dataGridView.SelectedCells)
                            {
                                selectedIndexes.Add(_showListItems[cell.RowIndex].Index);
                            }
                            selectedIndexes.Reverse();
                            eventHandle(selectedIndexes.ToArray(), null);
                            if (dataGridView.Parent != null && dataGridView.Parent is DevExpress.XtraEditors.XtraForm)
                            {
                                (dataGridView.Parent as DevExpress.XtraEditors.XtraForm).Close();
                            }
                            dataGridView.Dispose();
                        }
                    }
                }
            });
            dataGridView.KeyDown += new KeyEventHandler(delegate(object sender, KeyEventArgs e)
            {
                if (e.KeyCode == Keys.Enter)
                {
                    if (dataGridView.CurrentRow != null && dataGridView.CurrentRow.Index >= 0)
                    {
                        if (eventHandle != null)
                        {
                            if (multiSelect)
                            {
                                List <int> selectedIndexes = new List <int>();
                                foreach (DataGridViewCell cell in dataGridView.SelectedCells)
                                {
                                    selectedIndexes.Add(_showListItems[cell.RowIndex].Index);
                                }
                                selectedIndexes.Reverse();
                                eventHandle(selectedIndexes.ToArray(), null);
                            }
                            else
                            {
                                eventHandle(_showListItems[dataGridView.CurrentRow.Index].Index, null);
                            }
                        }
                        if (dataGridView.Parent != null && dataGridView.Parent is DevExpress.XtraEditors.XtraForm)
                        {
                            (dataGridView.Parent as DevExpress.XtraEditors.XtraForm).Close();
                        }
                        dataGridView.Dispose();
                    }
                }
                else if (e.KeyCode == Keys.Escape)
                {
                    if (dataGridView.Parent != null && dataGridView.Parent is DevExpress.XtraEditors.XtraForm)
                    {
                        (dataGridView.Parent as DevExpress.XtraEditors.XtraForm).Close();
                    }
                    dataGridView.Dispose();
                    if (_callControl != null)
                    {
                        _callControl.Focus();
                    }
                }
            });
            if (!multiSelect)
            {
                dataGridView.MouseMove += new MouseEventHandler(delegate(object sender, MouseEventArgs e)
                {
                    int rowIndex = dataGridView.HitTest(e.X, e.Y).RowIndex;
                    if (rowIndex >= 0)
                    {
                        dataGridView.CurrentCell = dataGridView.Rows[rowIndex].Cells[0];
                    }
                });
                dataGridView.CellClick += new DataGridViewCellEventHandler(delegate(object sender, DataGridViewCellEventArgs e)
                {
                    if (dataGridView.CurrentRow != null && dataGridView.CurrentRow.Index >= 0)
                    {
                        if (eventHandle != null)
                        {
                            eventHandle(_showListItems[dataGridView.CurrentRow.Index].Index, null);
                        }
                        try
                        {
                            if (dataGridView.Parent != null && dataGridView.Parent is DevExpress.XtraEditors.XtraForm)
                            {
                                (dataGridView.Parent as DevExpress.XtraEditors.XtraForm).Close();
                            }
                            dataGridView.Dispose();
                        }
                        catch
                        {
                        }
                    }
                });
            }
            if (size.Width < 100)
            {
                size.Width = 100;
            }
            dataGridView.CellMouseDown += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseDown);
            dataGridView.CellMouseMove += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseMove);
            dataGridView.CellMouseUp   += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseUp);

            DevExpress.XtraEditors.XtraForm form = new DevExpress.XtraEditors.XtraForm();
            form.TopMost       = true;
            form.StartPosition = FormStartPosition.Manual;
            form.Location      = parent.PointToScreen(point);
            form.Size          = size;
            //if (parent != null && !(parent is DataGridView))
            //{
            //    form.Width = parent.Width;
            //}
            form.Controls.Add(dataGridView);
            dataGridView.Dock    = DockStyle.Fill;
            form.Deactivate     += new EventHandler(form_Deactivate);
            form.FormBorderStyle = FormBorderStyle.None;
            if (form.Bottom > Screen.PrimaryScreen.Bounds.Height)
            {
                if (form.Top >= form.Height)
                {
                    form.Top -= form.Height;
                }
                else
                {
                    form.Top = 0;
                }
            }
            form.Show();

            //if (size.Height > dataGridView.RowTemplate.Height * dataGridView.Rows.Count + dataGridView.ColumnHeadersHeight)
            //{
            //    dataGridView.ColumnHeadersVisible = false;
            //    Control parentControl = parent;
            //    Dialog.SetPopup(dataGridView, parent, point, new Size(size.Width, dataGridView.RowTemplate.Height * dataGridView.Rows.Count + 3), autoCalPoint);
            //}
            //else
            //{
            //    Control parentControl = parent;
            //    Dialog.SetPopup(dataGridView, parent, point, size, autoCalPoint);
            //}
        }
Exemplo n.º 8
0
 public static void ShowDataTableSelection(DataTable dataTable, string displayName, Control parent, Point point, Size size, EventHandler eventHandle, bool multiSelect, bool autoCalPoint, DataGridViewCellPaintingEventHandler cellPaintingEventHandle)
 {
     CustomSelection.Show(dataTable, displayName, parent, point, size, eventHandle, multiSelect, autoCalPoint, cellPaintingEventHandle);
 }
Exemplo n.º 9
0
 /// <summary>
 /// 弹出选择列表窗体
 /// </summary>
 /// <param name="list">数据列表</param>
 /// <param name="displayName">需要显示的字段</param>
 /// <param name="parent">调用的控件</param>
 /// <param name="point">显示坐标</param>
 /// <param name="size">显示大小</param>
 /// <param name="eventHandle"></param>
 private static void ShowCustomSelection(IEnumerable list, string displayName, Control parent, Point point, Size size, EventHandler eventHandle, ListType listType, bool multiSelect, bool autoCalPoint, DataGridViewCellPaintingEventHandler cellPaintingEventHandle)
 {
     CustomSelection.Show(list, displayName, parent, point, size, eventHandle, listType, multiSelect, autoCalPoint, cellPaintingEventHandle);
 }
Exemplo n.º 10
0
 public static void ShowCustomSelection(IEnumerable list, string displayName, Control callControl, Size size, EventHandler eventHandle, bool multiSelect, DataGridViewCellPaintingEventHandler cellPaintingEventHandle)
 {
     ShowCustomSelection(list, displayName, callControl, new Point(0, 0), size, eventHandle, ListType.DataGridView, multiSelect, true, cellPaintingEventHandle);
 }
Exemplo n.º 11
0
 public static void ShowCustomSelection(IEnumerable list, string displayName, Control callControl, Point point, Size size, EventHandler eventHandle, ListType listType, DataGridViewCellPaintingEventHandler cellPaintingEventHandle)
 {
     //ShowCustomSelection(list, displayName, callControl, point, size, eventHandle, false, false);
     ShowCustomSelection(list, displayName, callControl, point, size, eventHandle, listType, false, false, cellPaintingEventHandle);
 }
Exemplo n.º 12
0
 public MyGrid()
     : base()
 {
     CellPainting += new DataGridViewCellPaintingEventHandler(MyGrid_CellPainting);
 }