private void btnOK_Click(object sender, EventArgs e) { lock (syncRoot) { bAlarmFlag = 0; this.Close(); dlg = null; } }
/// <summary> /// 创建唯一实例 /// </summary> public static FrmAction CreateInstance() { lock (syncRoot) { if (dlg == null || dlg.IsDisposed) { dlg = new FrmAction(); if (bAlarmInfo != string.Empty) { dlg.labInfo.Text = bAlarmInfo; } } } return(dlg); }