Exemplo n.º 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;
                }
            }
        }
Exemplo n.º 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;
                }

            }
        }