private void btnFilter_Click(object sender, EventArgs e) { frmFilter = frmFilter ?? new FrmFilter(dataGridView); frmFilter.DataTable = dataTable; if (frmFilter.ShowDialog() == DialogResult.OK) { btnFilter.Image = frmFilter.FilterIsEmpty ? Properties.Resources.filter : Properties.Resources.filter_set; } }
/// <summary> /// Initializes a new instance of the class. /// </summary> public FrmBaseTable(IBaseTable baseTable, TableFilter tableFilter, ScadaProject project, AppData appData) : this() { this.baseTable = baseTable ?? throw new ArgumentNullException("baseTable"); this.tableFilter = tableFilter; this.project = project ?? throw new ArgumentNullException("project"); this.appData = appData ?? throw new ArgumentNullException("appData"); dataTable = null; maxRowID = 0; frmFind = null; frmFilter = null; Text = baseTable.Title + (tableFilter == null ? "" : " - " + tableFilter); }