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.textBoxSuperiorId.Text; GroupVcard = new IMLibrary3.Organization.GroupVcard(); this.textBoxSuperiorId.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.textBoxSuperiorId.Text; GroupVcard = new IMLibrary3.Organization.GroupVcard(); this.textBoxSuperiorId.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; } }