private void timer1_Tick(object sender, EventArgs e) { outTime++; if (isUpdateSuccess) { timer1.Enabled = false; if (!IsCreate) { IMLibrary3.Global.MsgShow("更新新用户信息成功!"); this.Close(); } else { IMLibrary3.Global.MsgShow("创建新用户成功!"); string groupID = this.textBoxGroupID.Text; UserVcard = new IMLibrary3.Organization.UserVcard(); this.textBoxGroupID.Text = groupID; this.butCreate.Enabled = true; } } else if (outTime > 10) { timer1.Enabled = false; IMLibrary3.Global.MsgShow("操作超时!"); this.butCreate.Enabled = true; this.butOK.Enabled = true; outTime = 0; } }
private void timer1_Tick(object sender, EventArgs e) { outTime++; if (isUpdateSuccess) { timer1.Enabled = false; if (!IsCreate) { IMLibrary3.Global.MsgShow("更新新用户信息成功!"); this.Close(); } else { IMLibrary3.Global.MsgShow("创建新用户成功!"); string groupID = this.textBoxGroupID.Text; UserVcard = new IMLibrary3.Organization.UserVcard(); this.textBoxGroupID.Text = groupID; this.butCreate.Enabled = true; } } else if (outTime > 10) { timer1.Enabled = false; IMLibrary3.Global.MsgShow("操作超时!"); this.butCreate.Enabled = true; this.butOK.Enabled = true; outTime = 0; } }