Hi All,
I have a WinForm and few properties that are set on it.
for example : Name,Address are accepted on the Form.
(many more properties in actual example)
The current implementation is somewhat similar to
frmName frmView = new frmName (); //frmName is WINFORM
frmView.Name= "ABC"; //any valid string or read this from file
frmView.Address="SomeAddress"; //any valid address or read this from file
if (frmView.ShowDialog() == DialogResult.OK)
{
//OK CLICK PROCESS and
// get new values edited by user
string name = frmView .Name;
string address = frmView.Address;
doProcessing(name,address);
}
else{
//Ignore cancel click..
}
how do i convert this to a MVP based Winform application.
Also need to refactor the processing done on ShowDialog() to the Presenter/Model
(dunno exactly where to do it)?
Also need to avoid writing code on the form itself.(Passive view)
Thanks All.