示例#1
0
        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;
                }
            }
        }
示例#2
0
        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;
                }

            }
        }