private void button21_Click(object sender, EventArgs e) { try { Helper helper = new Helper("127.0.0.1", 9527); helper.UnLock("testLog", this.lockId2); this.Invoke(new Action <string>(this.WriteMsg), new object[] { "线程 2 UnLock success ." }); } catch (Exception ex) { WriteMsg(ex.ToString()); } this.locked2 = false; }