Hello,
You can also use delegate:
In Form2:
public delegate void methodHandler();
public methodHandler OnRunMethod;
In OK Click event:
if (OnRunMethod != null)
OnRunMethod();
example:
private void OK_Click(object sender, RoutedEventArgs e)
{
if (OnRunMethod != null)
OnRunMethod();
}
In Form1 (where you open Form2):
Form2 form2 = new Form2();
form2.OnRunMethod += new methodHandler(MyMethod);
form2.Show()
and in Form1:
private void MyMethod()
{
}
I think it's a perfect way because it can be called from Form2 and you can use both of Show() or ShowDialog().
Good luck.