프로젝트

일반

사용자정보

개정판 1305c420

ID1305c42004d7598340bf61fb7995c730bc5d2f50
상위 bae83c92
하위 cf1cc862

김태성이(가) 3년 이상 전에 추가함

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

클립보드 이미지 추가 (최대 크기: 500 MB)