private void ButtonModifyClick(object sender, EventArgs e) { Filter filter = GetSelectedFilter(); if (filter == null) return; FilterEdit edit = new FilterEdit(filter); DialogResult dr = edit.ShowDialog(this); listView.Focus(); if (dr != DialogResult.OK) return; Filter existing = GetExisting(edit.Filter); if ((existing != null) && (existing != edit.Filter)) { Remove(edit.Filter); return; } ListViewItem item = listView.SelectedItems[0]; item.Text = edit.Filter.Active.ToString(); item.SubItems[1].Text = edit.Filter.FilterColumn.ToString(); item.SubItems[2].Text = edit.Filter.FilterType.ToString(); item.SubItems[3].Text = edit.Filter.IgnoreCase.ToString(); item.SubItems[4].Text = edit.Filter.Definition; }
private void ButtonModifyClick(object sender, EventArgs e) { Filter filter = GetSelectedFilter(); if (filter == null) { return; } FilterEdit edit = new FilterEdit(filter); DialogResult dr = edit.ShowDialog(this); listView.Focus(); if (dr != DialogResult.OK) { return; } Filter existing = GetExisting(edit.Filter); if ((existing != null) && (existing != edit.Filter)) { Remove(edit.Filter); return; } ListViewItem item = listView.SelectedItems[0]; item.Text = edit.Filter.Active.ToString(); item.SubItems[1].Text = edit.Filter.FilterColumn.ToString(); item.SubItems[2].Text = edit.Filter.FilterType.ToString(); item.SubItems[3].Text = edit.Filter.IgnoreCase.ToString(); item.SubItems[4].Text = edit.Filter.Definition; }
private void ButtonAddClick(object sender, EventArgs e) { FilterEdit edit = new FilterEdit(null); DialogResult dr = edit.ShowDialog(this); listView.Focus(); if (dr != DialogResult.OK) return; Filter existing = GetExisting(edit.Filter); if (existing != null) { GetItem(existing).Selected = true; return; } listView.Items.Add(GetItem(edit.Filter)).Selected = true; }
private void ButtonAddClick(object sender, EventArgs e) { FilterEdit edit = new FilterEdit(null); DialogResult dr = edit.ShowDialog(this); listView.Focus(); if (dr != DialogResult.OK) { return; } Filter existing = GetExisting(edit.Filter); if (existing != null) { GetItem(existing).Selected = true; return; } listView.Items.Add(GetItem(edit.Filter)).Selected = true; }