diff --git a/AuthenticationExample/AuthenticationExample.csproj b/AuthenticationExample/AuthenticationExample.csproj index 9b55bc0..e5e69b5 100644 --- a/AuthenticationExample/AuthenticationExample.csproj +++ b/AuthenticationExample/AuthenticationExample.csproj @@ -89,11 +89,8 @@ ..\packages\EventHook.1.4.105\lib\net45\EventHook.dll - - ..\packages\Finsemble.4.5.0\lib\net452\Finsemble.dll - - - ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll + + ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll @@ -116,6 +113,9 @@ ..\packages\Nito.AsyncEx.4.0.1\lib\net45\Nito.AsyncEx.Enlightenment.dll + + ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll + ..\packages\SuperSocket.ClientEngine.Core.0.10.0\lib\net45\SuperSocket.ClientEngine.dll diff --git a/AuthenticationExample/MainWindow.xaml b/AuthenticationExample/MainWindow.xaml index eb4a446..1ddda75 100644 --- a/AuthenticationExample/MainWindow.xaml +++ b/AuthenticationExample/MainWindow.xaml @@ -5,12 +5,56 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:AuthenticationExample" mc:Ignorable="d" - Title="MainWindow" Height="350" Width="525" + Title="MainWindow" Height="300" Width="350" Closing="Window_Closing"> + + + + - - - diff --git a/AuthenticationExample/MainWindow.xaml.cs b/AuthenticationExample/MainWindow.xaml.cs index 26addb9..872b7cd 100644 --- a/AuthenticationExample/MainWindow.xaml.cs +++ b/AuthenticationExample/MainWindow.xaml.cs @@ -1,19 +1,7 @@ -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; -using ChartIQ.Finsemble; +using ChartIQ.Finsemble; using Newtonsoft.Json.Linq; +using System; +using System.Windows; namespace AuthenticationExample { @@ -50,7 +38,7 @@ private void Finsemble_Connected(object sender, EventArgs e) }); } - private void Button_Click(object sender, RoutedEventArgs e) + private void PublishCredentials_Click(object sender, RoutedEventArgs e) { finsemble.AuthenticationClient.PublishAuthorization(UserName.Text, JObject.FromObject(new Credentials(Guid.NewGuid().ToString()))); } diff --git a/AuthenticationExample/Properties/AssemblyInfo.cs b/AuthenticationExample/Properties/AssemblyInfo.cs index cff6e40..9cdc56f 100644 --- a/AuthenticationExample/Properties/AssemblyInfo.cs +++ b/AuthenticationExample/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.5.0.0")] -[assembly: AssemblyFileVersion("4.5.0.0")] +[assembly: AssemblyVersion("5.2.0.0")] +[assembly: AssemblyFileVersion("5.2.0.0")] diff --git a/AuthenticationExample/packages.config b/AuthenticationExample/packages.config index 91a0366..7cab62a 100644 --- a/AuthenticationExample/packages.config +++ b/AuthenticationExample/packages.config @@ -3,13 +3,13 @@ - - - + + + diff --git a/MultiWindowExample/App.config b/MultiWindowExample/App.config index c97a35c..3ffaea1 100644 --- a/MultiWindowExample/App.config +++ b/MultiWindowExample/App.config @@ -13,14 +13,6 @@ - - - - - - - - diff --git a/MultiWindowExample/App.xaml.cs b/MultiWindowExample/App.xaml.cs index 7da60ce..ecb5484 100644 --- a/MultiWindowExample/App.xaml.cs +++ b/MultiWindowExample/App.xaml.cs @@ -7,7 +7,6 @@ using System.Windows; using System.Windows.Threading; using ChartIQ.Finsemble; -using log4net; using Microsoft.Shell; namespace MultiWindowExample @@ -17,10 +16,6 @@ namespace MultiWindowExample /// public partial class App : Application, ISingleInstanceApp { - /// - /// The logger - /// - private static readonly ILog Logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly object lockObj = new object(); @@ -67,7 +62,6 @@ public static void Main(string[] args) // then ensure that we always release the mutex if (SingleInstance.InitializeAsFirstInstance(Unique)) { - application = new App(); // If window type passed for initial launch, add listener to launch window when connected. @@ -94,9 +88,7 @@ public static void Main(string[] args) // Allow single instance code to perform cleanup operations SingleInstance.Cleanup(); } - } - } /// @@ -146,7 +138,7 @@ private static bool LaunchWindow(IList args) if (window == null) { - Logger.Error($"Could not create window: {name}"); + Debug.Write($"Could not create window: {name}"); } else { @@ -158,7 +150,7 @@ private static bool LaunchWindow(IList args) IIntegratable fsblWin = window as IIntegratable; if (fsblWin == null) { - Logger.Warn($"The window \"{name}\" is not a window that can be integrated into Finsemble."); + Debug.Write($"The window \"{name}\" is not a window that can be integrated into Finsemble."); } else { diff --git a/MultiWindowExample/MultiWindowExample.csproj b/MultiWindowExample/MultiWindowExample.csproj index c7db519..17e1acb 100644 --- a/MultiWindowExample/MultiWindowExample.csproj +++ b/MultiWindowExample/MultiWindowExample.csproj @@ -49,8 +49,8 @@ ..\packages\EventHook.1.4.105\lib\net45\EventHook.dll - - ..\packages\Finsemble.4.5.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll @@ -76,6 +76,9 @@ ..\packages\Nito.AsyncEx.4.0.1\lib\net45\Nito.AsyncEx.Enlightenment.dll + + ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll + ..\packages\SuperSocket.ClientEngine.Core.0.10.0\lib\net45\SuperSocket.ClientEngine.dll @@ -163,9 +166,6 @@ ResXFileCodeGenerator Resources.Designer.cs - - Always - SettingsSingleFileGenerator diff --git a/MultiWindowExample/Properties/AssemblyInfo.cs b/MultiWindowExample/Properties/AssemblyInfo.cs index 1db953b..5a7809a 100644 --- a/MultiWindowExample/Properties/AssemblyInfo.cs +++ b/MultiWindowExample/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.5.0.0")] -[assembly: AssemblyFileVersion("4.5.0.0")] +[assembly: AssemblyVersion("5.2.0.0")] +[assembly: AssemblyFileVersion("5.2.0.0")] diff --git a/MultiWindowExample/Window1.xaml.cs b/MultiWindowExample/Window1.xaml.cs index 38d261a..84c389d 100644 --- a/MultiWindowExample/Window1.xaml.cs +++ b/MultiWindowExample/Window1.xaml.cs @@ -1,8 +1,7 @@ -using System.Reflection; +using ChartIQ.Finsemble; using System.Windows; using System.Windows.Media; -using ChartIQ.Finsemble; -using log4net; +using ChartIQ.Finsemble.Models; namespace MultiWindowExample { @@ -11,11 +10,6 @@ namespace MultiWindowExample /// public partial class Window1 : Window, IIntegratable { - /// - /// The logger - /// - private static readonly ILog Logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private Finsemble fsbl; public Window1() @@ -32,18 +26,30 @@ public void SetFinsemble(Finsemble fsbl) FinsembleHeader.SetBridge(fsbl); // The Header Control needs a connected finsemble instance //Styling the Finsemble Header - FinsembleHeader.SetActiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetInactiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetInactiveButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetInactiveCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetDockingButtonDockedBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetTitleForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - FinsembleHeader.SetButtonForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - - FinsembleHeader.SetButtonFont(null, 8, FontStyles.Normal, FontWeights.Normal); - FinsembleHeader.SetTitleFont(null, 12, FontStyles.Normal, FontWeights.SemiBold); + FinsembleHeader.GetHandlingService().ActiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().InactiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().ButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().InactiveButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().CloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().InactiveCloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().DockingButtonDockedBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().TitleForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + FinsembleHeader.GetHandlingService().ButtonForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + + FinsembleHeader.GetHandlingService().ButtonFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 8, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.Normal + }; + FinsembleHeader.GetHandlingService().TitleFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 12, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.SemiBold + }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. diff --git a/MultiWindowExample/Window2.xaml.cs b/MultiWindowExample/Window2.xaml.cs index a827356..280543c 100644 --- a/MultiWindowExample/Window2.xaml.cs +++ b/MultiWindowExample/Window2.xaml.cs @@ -1,6 +1,7 @@ using System.Windows; using System.Windows.Media; using ChartIQ.Finsemble; +using ChartIQ.Finsemble.Models; namespace MultiWindowExample { @@ -25,18 +26,30 @@ public void SetFinsemble(Finsemble fsbl) FinsembleHeader.SetBridge(fsbl); // The Header Control needs a connected finsemble instance //Styling the Finsemble Header - FinsembleHeader.SetActiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetInactiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetInactiveButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetInactiveCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetDockingButtonDockedBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetTitleForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - FinsembleHeader.SetButtonForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - - FinsembleHeader.SetButtonFont(null, 8, FontStyles.Normal, FontWeights.Normal); - FinsembleHeader.SetTitleFont(null, 12, FontStyles.Normal, FontWeights.SemiBold); + FinsembleHeader.GetHandlingService().ActiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().InactiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().ButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().InactiveButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().CloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().InactiveCloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().DockingButtonDockedBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().TitleForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + FinsembleHeader.GetHandlingService().ButtonForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + + FinsembleHeader.GetHandlingService().ButtonFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 8, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.Normal + }; + FinsembleHeader.GetHandlingService().TitleFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 12, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.SemiBold + }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. diff --git a/MultiWindowExample/Window3.xaml.cs b/MultiWindowExample/Window3.xaml.cs index f3147f9..4fae987 100644 --- a/MultiWindowExample/Window3.xaml.cs +++ b/MultiWindowExample/Window3.xaml.cs @@ -1,6 +1,7 @@ using System.Windows; using System.Windows.Media; using ChartIQ.Finsemble; +using ChartIQ.Finsemble.Models; namespace MultiWindowExample { @@ -25,18 +26,30 @@ public void SetFinsemble(Finsemble fsbl) FinsembleHeader.SetBridge(fsbl); // The Header Control needs a connected finsemble instance //Styling the Finsemble Header - FinsembleHeader.SetActiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetInactiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetInactiveButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetInactiveCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetDockingButtonDockedBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetTitleForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - FinsembleHeader.SetButtonForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - - FinsembleHeader.SetButtonFont(null, 8, FontStyles.Normal, FontWeights.Normal); - FinsembleHeader.SetTitleFont(null, 12, FontStyles.Normal, FontWeights.SemiBold); + FinsembleHeader.GetHandlingService().ActiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().InactiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().ButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().InactiveButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().CloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().InactiveCloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().DockingButtonDockedBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().TitleForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + FinsembleHeader.GetHandlingService().ButtonForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + + FinsembleHeader.GetHandlingService().ButtonFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 8, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.Normal + }; + FinsembleHeader.GetHandlingService().TitleFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 12, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.SemiBold + }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. diff --git a/MultiWindowExample/Window4.xaml.cs b/MultiWindowExample/Window4.xaml.cs index 01fca96..4e72c86 100644 --- a/MultiWindowExample/Window4.xaml.cs +++ b/MultiWindowExample/Window4.xaml.cs @@ -1,6 +1,7 @@ using System.Windows; using System.Windows.Media; using ChartIQ.Finsemble; +using ChartIQ.Finsemble.Models; namespace MultiWindowExample { @@ -25,18 +26,30 @@ public void SetFinsemble(Finsemble fsbl) FinsembleHeader.SetBridge(fsbl); // The Header Control needs a connected finsemble instance //Styling the Finsemble Header - FinsembleHeader.SetActiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetInactiveBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F"))); - FinsembleHeader.SetButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetInactiveButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetInactiveCloseButtonHoverBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666"))); - FinsembleHeader.SetDockingButtonDockedBackground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4"))); - FinsembleHeader.SetTitleForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - FinsembleHeader.SetButtonForeground(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0"))); - - FinsembleHeader.SetButtonFont(null, 8, FontStyles.Normal, FontWeights.Normal); - FinsembleHeader.SetTitleFont(null, 12, FontStyles.Normal, FontWeights.SemiBold); + FinsembleHeader.GetHandlingService().ActiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().InactiveBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#22262F")); + FinsembleHeader.GetHandlingService().ButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().InactiveButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().CloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().InactiveCloseButtonHoverBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F26666")); + FinsembleHeader.GetHandlingService().DockingButtonDockedBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#0A8CF4")); + FinsembleHeader.GetHandlingService().TitleForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + FinsembleHeader.GetHandlingService().ButtonForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ACB2C0")); + + FinsembleHeader.GetHandlingService().ButtonFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 8, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.Normal + }; + FinsembleHeader.GetHandlingService().TitleFont = new TitlebarFontConfiguration() + { + FontFamily = null, + FontSize = 12, + FontStyle = FontStyles.Normal, + FontWeight = FontWeights.SemiBold + }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. diff --git a/MultiWindowExample/log4net.config b/MultiWindowExample/log4net.config deleted file mode 100644 index 91734ee..0000000 --- a/MultiWindowExample/log4net.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/MultiWindowExample/packages.config b/MultiWindowExample/packages.config index 91a0366..3baf63b 100644 --- a/MultiWindowExample/packages.config +++ b/MultiWindowExample/packages.config @@ -3,13 +3,14 @@ - + + diff --git a/WPFExample/App.xaml.cs b/WPFExample/App.xaml.cs index 1c6f2e4..794cd8d 100644 --- a/WPFExample/App.xaml.cs +++ b/WPFExample/App.xaml.cs @@ -1,29 +1,22 @@ -using System.Diagnostics; -using System.Reflection; +using ChartIQ.Finsemble; +using System.Diagnostics; using System.Windows; -using log4net; -using ChartIQ.Finsemble; - namespace WPFExample { - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application { - /// - /// The logger - /// - private static readonly ILog Logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private MainWindow mainWindow = null; + private MainWindow mainWindow = null; - protected override void OnStartup(StartupEventArgs e) + protected override void OnStartup(StartupEventArgs e) { - Logger.Debug("OnStartup"); + Debug.Print("OnStartup"); #if DEBUG - Debugger.Launch(); + Debugger.Launch(); #endif mainWindow = new MainWindow(e.Args); // send command line arguments to main window. } @@ -31,11 +24,13 @@ protected override void OnStartup(StartupEventArgs e) private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { #if DEBUG - Debugger.Launch(); + Debugger.Launch(); #endif - Finsemble.DispatcherUnhandledException(mainWindow, e); - Logger.Error("An Unhandled Exception has occurred. Please Check your event Logs.", e.Exception); - Shutdown(); - } + + Finsemble.DispatcherUnhandledException(mainWindow, e); + + Debug.Print($"An Unhandled Exception has occurred. Exception: {e.Exception}"); + Shutdown(); + } } } diff --git a/WPFExample/MainWindow.xaml b/WPFExample/MainWindow.xaml index c1b6b8a..3c2ac7c 100644 --- a/WPFExample/MainWindow.xaml +++ b/WPFExample/MainWindow.xaml @@ -1,36 +1,37 @@ - + - - - - - - -