프로젝트

일반

사용자정보

개정판 bae83c92

IDbae83c9207aa9d5bbde163254b285b835540c197
상위 b42dd24d
하위 1305c420

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

- convert에서 한글 파일명 오류 수정
- merged pdf 실행하도록 메시지창 출력

Change-Id: I882454f7cf0f521c621f33db8876b568db5a8342

차이점 보기:

KCOM/MainWindow.xaml.cs
233 233
        {
234 234
            base.OnClosing(e);
235 235

  
236
            if(!SaveCheck())
236
            if(!ViewerDataModel.Instance.SaveCheck())
237 237
            {
238 238
                var IsConfirm = SaveConfirm();
239 239

  
......
247 247
                }
248 248
            }
249 249

  
250
            if (App.ViewInfo.CreateFinalPDFPermission)
251
            {
252
                if (!ViewerDataModel.Instance.FinalPDFCheck())
253
                {
254
                    var result = FinalConfirm();
255

  
256
                    if (result == false)
257
                    {
258
                        e.Cancel = true;
259
                    }
260
                    else
261
                    {
262
                        Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveLog(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID, "최종 Merged PDF 안됨.");
263
                    }
264
                }
265
            }
266

  
250 267
            //Update Check 를 통해 update url 을 Get 하고 결과값이 있을 경우에는 SmartUpdater 실행.
251 268
            //KeyValuePair<bool, string> updatecheck = UpdateCheck();
252 269
            //if (updatecheck.Key && !string.IsNullOrEmpty(updatecheck.Value))
......
255 272
            //}
256 273
        }
257 274

  
258
        private bool SaveCheck()
275

  
276
        private bool? SaveConfirm()
259 277
        {
260
            bool result = false;
278
            bool? result = null;
261 279

  
262
            if (ViewerDataModel.Instance.UndoDataList.Count > 0)
280
            EventHandler<WindowClosedEventArgs> Closedhandler = null;
281

  
282
            Closedhandler = (snd, evt) =>
263 283
            {
264
                DateTime undoTime = ViewerDataModel.Instance.UndoDataList.OrderByDescending(order => order.EventTime).FirstOrDefault().EventTime;
265
                DateTime updatetime = DateTime.Now.AddDays(-1);
266
                if (ViewerDataModel.Instance._markupInfoList.Count > 0)
267
                {
268
                    updatetime = ViewerDataModel.Instance._markupInfoList.OrderByDescending(order => order.UpdateTime).FirstOrDefault().UpdateTime;
269
                }
284
                result = evt.DialogResult;
285
            };
270 286

  
271
                if (undoTime > updatetime)
287
            DialogParameters parameters = new DialogParameters()
288
            {
289
                Content = new TextBlock()
272 290
                {
273
                    result = false;
274
                }
275
                else
291
                    MinWidth = 300,
292
                    FontSize = 11,
293
                    Text = "Found unsaved comments. Save now?",
294
                    TextWrapping = System.Windows.TextWrapping.Wrap
295
                },
296

  
297
                Header = "Confirm",
298
                Theme = new VisualStudio2013Theme(),
299
                ContentStyle = Application.Current.Resources["RadConfirmYNCStyle"] as Style,
300
                ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 },
301

  
302
                Owner = Application.Current.MainWindow,
303
                Opened = (s, openedEvent) =>
276 304
                {
277
                    result = true;
278
                }
279
            }
280
            else
281
            {
282
                result = true;
283
            }
305
                    RadWindow confirm = s as RadWindow;
306
                    //Button Cancel = confirm.ChildrenOfType<Button>()[5];
307
                    //FocusManager.SetIsFocusScope(confirm, true);
308
                    //FocusManager.SetFocusedElement(confirm, Cancel);
309
                },
310

  
311
                Closed = Closedhandler
312
            };
313

  
314
            RadWindow.Confirm(parameters);
284 315

  
285 316
            return result;
286 317
        }
287 318

  
288
        private bool? SaveConfirm()
319
        private bool? FinalConfirm()
289 320
        {
290
            bool? result = null;
321
            bool? result = false;
291 322

  
292 323
            EventHandler<WindowClosedEventArgs> Closedhandler = null;
293 324

  
......
302 333
                {
303 334
                    MinWidth = 300,
304 335
                    FontSize = 11,
305
                    Text = "Found unsaved comments. Save now?",
336
                    Text = "Merged PDF가 수행되지 않았습니다. 창을 닫으시겠습니까?",
306 337
                    TextWrapping = System.Windows.TextWrapping.Wrap
307 338
                },
308 339

  
309 340
                Header = "Confirm",
310 341
                Theme = new VisualStudio2013Theme(),
311
                ContentStyle = Application.Current.Resources["RadConfirmYNCStyle"] as Style,
342
                ContentStyle = Application.Current.Resources["RadConfirmYNStyle"] as Style,
312 343
                ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 },
313 344

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

  
323 351
                Closed = Closedhandler
......
328 356
            return result;
329 357
        }
330 358

  
331

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

내보내기 Unified diff

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