개정판 1305c420
license 추가
Change-Id: I8e7a4286cba7bd95a3475917a96e7b3560c67cb0
KCOM/App.xaml.cs | ||
---|---|---|
1 | 1 |
|
2 | 2 |
using KCOM.Common; |
3 | 3 |
using KCOM.Views; |
4 |
using License.Validator; |
|
4 | 5 |
using log4net; |
5 | 6 |
using System; |
6 | 7 |
using System.ComponentModel; |
... | ... | |
278 | 279 |
|
279 | 280 |
|
280 | 281 |
await SplashScreenAsnyc(); |
281 |
base.OnStartup(e); |
|
282 |
System.Windows.Input.Keyboard.AddPreviewKeyDownHandler(this.MainWindow, KeyDownEvent); |
|
282 |
|
|
283 |
var license = new License.Validator.Valid(BaseAddress + "/License"); |
|
284 |
|
|
285 |
license.ValidateError += License_ValidateError; |
|
286 |
|
|
287 |
license.GetLicense("public.xml"); |
|
288 |
|
|
289 |
if (license.Activate()) |
|
290 |
{ |
|
291 |
base.OnStartup(e); |
|
292 |
System.Windows.Input.Keyboard.AddPreviewKeyDownHandler(this.MainWindow, KeyDownEvent); |
|
293 |
} |
|
294 |
else |
|
295 |
{ |
|
296 |
} |
|
297 |
|
|
283 | 298 |
//System.Windows.Input.Keyboard.AddKeyDownHandler(this.MainWindow, KeyDownEvent); |
284 | 299 |
} |
285 | 300 |
catch (Exception ex) |
... | ... | |
292 | 307 |
} |
293 | 308 |
} |
294 | 309 |
|
310 |
private void License_ValidateError(object sender, ValidateErrorArgs e) |
|
311 |
{ |
|
312 |
e.Received = true; |
|
313 |
|
|
314 |
MessageBox.Show(e.Message); |
|
315 |
Application.Current.Shutdown(); |
|
316 |
} |
|
317 |
|
|
295 | 318 |
private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) |
296 | 319 |
{ |
297 | 320 |
Logger.sendReqLog("App Error ",e.Exception.ToString() + " " + e.Exception.InnerException?.ToString(), 1); |
내보내기 Unified diff