using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyDialog
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
int answer;
public string ShowDialog2()
{
base.ShowDialog();
return answer;
}
private void button1_Click(object sender, EventArgs e)
{
answer = "Yes";
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
answer = "No";
this.Close();
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyDialog
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
int answer;
public string ShowDialog2()
{
base.ShowDialog();
return answer;
}
private void button1_Click(object sender, EventArgs e)
{
answer = "Yes";
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
answer = "No";
this.Close();
}
}
}