private void OnYears() { List<Item> availableYears = new List<Item>(); // Based upon the current view (All, Last played, Last Added) QueryReader<List<Item>> sql = new QueryReader<List<Item>>(SqlYears); sql.OnRow += new QueryReader<List<Item>>.Row(OnRow_Year); sql.OnConnection += new Sql.ConnectionEvent(sql_OnConnection); sql.Execute(ConnectionString, availableYears); Filter dialog = new Filter("Production Years", _currentYears, availableYears); dialog.DoModal(); }
private void OnFlags() { List<Item> availableFlags = new List<Item>(); // Based upon the current view (All, Last played, Last Added) foreach (Flags value in Enum.GetValues(typeof(Flags))) { availableFlags.Add(new Item((int)value, StringEnum.Get(value))); } Filter dialog = new Filter("Flags", _currentFlags, availableFlags); dialog.Dialog.OnChecked += new DialogCheckedList.OnCheckedHandler(Flags_OnChecked); dialog.DoModal(); dialog.Dialog.OnChecked -= new DialogCheckedList.OnCheckedHandler(Flags_OnChecked); }
private void OnGenre() { List<Item> availableGenre = new List<Item>(); // Based upon the current view (All, Last played, Last Added) QueryReader<List<Item>> sql = new QueryReader<List<Item>>(SqlGenres); sql.OnRow += new QueryReader<List<Item>>.Row(OnRow_Genre); sql.OnConnection += new Sql.ConnectionEvent(sql_OnConnection); sql.Execute(ConnectionString, availableGenre); Filter dialog = new Filter(135, _currentGenres, availableGenre); dialog.DoModal(true); }
private void OnCertification() { List<Item> availableCertifications = new List<Item>(); // Based upon the current view (All, Last played, Last Added) QueryReader<List<Item>> sql = new QueryReader<List<Item>>(SqlRating); sql.OnRow += new QueryReader<List<Item>>.Row(OnRow_Rating); sql.OnConnection += new Sql.ConnectionEvent(sql_OnConnection); sql.Execute(ConnectionString, availableCertifications); Filter dialog = new Filter("Certifications", _currentCertifications, availableCertifications); dialog.DoModal(); }