프로젝트

일반

사용자정보

개정판 c362d2a5

IDc362d2a5883b88b0724f1aef49b7c3061801b381
상위 e77fc685
하위 68e3cd94

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

종료시 저장여부 Confirm 수정 Yes/No/Cancel
MainWindow 위치 수정

Change-Id: Ia539e64f2b134bdc9cbf66d6746cef9ecd5416f0

차이점 보기:

KCOM/MainWindow.xaml.cs
46 46

  
47 47
        public MainWindow()
48 48
        {
49

  
49 50
            App.splashString(ISplashMessage.MAINWINDOW);
51

  
50 52
            this.Loaded += MainWindow_Loaded;
51 53
            this.Unloaded += MainWindow_Unloaded;
52 54
            //this.PreviewKeyDown += new KeyEventHandler(KeyEventDownAction);
......
69 71

  
70 72
        public void DialogMessage_Alert(string content, string header)
71 73
        {
74
            App.splashScreen.Close();
75

  
72 76
            Telerik.Windows.Controls.DialogParameters parameters = new Telerik.Windows.Controls.DialogParameters()
73 77
            {
74 78
                Owner = Application.Current.MainWindow,
......
95 99

  
96 100
            var point = GetScreenCenter();
97 101

  
98
            this.Left = point.X;
99
            this.Top = point.Y;
102
            //this.Left = point.X;
103
            //this.Top = point.Y;
100 104

  
101 105
            ViewerDataModel.Instance.SystemMain = this;
102 106

  
......
231 235

  
232 236
            if(!SaveCheck())
233 237
            {
234
                if(SaveConfirm())
235
                {
236
                    dzTopMenu.SaveEventCallback(null, null);
237
                }
238
                else
238
                var IsConfirm = SaveConfirm();
239

  
240
                if (IsConfirm == null)
239 241
                {
240 242
                    e.Cancel = true;
241 243
                }
244
                else if(IsConfirm == true)
245
                { 
246
                    dzTopMenu.SaveEventCallback(null, null);
247
                }
242 248
            }
243 249

  
244 250
            //Update Check 를 통해 update url 을 Get 하고 결과값이 있을 경우에는 SmartUpdater 실행.
......
279 285
            return result;
280 286
        }
281 287

  
282
        private bool SaveConfirm()
288
        private bool? SaveConfirm()
283 289
        {
284
            bool result = false;
290
            bool? result = null;
285 291

  
286 292
            EventHandler<WindowClosedEventArgs> Closedhandler = null;
287 293

  
288 294
            Closedhandler = (snd, evt) =>
289 295
            {
290
                result = evt.DialogResult.GetValueOrDefault();
296
                result = evt.DialogResult;
291 297
            };
292 298

  
293

  
294 299
            DialogParameters parameters = new DialogParameters()
295 300
            {
296
                Owner = Application.Current.MainWindow,
297 301
                Content = new TextBlock()
298 302
                {
299
                    MinWidth = 400,
303
                    MinWidth = 300,
300 304
                    FontSize = 11,
301 305
                    Text = "Found unsaved comments. Save now?",
302 306
                    TextWrapping = System.Windows.TextWrapping.Wrap
303 307
                },
308

  
304 309
                Header = "Confirm",
305 310
                Theme = new VisualStudio2013Theme(),
311
                ContentStyle = Application.Current.Resources["RadConfirmYNCStyle"] as Style,
306 312
                ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 },
313

  
314
                Owner = Application.Current.MainWindow,
315
                Opened = (s, openedEvent) =>
316
                {
317
                    RadWindow confirm = s as RadWindow;
318
                    //Button Cancel = confirm.ChildrenOfType<Button>()[5];
319
                    //FocusManager.SetIsFocusScope(confirm, true);
320
                    //FocusManager.SetFocusedElement(confirm, Cancel);
321
                },
322

  
307 323
                Closed = Closedhandler
308 324
            };
309 325

  
......
312 328
            return result;
313 329
        }
314 330

  
331

  
315 332
        private void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
316 333
        {
317 334
            Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate

내보내기 Unified diff

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