M
melon
Let's say, I have a form class...
public class MainForm : Form {
private CustomClass cc;
public MainForm() {
DoSomething()
InitializeComponent();
}
/// Do something more
public void ShowPreference() {
PreferenceForm pf = new PreferenceForm();
pf.sometextbox.text = cc.something;
/// etc
pf.ShwoDialog();
}
}
public class PreferenceForm: Form {
/// another form
}
Basically, when the user try to close the Preference form, I want it
to be able to modify my Custom class in my main form directly.... how
could I do that?
public class MainForm : Form {
private CustomClass cc;
public MainForm() {
DoSomething()
InitializeComponent();
}
/// Do something more
public void ShowPreference() {
PreferenceForm pf = new PreferenceForm();
pf.sometextbox.text = cc.something;
/// etc
pf.ShwoDialog();
}
}
public class PreferenceForm: Form {
/// another form
}
Basically, when the user try to close the Preference form, I want it
to be able to modify my Custom class in my main form directly.... how
could I do that?