private void button1_Click(object sender, EventArgs e) { lotteryall f2 = lotteryall.GetSingleton(); //f2.ID = ID; //f2.ChangeText += new ChangeTextHandler(Change_Text);//将事件和处理方法绑在一起,这句话必须放在f2.ShowDialog();前面 f2.Show(); //frm.Show(); f2.Activate(); }
private void btnsubmit_Click(object sender, EventArgs e) { lotteryall f2 = lotteryall.GetSingleton(); f2.ID = ID; f2.name = name; f2.no = no; f2.dept = dept; f2.ChangeText += new ChangeTextHandler(Change_Text);//将事件和处理方法绑在一起,这句话必须放在f2.ShowDialog();前面 f2.Show(); }
public static lotteryall GetSingleton() { if (frm == null || frm.IsDisposed) { //frm.ID = uID; //frm.name = uname; //frm.no = uno; //frm.dept = udept; frm = new lotteryall(); } return(frm); }
private void button2_Click(object sender, EventArgs e) { lotteryall f2 = lotteryall.GetSingleton(); f2.Visible = false; }