public static void ProgressingComplete(string key) { lock (_keys) { if (_keys.Contains(key)) _keys.Remove(key); if ((_form != null) && (_keys.Count == 0)) { _form.Close(); _form = null; } } }
public static string ProgressingStarted() { var key = Guid.NewGuid().ToString(); lock (_keys) { _keys.Add(key); if (_form == null) { _form = new ProgressingForm(); _form.Show(); System.Windows.Forms.Application.DoEvents(); } } return key; }