39 lines
896 B
C#
39 lines
896 B
C#
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 demo26052026
|
|
{
|
|
public partial class UserControl1 : UserControl
|
|
{
|
|
Form form { get; set; }
|
|
public UserControl1(Form s)
|
|
{
|
|
form = s;
|
|
InitializeComponent();
|
|
foreach(Control control in this.Controls)
|
|
{
|
|
control.Click += pictureBox1_Click;
|
|
}
|
|
}
|
|
|
|
private void textBox4_TextChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void pictureBox1_Click(object sender, EventArgs e)
|
|
{
|
|
form.Hide();
|
|
Form2 form2 = new Form2(int.Parse(this.Name));
|
|
form2.ShowDialog();
|
|
}
|
|
}
|
|
}
|