// Create a CheckBox and a TextBox from different wizard pages.
// Change both midifiers from private to public.
public partial class Form1 : Form
{
public bool StatusCheckbox { set; get; } = false;
public string ContentTextbox { set; get; } = string.Empty;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
frmWizard Wizard = new frmWizard();
Wizard.ShowDialog();
if (Wizard.DialogResult == DialogResult.OK)
{
StatusCheckbox = Wizard.checkBox1.Checked; // Set checkBox1.Midifiers = public
ContentTextbox = Wizard.textBox1.Text; // Set textBox1. Midifiers = public
Debug.Print(StatusCheckbox.ToString());
Debug.Print(ContentTextbox.ToString());
}
else
{
Debug.Print("Wizard Cancel");
}
}
}