44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
|
|
using CaeKnowledge.View;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.Windows.Forms;
|
|||
|
|
|
|||
|
|
namespace CPSO.Forms._92_Knowledge
|
|||
|
|
{
|
|||
|
|
public partial class FrmToolPositionViewer : Form
|
|||
|
|
{
|
|||
|
|
public FrmToolPositionViewer()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
|
|||
|
|
dataGridView1.RowPostPaint += (sender, args) =>
|
|||
|
|
{
|
|||
|
|
using (var b = new SolidBrush(dataGridView1.RowHeadersDefaultCellStyle.ForeColor))
|
|||
|
|
{
|
|||
|
|
args.Graphics.DrawString((args.RowIndex + 1).ToString(),
|
|||
|
|
args.InheritedRowStyle.Font, b,
|
|||
|
|
args.RowBounds.Location.X + 10,
|
|||
|
|
args.RowBounds.Location.Y + 4);
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void PrepareForm(List<ViewToolPosition> list)
|
|||
|
|
{
|
|||
|
|
dataGridView1.DataSource = list;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void FrmToolPositionViewer_Load(object sender, System.EventArgs e)
|
|||
|
|
{
|
|||
|
|
dataGridView1.AllowUserToAddRows = false;
|
|||
|
|
dataGridView1.AllowUserToDeleteRows = false;
|
|||
|
|
// dataGridView1.EditMode = DataGridViewEditMode.EditProgrammatically;
|
|||
|
|
|
|||
|
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
|||
|
|
|
|||
|
|
dataGridView1.RowHeadersVisible = true;
|
|||
|
|
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|