private void Category_OnLoaded(object sender, RoutedEventArgs e) { var query = Db.Query("SELECT Name, FromFile FROM categories WHERE Path = @Path", new [] { new SQLiteParameter("Path", BookKeeper.GetRelativeBookFilePath(_bookFile)) }); while (query.Read()) { var category = new CategoryTag { Name = query["Name"].ToString(), FromFile = SQLiteConvert.ToBoolean(query["FromFile"]) }; _categoryTagList.Add(category); } if (_categoryTagList.Count > 0) { CategoryTagsBorder.Visibility = Visibility.Visible; } Categories.ItemsSource = _categoryTagList; var defaultCategories = Properties.Settings.Default.DefaultCategories.Split(';'); var hintList = new List <string>(defaultCategories); hintList.AddRange(LibraryStructure.CategoryList()); hintList.Sort(); new Whisperer { TextBox = (TextBox)sender, HintList = hintList }; }
private void Category_OnLoaded(object sender, RoutedEventArgs e) { var hintList = LibraryStructure.CategoryList(); hintList.Sort(); new Whisperer { TextBox = (TextBox)sender, HintList = hintList }; }