Answer the question
In order to leave comments, you need to log in
Guys, why is the event null?
Sori that a lot of information))
There is a MainWindows form
It has a button that calls the AddContent Form
private void ButtonAddSpending_Click(object sender, RoutedEventArgs e) {
AddContent addContent = new AddContent();
addContent.Owner = this;
addContent.ShowDialog();
}
public event EventHandler EventAddContent;
buttonAddContent.Click += ButtonAddContent_Click;
private void ButtonAddContent_Click(object sender, RoutedEventArgs e) {
EventAddContent?.Invoke(this, EventArgs.Empty);
this.Activate();
buttonAddContent.IsEnabled = false;
}
public MainPresenter( IAddContentPresenter addContent) {
_addContent = addContent;
_addContent.EventAddContent += View_AddContent;
}
private void View_AddContent(object sender, EventArgs e) { //Метод записывает данные в БД
_manager.SetDBHistories(_history);
}
null
EventAddContent?.Invoke(this, EventArgs.Empty);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question