12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using wpf_template.Model;
- namespace wpf_template
- {
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- ///
- public partial class MainWindow : Window
- {
- public IEnumerable<Product> ProductList { get; set; }
- public MainWindow()
- {
- InitializeComponent();
- DataContext = this;
- Globals.dataProvider = new LocalDataProvider();
- ProductList = Globals.dataProvider.GetProducts();
- }
- private void ExitButton_Click(object sender, RoutedEventArgs e)
- {
- Application.Current.Shutdown();
- }
- }
- class Globals
- {
- public static IDataProvider dataProvider;
- }
- }
|