Files
SourceCode/PROMS/Baseline/frmSettings.cs
T

45 lines
1.0 KiB
C#

using System;
using System.Windows.Forms;
namespace Baseline
{
public partial class frmSettings : Form
{
private IgnoreLines _MyIgnore;
public IgnoreLines MyIgnore
{
get { return _MyIgnore; }
set {
_MyIgnore = value;
dgv.DataSource=null;
dgv.DataSource=value;
}
}
public frmSettings(IgnoreLines myIgnore)
{
InitializeComponent();
_MyIgnore=myIgnore;
}
private void frmSettings_Load(object sender, EventArgs e)
{
dgv.DataSource=MyIgnore;
DataGridViewComboBoxColumn col = dgvcSearchType;
col.Name = "My Enum Column";
col.DataSource = Enum.GetValues(typeof(Relation));
col.ValueType = typeof(Relation);
}
private void dgv_DataError(object sender, DataGridViewDataErrorEventArgs e) => Console.WriteLine("Here");
private void btnOK_Click(object sender, EventArgs e)
{
DialogResult = System.Windows.Forms.DialogResult.OK;
Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
DialogResult = System.Windows.Forms.DialogResult.Cancel;
Close();
}
}
}