using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _3_8_17
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public partial class Form2 : Form
{
public Form2();
internal void SetValues(string Gender, string Hobby, string Status)
{
throw new NotImplementedException();
}
}
private void button1_Click(object sender, EventArgs e)
{
try
{
String Gender, Hobby, Status = "";
if (radioButton1.Checked) Gender = "Male";
else Gender = "Female";
if (checkBox1.Checked) Hobby = "Reading";
else Hobby = "Painting";
if (radioButton3.Checked) Status = "Married";
else Status = "Unmarried";
Form2 objPreview = new Form2();
objPreview.SetValues(Gender, Hobby, Status);
//label1.Text = textBox1.Text;
objPreview.Show();
}
catch(Exception ex)
{
MessageBox.Show("Message"+ ex.Message);
}
// string a;
// a = comboBox1.SelectedItem.ToString();
// Form2 fr = new Form2();
// fr.Show();
private void Form1_Load(object sender, EventArgs e)
{
private void button2_Click(object sender, EventArgs e)
{
Form2 fr = new Form2();
fr.Show();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}