19 using System.Collections.Generic;
39 public bool HasException
44 return (c != null && c.
Exception != null);
57 Content = processMessageContent;
63 :
this(processMessageContent)
72 :
this(processMessageContent, caption)
82 :
this(processMessageContent, caption, message)
84 OkButtonText = okButtonText;
93 :
this(processMessageContent, caption, message, okButtonText)
103 string param1,
string param2)
104 :
this(processMessageContent, caption, message, okButtonText, param1)
114 string param1,
string param2,
string param3)
115 :
this(processMessageContent, caption, message, okButtonText, param1, param2)
122 #region Virtual methods 124 protected virtual Window CreateSuccessWindow()
129 protected virtual Window CreateFailureWindow()
134 protected virtual Window CreateCancelledWindow()
145 Logger.Info(
"ProcessCompletedAction.CreateView");
147 if (Content is ProcessMessageContent)
149 if (content.WasCancelled)
151 Logger.Info(
"Process was cancelled");
152 return CreateCancelledWindow();
154 else if (content.WasSuccessful && content.
Exception == null)
156 Logger.Info(
"Process was successful");
157 return CreateSuccessWindow();
161 Logger.Warn(
"Process failed!");
162 return CreateFailureWindow();
167 Logger.Fatal(
"ProcessCompletedAction requires ProcessMessageContent, got {0}",
168 Content.GetType().AssemblyQualifiedName);
169 throw new ArgumentException(
170 "This message action must be used for Messages with ProcessMessageContent only.");
178 private static NLog.Logger Logger {
get {
return _logger.Value; } }
180 private static readonly Lazy<
NLog.Logger> _logger =
new Lazy<
NLog.Logger>(() =>
NLog.LogManager.GetCurrentClassLogger());
Interaction logic for ProcessFailedView.xaml
Holds information about percent completion of a process and defines events that occur when the proces...
WPF action that invokes different views depending on the status of a completed process.
Conveys a message from a view model to a consumer (typically, a view) that has subscribed to the Sent...
Exception Exception
If something in the process went wrong, this will be the corresponding exception. ...
Interaction logic for NotificationView.xaml
Interaction logic for ProcessSucceededView.xaml
override Window CreateView()
Returns a view that can bind to expected message contents.
Opens a generic WPF dialog window that displays a message and has a single OK button.