public void DisplayTextProxyHandler(DisplayTextEventArgs args)
 {
     if (DisplayText != null)
     {
         DisplayText(args);
     }
 }
        private void SafeInvokeDisplayText(DisplayTextEventArgs displayTextEventArgs)
        {
            if (DisplayText == null)
            {
                return;         //No Listeners
            }
            DisplayTextEvent listener = null;

            Delegate[] dels = DisplayText.GetInvocationList();

            foreach (Delegate del in dels)
            {
                try
                {
                    listener = (DisplayTextEvent)del;
                    listener.Invoke(displayTextEventArgs);
                }
                catch (Exception)
                {
                    //Could not reach the destination, so remove it
                    //from the list
                    DisplayText -= listener;
                }
            }
        }
Пример #3
0
 void InterfaceEventProxy_DisplayText(DisplayTextEventArgs args)
 {
     TextDisplay = new TextDisplay()
     {
         Text = args.Text,
         Duration = args.Duration
     };
 }
Пример #4
0
        private void SafeInvokeDisplayText(DisplayTextEventArgs displayTextEventArgs)
        {
            if (DisplayText == null)
                return;         //No Listeners

            DisplayTextEvent listener = null;
            Delegate[] dels = DisplayText.GetInvocationList();

            foreach (Delegate del in dels)
            {
                try
                {
                    listener = (DisplayTextEvent)del;
                    listener.Invoke(displayTextEventArgs);
                }
                catch (Exception)
                {
                    //Could not reach the destination, so remove it
                    //from the list
                    DisplayText -= listener;
                }
            }
        }
Пример #5
0
 public void DisplayTextProxyHandler(DisplayTextEventArgs args)
 {
     if (DisplayText != null)
         DisplayText(args);
 }