개정판 b60e844d
- 불필요한 BCL,RX,RestHttp 제거
Change-Id: I1025cb8ddaf03214d21d03b10ac39b2bc7955581
KCOM/App.xaml.cs | ||
---|---|---|
1 | 1 |
|
2 | 2 |
using KCOM.Common; |
3 |
|
|
3 |
using KCOM.Views; |
|
4 |
using log4net; |
|
4 | 5 |
using System; |
5 |
using System.Collections.Generic; |
|
6 | 6 |
using System.ComponentModel; |
7 |
using System.Configuration; |
|
8 |
using System.Data; |
|
9 |
using System.Diagnostics; |
|
10 | 7 |
using System.IO; |
11 | 8 |
using System.Linq; |
12 |
using System.Net; |
|
13 |
using System.Reflection; |
|
14 |
using System.Runtime.CompilerServices; |
|
15 | 9 |
using System.ServiceModel; |
16 |
using System.Windows; |
|
17 |
using System.Xml; |
|
18 |
using log4net; |
|
19 |
using System.Text; |
|
20 |
using System.Runtime.InteropServices; |
|
21 |
using KCOM.Views; |
|
22 | 10 |
using System.Threading.Tasks; |
11 |
using System.Windows; |
|
23 | 12 |
using System.Windows.Input; |
24 | 13 |
using System.Windows.Resources; |
14 |
using log4net; |
|
25 | 15 |
|
26 |
[assembly: log4net.Config.XmlConfigurator(Watch = false)] |
|
27 | 16 |
namespace KCOM |
28 | 17 |
{ |
29 | 18 |
public class OpenProperties |
... | ... | |
62 | 51 |
/// <summary> |
63 | 52 |
/// logger |
64 | 53 |
/// </summary> |
65 |
public static ILog DBLogger = null; |
|
66 | 54 |
public static ILog FileLogger = null; |
67 | 55 |
|
68 | 56 |
public static StreamResourceInfo DefaultArrowCursor; |
... | ... | |
127 | 115 |
public App() |
128 | 116 |
{ |
129 | 117 |
Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.VisualStudio2013Theme(); |
118 |
|
|
119 |
App.FileLogger = LogManager.GetLogger(typeof(App)); |
|
130 | 120 |
} |
131 | 121 |
|
132 | 122 |
protected override void OnExit(ExitEventArgs e) |
... | ... | |
153 | 143 |
|
154 | 144 |
splashScreen.Show(); |
155 | 145 |
|
156 |
/// create log database and table |
|
157 |
//using (IAbstractDatabase database = new AppSQLiteDatabase() { FilePath = Path.Combine(AppDataFolder, "log4net.db") }) |
|
158 |
//{ |
|
159 |
// string sSql = "CREATE TABLE IF NOT EXISTS Log (LogId INTEGER PRIMARY KEY,Date DATETIME NOT NULL,Level VARCHAR(50) NOT NULL,Logger VARCHAR(255) NOT NULL,Message TEXT DEFAULT NULL,StackTrace TEXT DEFAULT NULL);"; |
|
160 |
// database.ExecuteNonQuery(sSql); |
|
161 |
//} |
|
162 |
|
|
163 |
//log4net.GlobalContext.Properties["LogDBFilePath"] = Path.Combine(AppDataFolder, "log4net.db"); |
|
164 |
//App.DBLogger = LogManager.GetLogger("DBLogger"); |
|
165 |
|
|
146 |
App.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException; |
|
166 | 147 |
/// up to here |
167 |
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
|
168 |
|
|
169 |
log4net.GlobalContext.Properties["LogFilePath"] = Path.Combine(AppDataFolder, "Log", "log4net.log"); |
|
170 |
|
|
171 |
App.FileLogger = LogManager.GetLogger("EventLogger"); |
|
148 |
//AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
|
172 | 149 |
|
173 | 150 |
#region // DNS 체크 |
174 | 151 |
|
... | ... | |
278 | 255 |
} |
279 | 256 |
} |
280 | 257 |
|
258 |
private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) |
|
259 |
{ |
|
260 |
throw new NotImplementedException(); |
|
261 |
} |
|
262 |
|
|
281 | 263 |
private void KeyDownEvent(object sender, KeyEventArgs e) |
282 | 264 |
{ |
283 | 265 |
if (e.Key == Key.Escape || e.Key == Key.Delete) |
내보내기 Unified diff