Ejemplo n.º 1
0
        internal void LogEvent(EventTypeConsts eventType, string Message, string Description)
        {
            string EventTypeName = Enum.GetName(typeof(EventTypeConsts), eventType);

            if (OnEventLog != null)
            {
                OnEventLog.Invoke(EventTypeName, new OnEvenLogWriteEventArgs()
                {
                    EventType   = EventTypeName,
                    Message     = Message,
                    Description = Description
                });
            }
            else
            {
                // TO DO: Do something if event handler is not set
            }
        }
Ejemplo n.º 2
0
        internal void LogEvent(EventTypeConsts eventType, string Message, string Description)
        {
            string EventTypeName = Enum.GetName(typeof(EventTypeConsts), eventType);

            if (OnEventLog != null)
            {
                DispatcherHelper.CheckBeginInvokeOnUI(() =>
                {
                    OnEventLog.Invoke(EventTypeName, new OnEvenLogWriteEventArgs()
                    {
                        EventType   = EventTypeName,
                        Message     = Message,
                        Description = Description
                    });
                });
            }
            else
            {
                MessageHelper.ShowToastMessage(Message, Description);
            }
        }
Ejemplo n.º 3
0
        internal async void LogEvent(EventTypeConsts eventType, string Message, string Description)
        {
            string EventTypeName = Enum.GetName(typeof(EventTypeConsts), eventType);

            if (OnEventLog != null)
            {
                var dispatcher = DispatcherHelper.GetDispatcher;
                await dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    OnEventLog.Invoke(EventTypeName, new OnEvenLogWriteEventArgs()
                    {
                        EventType   = EventTypeName,
                        Message     = Message,
                        Description = Description
                    });
                });
            }
            else
            {
                MessageHelper.ShowToastMessage(Message, Description);
            }
        }