diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-17 19:06:13 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-17 19:06:13 +0300 |
| commit | 7658a8546a9c33a76376dff3ab646f2aceaf0a01 (patch) | |
| tree | 10c2cee7f96268e9052e19901f49f3e0a1e75d41 /Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems | |
| parent | 22853e394b878578084db1062664c38c40e88d07 (diff) | |
| download | Tango-7658a8546a9c33a76376dff3ab646f2aceaf0a01.tar.gz Tango-7658a8546a9c33a76376dff3ab646f2aceaf0a01.zip | |
Working on PPC !!!
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems')
3 files changed, 77 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotification.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotification.cs new file mode 100644 index 000000000..49a0c03eb --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotification.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.BL.Enumerations; +using Tango.PPC.Common.Notifications; + +namespace Tango.PPC.UI.Notifications.NotificationItems +{ + public class EmptyCartridgesNotification : NotificationItem + { + public List<LiquidType> LiquidTypes { get; set; } + + public EmptyCartridgesNotification() + { + Message = "Cartridges are empty, please replace cartridges"; + } + + public EmptyCartridgesNotification(IEnumerable<LiquidType> liquidTypes) : this() + { + LiquidTypes = liquidTypes.ToList(); + } + + public override Type ViewType + { + get + { + return typeof(EmptyCartridgesNotificationView); + } + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotificationView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotificationView.xaml new file mode 100644 index 000000000..7ce525337 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotificationView.xaml @@ -0,0 +1,15 @@ +<UserControl x:Class="Tango.PPC.UI.Notifications.NotificationItems.EmptyCartridgesNotificationView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.PPC.UI.Notifications.NotificationItems" + mc:Ignorable="d" + d:DesignHeight="60" d:DesignWidth="400" MinHeight="50" Background="Transparent" Foreground="#FF7777" d:DataContext="{d:DesignInstance Type=local:EmptyCartridgesNotification, IsDesignTimeCreatable=True}"> + <Grid Margin="10"> + <DockPanel> + <Image Source="/Images/warning-test.png" Width="24" /> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" TextWrapping="Wrap" Text="{Binding Message}"></TextBlock> + </DockPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotificationView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotificationView.xaml.cs new file mode 100644 index 000000000..5fab4ab44 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/EmptyCartridgesNotificationView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.PPC.UI.Notifications.NotificationItems +{ + /// <summary> + /// Interaction logic for EmptyCartridgesNotification.xaml + /// </summary> + public partial class EmptyCartridgesNotificationView : UserControl + { + public EmptyCartridgesNotificationView() + { + InitializeComponent(); + } + } +} |
