public QuickFilter(PREDEF_FILTER mode) { switch (mode) { case PREDEF_FILTER.DONE: m_advancedFilters = null; m_available = true; m_unavailable = true; m_found = true; m_notFound = false; m_archived = true; m_mine = false; m_distFilter = -1; m_ComboFilter = null; m_nameFilter = String.Empty; m_name = Catalog.GetString("Done"); break; case PREDEF_FILTER.TODO: m_advancedFilters = null; m_available = true; m_unavailable = false; m_found = false; m_notFound = true; m_archived = false; m_mine = false; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("To Do"); break; case PREDEF_FILTER.MINE: m_advancedFilters = null; m_available = false; m_unavailable = false; m_found = false; m_notFound = false; m_archived = false; m_mine = true; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("Mine"); break; case PREDEF_FILTER.ALL: m_advancedFilters = null; m_available = true; m_unavailable = true; m_found = true; m_notFound = true; m_archived = true; m_mine = true; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("All"); break; default: break; } }
public QuickFilter(PREDEF_FILTER mode) { switch (mode) { case PREDEF_FILTER.DONE: m_advancedFilters = null; m_available = true; m_unavailable = true; m_found = true; m_notFound = false; m_archived = true; m_mine = false; m_distFilter = -1; m_ComboFilter = null; m_nameFilter = String.Empty; m_name = Catalog.GetString("Done"); break; case PREDEF_FILTER.TODO: m_advancedFilters = null; m_available = true; m_unavailable = false; m_found = false; m_notFound = true; m_archived = false; m_mine = false; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("To Do"); break; case PREDEF_FILTER.MINE: m_advancedFilters = null; m_available = false; m_unavailable = false; m_found = false; m_notFound = false; m_archived = false; m_mine = true; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("Mine"); break; case PREDEF_FILTER.DNF: m_advancedFilters = new FilterList(); m_advancedFilters.AddFilterCriteria(FilterList.KEY_DNF, true); m_available = true; m_unavailable = false; m_found = false; m_notFound = true; m_archived = false; m_mine = false; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("DNF"); break; case PREDEF_FILTER.ALL: m_advancedFilters = null; m_available = true; m_unavailable = true; m_found = true; m_notFound = true; m_archived = true; m_mine = true; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("All"); break; case PREDEF_FILTER.STALE: m_advancedFilters = new FilterList(); m_advancedFilters.AddFilterCriteria(FilterList.KEY_INFO_NDAYS, new Config().StaleCacheInterval); m_available = true; m_unavailable = true; m_found = true; m_notFound = true; m_archived = true; m_mine = true; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("Stale"); break; case PREDEF_FILTER.STALEUNSOLVED: m_advancedFilters = new FilterList(); m_advancedFilters.AddFilterCriteria(FilterList.KEY_INFO_NDAYS, new Config().StaleCacheInterval); m_advancedFilters.AddFilterCriteria(FilterList.KEY_NOCORRECTED, "true"); m_advancedFilters.AddFilterCriteria(FilterList.KEY_NOCHILDREN, "Final Location"); m_available = true; m_unavailable = true; m_found = true; m_notFound = true; m_archived = true; m_mine = true; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("Stale - Unsolved"); break; case PREDEF_FILTER.NEW: m_advancedFilters = new FilterList(); m_advancedFilters.AddFilterCriteria(FilterList.KEY_PLACEAFTER, DateTime.Today.Subtract(TimeSpan.FromDays(new Config().NewCacheInterval))); m_available = true; m_unavailable = true; m_found = true; m_notFound = true; m_archived = true; m_mine = true; m_ComboFilter = null; m_distFilter = -1; m_nameFilter = String.Empty; m_name = Catalog.GetString("Recently Published"); break; default: break; } }