internal void NotifyUserDrawEvent(DrawingContext dc) { if (dlgUserDrawWPF == null) { return; } System.Delegate[] invklist = dlgUserDrawWPF.GetInvocationList(); IEnumerator ie = invklist.GetEnumerator(); while (ie.MoveNext()) { delegateDrawWPF handler = (delegateDrawWPF)ie.Current; try { handler.Invoke(dc); } catch (Exception ex) { dlgUserDrawWPF -= handler; } } }
internal void NotifyUserDrawEvent(DrawingContext dc) { if (dlgUserDrawWPF == null) return; System.Delegate[] invklist = dlgUserDrawWPF.GetInvocationList(); IEnumerator ie = invklist.GetEnumerator(); while (ie.MoveNext()) { delegateDrawWPF handler = (delegateDrawWPF)ie.Current; try { handler.Invoke(dc); } catch (Exception ex) { dlgUserDrawWPF -= handler; } } }