Example #1
0
        private void this_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            EXListViewItem lstvItem = this.GetItemAt(e.X, e.Y) as EXListViewItem;

            if (lstvItem == null)
            {
                return;
            }
            _clickeditem = lstvItem;
            int x = lstvItem.Bounds.Left;
            int i;

            for (i = 0; i < this.Columns.Count; i++)
            {
                x = x + this.Columns[i].Width;
                if (x > e.X)
                {
                    x = x - this.Columns[i].Width;
                    _clickedsubitem = lstvItem.SubItems[i];
                    _col            = i;
                    break;
                }
            }
            if (!(this.Columns[i] is EXColumnHeader))
            {
                return;
            }
            EXColumnHeader col = (EXColumnHeader)this.Columns[i];

            if (col.GetType() == typeof(EXEditableColumnHeader))
            {
                txtbx.Location = new Point(x, this.GetItemRect(this.Items.IndexOf(lstvItem)).Y);
                txtbx.Width    = this.Columns[i].Width;
                if (txtbx.Width > this.Width)
                {
                    txtbx.Width = this.ClientRectangle.Width;
                }
                txtbx.Text    = _clickedsubitem.Text;
                txtbx.Visible = true;
                txtbx.BringToFront();
                txtbx.Focus();
            }
            else if (col.GetType() == typeof(EXBoolColumnHeader))
            {
                EXBoolColumnHeader boolcol = (EXBoolColumnHeader)col;
                if (boolcol.Editable)
                {
                    EXBoolListViewSubItem boolsubitem = (EXBoolListViewSubItem)_clickedsubitem;
                    if (boolsubitem.BoolValue == true)
                    {
                        boolsubitem.BoolValue = false;
                    }
                    else
                    {
                        boolsubitem.BoolValue = true;
                    }
                    this.Invalidate(boolsubitem.Bounds);
                }
            }
        }
 // Token: 0x06000066 RID: 102 RVA: 0x00003C64 File Offset: 0x00001E64
 public override int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch)
 {
     if (this.MyImage != null)
     {
         Image img  = this.MyImage;
         int   imgy = e.Bounds.Y + e.Bounds.Height / 2 - img.Height / 2;
         e.Graphics.DrawImage(img, x, imgy, img.Width, img.Height);
         x += img.Width + 2;
     }
     return(x);
 }
Example #3
0
 public override int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch)
 {
     if (this.MyImages != null && this.MyImages.Count > 0)
     {
         for (int i = 0; i < this.MyImages.Count; i++)
         {
             Image img  = (Image)this.MyImages[i];
             int   imgy = e.Bounds.Y + ((int)(e.Bounds.Height / 2)) - ((int)(img.Height / 2));
             e.Graphics.DrawImage(img, x, imgy, img.Width, img.Height);
             x += img.Width + 2;
         }
     }
     return(x);
 }
Example #4
0
        public override int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch)
        {
            EXBoolColumnHeader boolcol = (EXBoolColumnHeader)ch;
            Image boolimg;

            if (this.BoolValue == true)
            {
                boolimg = boolcol.TrueImage;
            }
            else
            {
                boolimg = boolcol.FalseImage;
            }
            int imgy = e.Bounds.Y + ((int)(e.Bounds.Height / 2)) - ((int)(boolimg.Height / 2));

            e.Graphics.DrawImage(boolimg, x, imgy, boolimg.Width, boolimg.Height);
            x += boolimg.Width + 2;
            return(x);
        }
Example #5
0
 public override int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch)
 {
     return(x);
 }
Example #6
0
        private void this_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            EXListViewItem lstvItem = this.GetItemAt(e.X, e.Y) as EXListViewItem;

            if (lstvItem == null)
            {
                return;
            }
            _clickeditem = lstvItem;
            int x = lstvItem.Bounds.Left;
            int i;

            for (i = 0; i < this.Columns.Count; i++)
            {
                x = x + this.Columns[i].Width;
                if (x > e.X)
                {
                    x = x - this.Columns[i].Width;
                    _clickedsubitem = lstvItem.SubItems[i];
                    _col            = i;
                    break;
                }
            }
            if (!(this.Columns[i] is EXColumnHeader))
            {
                return;
            }
            EXColumnHeader col = (EXColumnHeader)this.Columns[i];

            if (col.GetType() == typeof(EXEditableColumnHeader))
            {
                EXEditableColumnHeader editcol = (EXEditableColumnHeader)col;
                if (editcol.MyControl != null)
                {
                    Control c = editcol.MyControl;
                    if (c.Tag != null)
                    {
                        this.Controls.Add(c);
                        c.Tag = null;
                        if (c is ComboBox)
                        {
                            ((ComboBox)c).SelectedValueChanged += new EventHandler(cmbx_SelectedValueChanged);
                        }
                        c.Leave += new EventHandler(c_Leave);
                    }
                    c.Location = new Point(x, this.GetItemRect(this.Items.IndexOf(lstvItem)).Y);
                    c.Width    = this.Columns[i].Width;
                    if (c.Width > this.Width)
                    {
                        c.Width = this.ClientRectangle.Width;
                    }
                    c.Text    = _clickedsubitem.Text;
                    c.Visible = true;
                    c.BringToFront();
                    c.Focus();
                }
                else
                {
                    txtbx.Location = new Point(x, this.GetItemRect(this.Items.IndexOf(lstvItem)).Y);
                    txtbx.Width    = this.Columns[i].Width;
                    if (txtbx.Width > this.Width)
                    {
                        txtbx.Width = this.ClientRectangle.Width;
                    }
                    txtbx.Text    = _clickedsubitem.Text;
                    txtbx.Visible = true;
                    txtbx.BringToFront();
                    txtbx.Focus();
                }
            }
            else if (col.GetType() == typeof(EXBoolColumnHeader))
            {
                EXBoolColumnHeader boolcol = (EXBoolColumnHeader)col;
                if (boolcol.Editable)
                {
                    EXBoolListViewSubItem boolsubitem = (EXBoolListViewSubItem)_clickedsubitem;
                    if (boolsubitem.BoolValue == true)
                    {
                        boolsubitem.BoolValue = false;
                    }
                    else
                    {
                        boolsubitem.BoolValue = true;
                    }
                    this.Invalidate(boolsubitem.Bounds);
                }
            }
        }
Example #7
0
 public override int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch) {    
     EXBoolColumnHeader boolcol = (EXBoolColumnHeader) ch;
     Image boolimg;
     if (this.BoolValue == true) {
         boolimg = boolcol.TrueImage;
     } else {
         boolimg = boolcol.FalseImage;
     }
     int imgy = e.Bounds.Y + ((int) (e.Bounds.Height / 2)) - ((int) (boolimg.Height / 2));
     e.Graphics.DrawImage(boolimg, x, imgy, boolimg.Width, boolimg.Height);
     x += boolimg.Width + 2;
     return x;
 }
Example #8
0
 public override int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch) {    
     if (this.MyImages != null && this.MyImages.Count > 0) {
         for (int i = 0; i < this.MyImages.Count; i++) {
             Image img = (Image) this.MyImages[i];
             int imgy = e.Bounds.Y + ((int) (e.Bounds.Height / 2)) - ((int) (img.Height / 2));
             e.Graphics.DrawImage(img, x, imgy, img.Width, img.Height);
             x += img.Width + 2;
         }
     }
     return x;
 }
Example #9
0
 // Token: 0x06000057 RID: 87
 public abstract int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch);
Example #10
0
 public override int DoDraw(DrawListViewSubItemEventArgs e, int x, EXColumnHeader ch) {
     return x;
 }