From b4665cfa82d94090122b86ce0ac4655ee045365f Mon Sep 17 00:00:00 2001 From: lelmarir Date: Wed, 14 Oct 2015 14:50:57 +0200 Subject: [PATCH 1/4] merge dictionary in GrowlNotifications.xaml instead of Demo's App.xaml, this way it is possible to use the GrowlNotifications without merge the dictionary in the App's App.xaml --- WPFGrowlNotification/App.xaml | 4 +--- WPFGrowlNotification/GrowlNotifiactions.xaml | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WPFGrowlNotification/App.xaml b/WPFGrowlNotification/App.xaml index 8748a14..550bf0b 100644 --- a/WPFGrowlNotification/App.xaml +++ b/WPFGrowlNotification/App.xaml @@ -4,9 +4,7 @@ StartupUri="MainWindow.xaml"> - - - + diff --git a/WPFGrowlNotification/GrowlNotifiactions.xaml b/WPFGrowlNotification/GrowlNotifiactions.xaml index 4913526..08739cb 100644 --- a/WPFGrowlNotification/GrowlNotifiactions.xaml +++ b/WPFGrowlNotification/GrowlNotifiactions.xaml @@ -5,6 +5,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Title="GrowlNotifiactions" Height="530" Width="300" ShowActivated="False" AllowsTransparency="True" WindowStyle="None" ShowInTaskbar="False" Background="Transparent" Topmost="True" UseLayoutRounding="True"> + + + + @@ -66,6 +70,7 @@ + From 8820128f0cb920e64526a6cdfbb002b3e68f8120 Mon Sep 17 00:00:00 2001 From: lelmarir Date: Wed, 14 Oct 2015 14:54:01 +0200 Subject: [PATCH 2/4] use relative path --- WPFGrowlNotification/Resources/ButtonStyle.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPFGrowlNotification/Resources/ButtonStyle.xaml b/WPFGrowlNotification/Resources/ButtonStyle.xaml index 88ba83d..2305506 100644 --- a/WPFGrowlNotification/Resources/ButtonStyle.xaml +++ b/WPFGrowlNotification/Resources/ButtonStyle.xaml @@ -56,7 +56,7 @@ - + From 07398862136764d9c78f8662aa3423ba08d31841 Mon Sep 17 00:00:00 2001 From: lelmarir Date: Mon, 19 Oct 2015 15:08:08 +0200 Subject: [PATCH 3/4] compile as library --- WPFGrowlNotification/App.xaml | 10 ---- WPFGrowlNotification/App.xaml.cs | 15 ------ WPFGrowlNotification/MainWindow.xaml | 11 ---- WPFGrowlNotification/MainWindow.xaml.cs | 53 ------------------- .../WPFGrowlNotification.csproj | 21 ++------ 5 files changed, 4 insertions(+), 106 deletions(-) delete mode 100644 WPFGrowlNotification/App.xaml delete mode 100644 WPFGrowlNotification/App.xaml.cs delete mode 100644 WPFGrowlNotification/MainWindow.xaml delete mode 100644 WPFGrowlNotification/MainWindow.xaml.cs diff --git a/WPFGrowlNotification/App.xaml b/WPFGrowlNotification/App.xaml deleted file mode 100644 index 550bf0b..0000000 --- a/WPFGrowlNotification/App.xaml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/WPFGrowlNotification/App.xaml.cs b/WPFGrowlNotification/App.xaml.cs deleted file mode 100644 index 0ad681b..0000000 --- a/WPFGrowlNotification/App.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Windows; - -namespace WPFGrowlNotification -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/WPFGrowlNotification/MainWindow.xaml b/WPFGrowlNotification/MainWindow.xaml deleted file mode 100644 index d255ac0..0000000 --- a/WPFGrowlNotification/MainWindow.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/WPFGrowlNotification/MainWindow.xaml.cs b/WPFGrowlNotification/MainWindow.xaml.cs deleted file mode 100644 index 3a685a0..0000000 --- a/WPFGrowlNotification/MainWindow.xaml.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Windows; - -namespace WPFGrowlNotification -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow - { - private const double topOffset = 20; - private const double leftOffset = 380; - readonly GrowlNotifiactions growlNotifications = new GrowlNotifiactions(); - - public MainWindow() - { - InitializeComponent(); - growlNotifications.Top = SystemParameters.WorkArea.Top + topOffset; - growlNotifications.Left = SystemParameters.WorkArea.Left + SystemParameters.WorkArea.Width - leftOffset; - } - - private void ButtonClick1(object sender, RoutedEventArgs e) - { - growlNotifications.AddNotification(new Notification { Title = "Mesage #1", ImageUrl = "pack://application:,,,/Resources/notification-icon.png", Message = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }); - } - - private void Button_Click_1(object sender, RoutedEventArgs e) - { - growlNotifications.AddNotification(new Notification { Title = "Mesage #2", ImageUrl = "pack://application:,,,/Resources/microsoft-windows-8-logo.png", Message = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }); - } - - private void ButtonClick2(object sender, RoutedEventArgs e) - { - growlNotifications.AddNotification(new Notification { Title = "Mesage #3", ImageUrl = "pack://application:,,,/Resources/facebook-button.png", Message = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }); - } - - private void ButtonClick3(object sender, RoutedEventArgs e) - { - growlNotifications.AddNotification(new Notification { Title = "Mesage #4", ImageUrl = "pack://application:,,,/Resources/Radiation_warning_symbol.png", Message = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }); - } - - protected override void OnClosed(System.EventArgs e) - { - growlNotifications.Close(); - base.OnClosed(e); - } - - private void WindowLoaded1(object sender, RoutedEventArgs e) - { - //this will make minimize restore of notifications too - //growlNotifications.Owner = GetWindow(this); - } - } -} diff --git a/WPFGrowlNotification/WPFGrowlNotification.csproj b/WPFGrowlNotification/WPFGrowlNotification.csproj index 8680f13..73b575a 100644 --- a/WPFGrowlNotification/WPFGrowlNotification.csproj +++ b/WPFGrowlNotification/WPFGrowlNotification.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {6995ABFD-720F-41E7-BE8B-38F23BA4BB57} - WinExe + Library Properties WPFGrowlNotification WPFGrowlNotification @@ -33,6 +33,9 @@ prompt 4 + + + @@ -45,10 +48,6 @@ - - MSBuild:Compile - Designer - Designer MSBuild:Compile @@ -57,22 +56,10 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - - - App.xaml - Code - GrowlNotifiactions.xaml - - MainWindow.xaml - Code - Designer MSBuild:Compile From ca95ca4a46e1223bd0257a977b1535a4d220a44a Mon Sep 17 00:00:00 2001 From: lelmarir Date: Fri, 15 Jan 2016 14:59:44 +0100 Subject: [PATCH 4/4] new style --- WPFGrowlNotification/GrowlNotifiactions.xaml | 24 ++++++++---------- WPFGrowlNotification/Notification.cs | 24 +++++++++--------- .../Resources/ButtonStyle.xaml | 24 +++++++----------- .../Resources/Radiation_warning_symbol.png | Bin 8596 -> 0 bytes .../Resources/facebook-button.png | Bin 7366 -> 0 bytes .../Resources/microsoft-windows-8-logo.png | Bin 5413 -> 0 bytes .../Resources/notification-icon.png | Bin 7275 -> 0 bytes .../WPFGrowlNotification.csproj | 6 ----- 8 files changed, 32 insertions(+), 46 deletions(-) delete mode 100644 WPFGrowlNotification/Resources/Radiation_warning_symbol.png delete mode 100644 WPFGrowlNotification/Resources/facebook-button.png delete mode 100644 WPFGrowlNotification/Resources/microsoft-windows-8-logo.png delete mode 100644 WPFGrowlNotification/Resources/notification-icon.png diff --git a/WPFGrowlNotification/GrowlNotifiactions.xaml b/WPFGrowlNotification/GrowlNotifiactions.xaml index 08739cb..778c079 100644 --- a/WPFGrowlNotification/GrowlNotifiactions.xaml +++ b/WPFGrowlNotification/GrowlNotifiactions.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Model="clr-namespace:WPFGrowlNotification" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" - Title="GrowlNotifiactions" Height="530" Width="300" ShowActivated="False" AllowsTransparency="True" WindowStyle="None" ShowInTaskbar="False" Background="Transparent" Topmost="True" UseLayoutRounding="True"> + Title="GrowlNotifiactions" Height="265" Width="300" ShowActivated="False" AllowsTransparency="True" WindowStyle="None" ShowInTaskbar="False" Background="Transparent" Topmost="True" UseLayoutRounding="True"> @@ -14,25 +14,23 @@ - - - - - + + + - - - -