27 lines
680 B
C#
27 lines
680 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MVPLearning.TestingArea.ViewProperties
|
|
{
|
|
internal class ViewPropertiesPresenter
|
|
{
|
|
private readonly ViewPropertiesView _view;
|
|
|
|
public ViewPropertiesPresenter(ViewPropertiesView view)
|
|
{
|
|
_view = view;
|
|
_view.ButtonClick += ButtonClick;
|
|
_view.LoadData(new() { FirstName = "Mary" });
|
|
if (_view is Form form) { form.Show(); }
|
|
}
|
|
|
|
private void ButtonClick(object? sender, string e)
|
|
{
|
|
_view.LoadData(new() { FirstName = e });
|
|
}
|
|
}
|
|
}
|