Курсовая работа: Програма обробки зображень
namespace Kursach
{
public partial class KernelForm : Form
{
private bool allowEdit = false;
public bool AllowEdit
{
get { return allowEdit; }
set
{
allowEdit = value;
kernelgrid.ReadOnly = !value;
}
}
public KernelForm(bool editable, IKernel kernel)
{
InitializeComponent();
for (int i = 0; i < kernel.Kernel.GetUpperBound(0) + 1; i++)
{
kernelgrid.Rows.Add();
for (int j = 0; j < kernel.Kernel.GetUpperBound(1) + 1; j++)
{
kernelgrid.Rows[i].Cells[j].Value = kernel.Kernel.GetValue(i, j);
}
}
this.Text = kernel.Text;
AllowEdit = editable;
}
private void butCancel_Click(object sender, EventArgs e)