From 091a7839d71c8d85e983898c44f3536c9896d66f Mon Sep 17 00:00:00 2001 From: karstenfk Date: Mon, 19 Aug 2013 11:28:17 +0200 Subject: [PATCH] Added owner parameter to CustomMessageBox methods Removed blank icon and the icon space using IconHelper.cs Removed topmost flag, the dialog shouldn't be on top of other applications Center dialog on owner instead of screen --- source/CustomMessageBoxDemo/App.xaml | 16 +- source/CustomMessageBoxDemo/App.xaml.cs | 32 +-- .../CustomMessageBox Demo.csproj | 218 ++++++++-------- source/CustomMessageBoxDemo/MainWindow.xaml | 42 +-- .../CustomMessageBoxDemo/MainWindow.xaml.cs | 158 ++++++------ .../Properties/AssemblyInfo.cs | 110 ++++---- .../Properties/Resources.Designer.cs | 126 ++++----- .../Properties/Resources.resx | 232 ++++++++--------- .../Properties/Settings.Designer.cs | 52 ++-- .../Properties/Settings.settings | 12 +- source/CustomMessageBoxDemo/app.config | 6 +- source/WPFCustomMessageBox.sln | 52 ++-- source/WPFCustomMessageBox/App.xaml | 16 +- source/WPFCustomMessageBox/App.xaml.cs | 32 +-- .../WPFCustomMessageBox/CustomMessageBox.cs | 239 +++++++++++++++++- .../CustomMessageBoxWindow.xaml | 5 +- .../CustomMessageBoxWindow.xaml.cs | 8 +- source/WPFCustomMessageBox/IconHelper.cs | 50 ++++ .../Properties/Resources.resx | 232 ++++++++--------- .../Properties/Settings.settings | 12 +- .../WPFCustomMessageBox.csproj | 7 +- source/WPFCustomMessageBox/blankicon.ico | Bin 518 -> 0 bytes 22 files changed, 966 insertions(+), 691 deletions(-) create mode 100644 source/WPFCustomMessageBox/IconHelper.cs delete mode 100644 source/WPFCustomMessageBox/blankicon.ico diff --git a/source/CustomMessageBoxDemo/App.xaml b/source/CustomMessageBoxDemo/App.xaml index bb1c7c0..6a30be5 100644 --- a/source/CustomMessageBoxDemo/App.xaml +++ b/source/CustomMessageBoxDemo/App.xaml @@ -1,8 +1,8 @@ - - - - - + + + + + diff --git a/source/CustomMessageBoxDemo/App.xaml.cs b/source/CustomMessageBoxDemo/App.xaml.cs index 877149a..7536b64 100644 --- a/source/CustomMessageBoxDemo/App.xaml.cs +++ b/source/CustomMessageBoxDemo/App.xaml.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace CustomMessageBoxDemo -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Windows; + +namespace CustomMessageBoxDemo +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj b/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj index a11e280..b763ba4 100644 --- a/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj +++ b/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj @@ -1,110 +1,110 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {BEB8F894-9C79-4D30-8061-C5570C1B159D} - WinExe - Properties - CustomMessageBoxDemo - CustomMessageBoxDemo - v4.0 - Client - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - {ED02D418-7C0E-4E6C-99A9-BE4357122AE7} - WPFCustomMessageBox - - - - + + + + Debug + x86 + 8.0.30703 + 2.0 + {BEB8F894-9C79-4D30-8061-C5570C1B159D} + WinExe + Properties + CustomMessageBoxDemo + CustomMessageBoxDemo + v4.0 + Client + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + {ED02D418-7C0E-4E6C-99A9-BE4357122AE7} + WPFCustomMessageBox + + + + \ No newline at end of file diff --git a/source/CustomMessageBoxDemo/MainWindow.xaml b/source/CustomMessageBoxDemo/MainWindow.xaml index 0043b31..6e87820 100644 --- a/source/CustomMessageBoxDemo/MainWindow.xaml +++ b/source/CustomMessageBoxDemo/MainWindow.xaml @@ -1,21 +1,21 @@ - - -