private void filtersToolStripMenuItem_Click(object sender, EventArgs e) { GenericArrayList <UserFilterObject> RemovedObjects; TabPage CurrTab; frmFilters FiltersDlg = new frmFilters(UserFilters); FiltersDlg.ShowDialog(); RemovedObjects = FiltersDlg.GetRemovedObjects(); if (RemovedObjects.Count > 0) { //perform real deleting operation foreach (UserFilterObject filter in RemovedObjects) { logcat.RemoveSlot(filter.Name); for (int i = 0; i < tbFilterContainer.TabPages.Count; i++) { CurrTab = tbFilterContainer.TabPages[i]; if (CurrTab.Text == filter.Name) { tbFilterContainer.TabPages.Remove(CurrTab); CurrTab.Dispose(); } } } RemovedObjects.Clear(); UserFilterObject.SaveFilters(UserFilters, "filter.flt"); } }
private void filtersToolStripMenuItem_Click(object sender, EventArgs e) { GenericArrayList<UserFilterObject> RemovedObjects; TabPage CurrTab; frmFilters FiltersDlg = new frmFilters(UserFilters); FiltersDlg.ShowDialog(); RemovedObjects = FiltersDlg.GetRemovedObjects(); if (RemovedObjects.Count > 0) { //perform real deleting operation foreach (UserFilterObject filter in RemovedObjects) { logcat.RemoveSlot(filter.Name); for (int i = 0; i < tbFilterContainer.TabPages.Count; i++) { CurrTab = tbFilterContainer.TabPages[i]; if (CurrTab.Text == filter.Name) { tbFilterContainer.TabPages.Remove(CurrTab); CurrTab.Dispose(); } } } RemovedObjects.Clear(); UserFilterObject.SaveFilters(UserFilters, "filter.flt"); } }