Revision f734ab5b trunk/Pithos.Client.WPF/App.xaml.cs
b/trunk/Pithos.Client.WPF/App.xaml.cs | ||
---|---|---|
21 | 21 |
/// </summary> |
22 | 22 |
public partial class App : Application |
23 | 23 |
{ |
24 |
private log4net.ILog Log = log4net.LogManager.GetLogger(typeof (App)); |
|
24 |
private readonly log4net.ILog _log = log4net.LogManager.GetLogger(typeof (App)); |
|
25 |
|
|
25 | 26 |
public App() |
26 | 27 |
{ |
27 |
//var extensionController = new ShellExtensionController(); |
|
28 |
//extensionController.RegisterExtensions(); |
|
29 | 28 |
log4net.Config.XmlConfigurator.Configure(); |
30 |
|
|
29 |
|
|
31 | 30 |
this.DispatcherUnhandledException += OnUnhandledException; |
32 | 31 |
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; |
33 | 32 |
TaskScheduler.UnobservedTaskException += OnUnobservedException; |
34 | 33 |
|
35 |
/* |
|
36 |
var appPatth = Assembly.GetExecutingAssembly().Location; |
|
37 |
Registry.LocalMachine.SetValue(@"Software\Pithos\AppPath",appPatth ); |
|
38 |
*/ |
|
39 | 34 |
InitializeComponent(); |
40 |
//Application.Current.ApplyTheme("BureauBlue"); |
|
41 | 35 |
} |
42 | 36 |
|
43 | 37 |
private void OnUnobservedException(object sender, UnobservedTaskExceptionEventArgs e) |
... | ... | |
104 | 98 |
{ |
105 | 99 |
var logMessage = CreateMessage(messages); |
106 | 100 |
|
107 |
Log.Error(logMessage); |
|
108 |
} |
|
109 |
|
|
110 |
private async void SendMessages(IEnumerable<UserMessage> messages ) |
|
111 |
{ |
|
112 |
var logMessage = CreateMessage(messages); |
|
113 |
|
|
114 |
var mailer = new SmtpClient(); |
|
115 |
await mailer.SendTaskAsync("pithos@grnet.gr", "support@pithos.grnet.gr", "Errors", logMessage); |
|
101 |
_log.Error(logMessage); |
|
116 | 102 |
} |
117 | 103 |
|
118 | 104 |
private static string CreateMessage(IEnumerable<UserMessage> messages) |
Also available in: Unified diff