Exemple #1
0
        public MainWindow()
        {
            InitializeComponent();
            addContent2 = new AddContent(dgDataBase);

            buttonAddProfit.Click   += buttonAddProfit_Click;
            buttonAddSpending.Click += ButtonAddSpending_Click;
            weather.Loaded          += Window_Loaded;
            lcurentMoney.Loaded     += Window_Loaded;

            mainPresenter = new MainPresenter(this, new DBManager(), new DBHistory(), addContent2);
        }
Exemple #2
0
 private void ButtonAddSpending_Click(object sender, RoutedEventArgs e)
 {
     AddContent?.Invoke(this, EventArgs.Empty);
     CurrentMoney?.Invoke(this, EventArgs.Empty);
 }
Exemple #3
0
        public MainPresenter(IMainWindow view, IDBManager manager, IDBHistory history, AddContent addContent)
        {
            _view       = view;
            _manager    = manager;
            _history    = history;
            _addContent = addContent;

            _view.GetWeather   += GetWeather;
            _view.CurrentMoney += CurrentMoney;

            _addContent.WievDataGridDBHistory += WiewContent;
            _addContent.SetDataBaseContent    += View_AddDataBaseContent;
        }