diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-13 14:22:32 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-13 14:22:32 +0300 |
| commit | 4490b0a76d4188cb285d62b106e208803ceaa133 (patch) | |
| tree | a24f3d5653979ebaff86b524f452d20c74df3327 /Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications | |
| parent | d3c0c73dc2aeae2dacf4224ce7997609132426a1 (diff) | |
| download | Tango-4490b0a76d4188cb285d62b106e208803ceaa133.tar.gz Tango-4490b0a76d4188cb285d62b106e208803ceaa133.zip | |
PPC.Common Logs and comments!
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications')
3 files changed, 61 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/ItemBase.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/ItemBase.cs index 12369948b..41bfb8e4d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/ItemBase.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/ItemBase.cs @@ -8,6 +8,11 @@ using Tango.Core.Commands; namespace Tango.PPC.Common.Notifications { + /// <summary> + /// Represents a base notification item class. + /// </summary> + /// <seealso cref="Tango.Core.ExtendedObject" /> + /// <seealso cref="System.IDisposable" /> public abstract class ItemBase : ExtendedObject, IDisposable { /// <summary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs index b7f206e7c..0f8354157 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs @@ -6,8 +6,15 @@ using System.Threading.Tasks; namespace Tango.PPC.Common.Notifications.NotificationItems { + /// <summary> + /// Represents a simple text message notification item which can be inserted into the application notifications panel. + /// </summary> + /// <seealso cref="Tango.PPC.Common.Notifications.NotificationItem" /> public class MessageNotificationItem : NotificationItem { + /// <summary> + /// Represents the available message notification types. + /// </summary> public enum MessageNotificationItemTypes { Info, @@ -17,6 +24,9 @@ namespace Tango.PPC.Common.Notifications.NotificationItems } private String _message; + /// <summary> + /// Gets or sets the message. + /// </summary> public String Message { get { return _message; } @@ -24,6 +34,9 @@ namespace Tango.PPC.Common.Notifications.NotificationItems } private String _expandedMessage; + /// <summary> + /// Gets or sets the extra message when the notification panel is expanded. + /// </summary> public String ExpandedMessage { get { return _expandedMessage; } @@ -31,46 +44,82 @@ namespace Tango.PPC.Common.Notifications.NotificationItems } private MessageNotificationItemTypes _messageType; - + /// <summary> + /// Gets or sets the type of the message. + /// </summary> public MessageNotificationItemTypes MessageType { get { return _messageType; } set { _messageType = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Gets or sets the view type. + /// </summary> public override Type ViewType { get { return typeof(MessageNotificationItemView); } } + /// <summary> + /// Initializes a new instance of the <see cref="MessageNotificationItem"/> class. + /// </summary> public MessageNotificationItem() : base() { } - public MessageNotificationItem(String message, String expandedMessage, MessageNotificationItemTypes type, Action pressed) : this() + /// <summary> + /// Initializes a new instance of the <see cref="MessageNotificationItem"/> class. + /// </summary> + /// <param name="message">The message.</param> + /// <param name="expandedMessage">The expanded message.</param> + /// <param name="type">The type.</param> + /// <param name="pressedAction">The pressed action.</param> + public MessageNotificationItem(String message, String expandedMessage, MessageNotificationItemTypes type, Action pressedAction) : this() { Message = message; ExpandedMessage = expandedMessage; MessageType = type; - Pressed += (_, __) => pressed?.Invoke(); + Pressed += (_, __) => pressedAction?.Invoke(); } - public MessageNotificationItem(String message, MessageNotificationItemTypes type, Action pressed) : this(message, null, type, pressed) + /// <summary> + /// Initializes a new instance of the <see cref="MessageNotificationItem"/> class. + /// </summary> + /// <param name="message">The message.</param> + /// <param name="type">The type.</param> + /// <param name="pressedAction">The pressed action.</param> + public MessageNotificationItem(String message, MessageNotificationItemTypes type, Action pressedAction) : this(message, null, type, pressedAction) { } + /// <summary> + /// Initializes a new instance of the <see cref="MessageNotificationItem"/> class. + /// </summary> + /// <param name="message">The message.</param> + /// <param name="expandedMessage">The expanded message.</param> + /// <param name="type">The type.</param> public MessageNotificationItem(String message, String expandedMessage, MessageNotificationItemTypes type) : this(message, expandedMessage, type, null) { } + /// <summary> + /// Initializes a new instance of the <see cref="MessageNotificationItem"/> class. + /// </summary> + /// <param name="message">The message.</param> + /// <param name="type">The type.</param> public MessageNotificationItem(String message, MessageNotificationItemTypes type) : this(message, null, type) { } + /// <summary> + /// Initializes a new instance of the <see cref="MessageNotificationItem"/> class. + /// </summary> + /// <param name="message">The message.</param> public MessageNotificationItem(String message) : this(message, MessageNotificationItemTypes.Info) { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml.cs index 559d81347..cbc1edca1 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml.cs @@ -16,8 +16,10 @@ using System.Windows.Shapes; namespace Tango.PPC.Common.Notifications.NotificationItems { /// <summary> - /// Interaction logic for MessageNotificationItemView.xaml + /// Represents the <see cref="MessageNotificationItem"/> view. /// </summary> + /// <seealso cref="System.Windows.Controls.UserControl" /> + /// <seealso cref="System.Windows.Markup.IComponentConnector" /> public partial class MessageNotificationItemView : UserControl { public MessageNotificationItemView() |
