my task is to make an e.g. of MVP implementation. I want to have a CheckBox in my View (form) - its role is to switch visible true / false of some fields on form.
Do I need to put some some code to Presenter, to keep my project as MVP?
Right now I got all of things related to that checkbox in my View
Form1.Designercs :
public void SetTelephoneVisible()
{
this.telephone.Visible = true;
this.label5.Visible = true;
}
public void SetTelephoneInvisible()
{
this.telephone.Visible = false;
this.label5.Visible = false;
}
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
Form1.cs :
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
SetTelephoneVisible();
if (checkBox1.Checked == false)
SetTelephoneInvisible();
}
So, once again - Do I need to put some some code to Presenter, to keep my project as MVP? ... and how to do it?
PS: I can give u all of my code, if its needed to clarify sth