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 Clicker_Game { public partial class Form2 : Form { static Form2 newMessageBox; static string Button_id; public Form2() { InitializeComponent(); } private void Form2_Load(object sender, EventArgs e) { } public static string ShowBox(string txtMessage) { newMessageBox = new Form2(); newMessageBox.label1.Text = txtMessage; newMessageBox.ShowDialog(); return Button_id; } public static string ShowBox(string txtMessage, string txtTitle) { newMessageBox = new Form2(); newMessageBox.label1.Text = txtMessage; newMessageBox.Text = txtTitle; newMessageBox.ShowDialog(); return Button_id; } private void button3_Click_1(object sender, EventArgs e) { Button_id = "3"; newMessageBox.Dispose(); } private void button2_Click_1(object sender, EventArgs e) { Button_id = "2"; newMessageBox.Dispose(); this.Close(); } private void button1_Click_1(object sender, EventArgs e) { Button_id = "1"; newMessageBox.Dispose(); } } }