Пример #1
0
 public override int DoDraw(DrawListViewSubItemEventArgs drawListViewSubItemEventArgs_0, int int_0,
                            EXColumnHeader excolumnHeader_0)
 {
     if (this.MyImage != null)
     {
         Image myImage = this.MyImage;
         int   y       = (drawListViewSubItemEventArgs_0.Bounds.Y + (drawListViewSubItemEventArgs_0.Bounds.Height / 2)) -
                         (myImage.Height / 2);
         drawListViewSubItemEventArgs_0.Graphics.DrawImage(myImage, int_0, y, myImage.Width, myImage.Height);
         int_0 += myImage.Width + 2;
     }
     return(int_0);
 }
Пример #2
0
 public override int DoDraw(DrawListViewSubItemEventArgs drawListViewSubItemEventArgs_0, int int_0,
                            EXColumnHeader excolumnHeader_0)
 {
     if ((this.MyImages != null) && (this.MyImages.Count > 0))
     {
         for (int i = 0; i < this.MyImages.Count; i++)
         {
             Image image = (Image)this.MyImages[i];
             int   y     = (drawListViewSubItemEventArgs_0.Bounds.Y + (drawListViewSubItemEventArgs_0.Bounds.Height / 2)) -
                           (image.Height / 2);
             drawListViewSubItemEventArgs_0.Graphics.DrawImage(image, int_0, y, image.Width, image.Height);
             int_0 += image.Width + 2;
         }
     }
     return(int_0);
 }
Пример #3
0
        public override int DoDraw(DrawListViewSubItemEventArgs drawListViewSubItemEventArgs_0, int int_0,
                                   EXColumnHeader excolumnHeader_0)
        {
            Image trueImage;
            EXBoolColumnHeader header = (EXBoolColumnHeader)excolumnHeader_0;

            if (this.BoolValue)
            {
                trueImage = header.TrueImage;
            }
            else
            {
                trueImage = header.FalseImage;
            }
            int y = (drawListViewSubItemEventArgs_0.Bounds.Y + (drawListViewSubItemEventArgs_0.Bounds.Height / 2)) -
                    (trueImage.Height / 2);

            drawListViewSubItemEventArgs_0.Graphics.DrawImage(trueImage, int_0, y, trueImage.Width, trueImage.Height);
            int_0 += trueImage.Width + 2;
            return(int_0);
        }
Пример #4
0
        private void EXListView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            EXListViewItem itemAt = base.GetItemAt(e.X, e.Y) as EXListViewItem;

            if (itemAt != null)
            {
                this.listViewItem_0 = itemAt;
                int left = itemAt.Bounds.Left;
                int num2 = 0;
                while (num2 < base.Columns.Count)
                {
                    left += base.Columns[num2].Width;
                    if (left > e.X)
                    {
                        left -= base.Columns[num2].Width;
                        this.listViewSubItem_0 = itemAt.SubItems[num2];
                        this.int_0             = num2;
                        break;
                    }
                    num2++;
                }
                if (base.Columns[num2] is EXColumnHeader)
                {
                    EXColumnHeader header = (EXColumnHeader)base.Columns[num2];
                    if (header.GetType() == typeof(EXEditableColumnHeader))
                    {
                        EXEditableColumnHeader header2 = (EXEditableColumnHeader)header;
                        if (header2.MyControl != null)
                        {
                            Control myControl = header2.MyControl;
                            if (myControl.Tag != null)
                            {
                                base.Controls.Add(myControl);
                                myControl.Tag = null;
                                if (myControl is ComboBox)
                                {
                                    ((ComboBox)myControl).SelectedValueChanged += new EventHandler(this.method_1);
                                }
                                myControl.Leave += new EventHandler(this.textBox_0_Leave);
                            }
                            myControl.Location = new Point(left, base.GetItemRect(base.Items.IndexOf(itemAt)).Y);
                            myControl.Width    = base.Columns[num2].Width;
                            if (myControl.Width > base.Width)
                            {
                                myControl.Width = base.ClientRectangle.Width;
                            }
                            myControl.Text    = this.listViewSubItem_0.Text;
                            myControl.Visible = true;
                            myControl.BringToFront();
                            myControl.Focus();
                        }
                        else
                        {
                            this.textBox_0.Location = new Point(left, base.GetItemRect(base.Items.IndexOf(itemAt)).Y);
                            this.textBox_0.Width    = base.Columns[num2].Width;
                            if (this.textBox_0.Width > base.Width)
                            {
                                this.textBox_0.Width = base.ClientRectangle.Width;
                            }
                            this.textBox_0.Text    = this.listViewSubItem_0.Text;
                            this.textBox_0.Visible = true;
                            this.textBox_0.BringToFront();
                            this.textBox_0.Focus();
                        }
                    }
                    else if (header.GetType() == typeof(EXBoolColumnHeader))
                    {
                        EXBoolColumnHeader header3 = (EXBoolColumnHeader)header;
                        if (header3.Editable)
                        {
                            EXBoolListViewSubItem item2 = (EXBoolListViewSubItem)this.listViewSubItem_0;
                            if (item2.BoolValue)
                            {
                                item2.BoolValue = false;
                            }
                            else
                            {
                                item2.BoolValue = true;
                            }
                            if (this.ValueChanged != null)
                            {
                                this.ValueChanged(this, new ExListViewEventArgs(itemAt, num2, !item2.BoolValue));
                            }
                            base.Invalidate(item2.Bounds);
                        }
                    }
                }
            }
        }
Пример #5
0
 public override int DoDraw(DrawListViewSubItemEventArgs drawListViewSubItemEventArgs_0, int int_0,
                            EXColumnHeader excolumnHeader_0)
 {
     return(int_0);
 }
Пример #6
0
 public abstract int DoDraw(DrawListViewSubItemEventArgs drawListViewSubItemEventArgs_0, int int_0,
                            EXColumnHeader excolumnHeader_0);