コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: OlesOv/Course_BD
 public void LoadCategories()
 {
     _filteredCategoriesList = Controller.SearchCategories(SearchCategoryTextBox.Text);
     CategoriesStack.Children.Clear();
     foreach (var p in _filteredCategoriesList)
     {
         var t = new Button
         {
             Content = p.Name
         };
         t.Click += (s, e) =>
         {
             var с = new CategoryWindow(this, p.Name);
             с.Show();
             this.Hide();
         };
         CategoriesStack.Children.Add(t);
     }
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: OlesOv/Course_BD
 private void NewCategoryButton_Click(object sender, RoutedEventArgs e)
 {
     var p = new CategoryWindow(this, "");
     p.Show();
     this.Hide();
 }