public EditMonthWindow(Month editingMonth)
        {
            this.editingMonth = editingMonth;
            productList       = new ObservableCollection <Product>();
            RefreshProductList();

            ProductView.Filter = new Predicate <object>(o => Filter(o as Product));

            this.DataContext = this;

            ChartPoints = new ChartPointsClass();
            //ChartPoints.AddPoint(3, "Test");
            RefreshPieChart();
            InitializeComponent();
            this.SizeChanged += OnWindowSizeChanged;
        }
        public MainWindow()
        {
            if (!CheckConnection())
            {
                MessageBox.Show("BŁĄD ŁĄCZENIA Z BAZĄ DANYCH 'projektwpf'");
            }
            //Zresetowanie bazy danych
            //db.RecreateDatabaseWithValues();
            monthList = new ObservableCollection <Month>();
            RefreshMonthList();

            MonthView.Filter = new Predicate <object>(o => Filter(o as Month));

            ChartPoints = new ChartPointsClass();

            this.DataContext = this;

            RefreshPieChart();
            InitializeComponent();
            this.SizeChanged += OnWindowSizeChanged;
        }