예제 #1
0
 private void Form1_Paint(object sender, PaintEventArgs e)
 {
     Cell c = new Cell();
     c.Rec = this.ClientRectangle;
     c.Text = "No Name";
     c.Paint(e.Graphics, this.Font);
 }
예제 #2
0
        private void SquareListView_MouseClick(object sender, MouseEventArgs e)
        {
            Cell c = CellFromPoint(e.Location);
            if (c != null)
            {
                if (LastSelectedCell != c)
                {
                    LastSelectedCell = c;
                }

                if (SelectedCell != null)
                {
                    SelectedCell.Selected = false;
                    this.Invalidate(Rectangle.Round(SelectedCell.Rec));
                }

                c.Selected = true;
                this.Invalidate(Rectangle.Round(c.Rec));

                SelectedCell = c;

                FireSelectedCellChanged();
            }
        }
예제 #3
0
        private void FireCellDoubleClick(Cell c)
        {
            if (CellDoubleClick != null)
            {
                CellDoubleClickEventArgs arg = new CellDoubleClickEventArgs();
                arg.Cell = new ImageCell()
                {
                    Image = c.Image,
                    Path = c.Path,
                    Text = c.Text,
                };

                CellDoubleClick(this, arg);
            }
        }