I am trying to understand the MVP design pattern. I have aplication WinForms (View) + DLL (IVIEW, IMODEL)
1) Where is a better place for Presentor? DLL or WinForms app?
2) Where do I call a method SaveFile() for saving the results in a file?
public MyPresenter(IMyModel model, IMyView view)
{
...
this.view.SavetoFile += View_SavetoFile;
}
private void View_SavetoFile(object sender, EventArgs e)
{
SaveFile()
}
private void SaveFile()
{
using (var saveFileDialog = new SaveFileDialog())
{
if (DialogResult.OK == saveFileDialog.ShowDialog())
{
using (var xnmlFile = new XMLFile(saveFileDialog.FileName))
{
xmlFile.Save(this.model.Result)
}
}
}
Is that right?