コード例 #1
0
        protected void RaiseErrorEvent(DateTime timestamp, string errorMsg)
        {
            var errorCallback = new MrnErrorEventArgs()
            {
                TimeStamp = timestamp, ErrorMessage = errorMsg
            };

            OnError(errorCallback);
        }
 private void ProcessMrnErrorEvent(object sender, MrnErrorEventArgs e)
 {
     Dispatcher.BeginInvoke(new Action(() =>
     {
         var msg = $"{e.TimeStamp} {e.ErrorMessage}";
         MrnViewerDesktop.Title = $"{_windowsName} Error:: {msg}";
         MessageBox.Show(msg);
     }));
 }
コード例 #3
0
        protected virtual void OnError(MrnErrorEventArgs e)
        {
            var handler = ErrorEvent;

            handler?.Invoke(this, e);
        }