프로젝트

일반

사용자정보

개정판 f65e6c02

IDf65e6c0217de89d4653173b2f16417acc26d5e0a
상위 a1142a6b
하위 b4b23404

김태성이(가) 약 5년 전에 추가함

debug_SNI 추가

Change-Id: I46d431ca15362882a9ab7e8dd7600371f47471de

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
289 289
        /// </summary>
290 290
        /// <param name="sender"></param>
291 291
        /// <param name="e"></param>
292
        public void SaveEventCallback(object sender, RoutedEventArgs e)
292
        public async void SaveEventCallback(object sender, RoutedEventArgs e)
293 293
        {
294
            if (this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy == true) return;
294
            var mianMenu = this.ParentOfType<MainWindow>().dzMainMenu;
295 295

  
296
            this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy = true;
297
            System.Threading.Tasks.Task SaveTask = System.Threading.Tasks.Task.Factory.StartNew(() =>
296
            if (mianMenu.busyIndicator.IsBusy == true)
298 297
            {
299
                Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action<object, RoutedEventArgs>(_SaveEvent), sender, e);
300
            }).ContinueWith(task =>
298
                return;
299
            }
300

  
301
            var result = await Dispatcher.InvokeAsync<bool>(()=>
301 302
            {
302
                Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate () { this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy = false; }));
303
                this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy = true;
304

  
305
                _SaveEvent(sender, e);
306

  
307
                mianMenu.busyIndicator.IsBusy = false;
308
                return true;
303 309
            });
310

  
311
            //System.Threading.Tasks.Task SaveTask = System.Threading.Tasks.Task.Factory.StartNew(() =>
312
            //{
313
            //    Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action<object, RoutedEventArgs>(_SaveEvent), sender, e);
314
            //}).ContinueWith(task =>
315
            //{
316
            //    Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate () { this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy = false; }));
317
            //});
304 318
        }
305 319

  
306 320
        /// <summary>
......
311 325
        /// <param name="e"></param>
312 326
        public void _SaveEvent(object sender, RoutedEventArgs e)
313 327
        {
314
            var menu = this.ParentOfType<MainWindow>().dzMainMenu;
328
            var mainMenu = this.ParentOfType<MainWindow>().dzMainMenu;
315 329
            try
316 330
            {
317
                menu.ConvertInkControlToPolygon();
331
                mainMenu.ConvertInkControlToPolygon();
318 332

  
319 333
                SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
320 334
                // update mylist and gridview
321
                menu.UpdateMyMarkupList();
335
                mainMenu.UpdateMyMarkupList();
322 336

  
323
                if (menu.gridViewMarkup.SelectedItems.Count == 0 && menu.gridViewMarkup.Items.Count > 0)
337
                if (mainMenu.gridViewMarkup.SelectedItems.Count == 0 && mainMenu.gridViewMarkup.Items.Count > 0)
324 338
                {
325 339
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert");
326 340
                }
327 341
                else
328 342
                {                    
329
                    foreach (var item in menu.gridViewMarkup.SelectedItems)
343
                    foreach (var item in mainMenu.gridViewMarkup.SelectedItems)
330 344
                    {
331 345
                        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
332 346
                        {
333
                            this.ExecuteSaveCommand(menu);
347
                            this.ExecuteSaveCommand(mainMenu);
334 348
                            ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now;
335 349
                            if (!ViewerDataModel.Instance.IsConsolidate && (sender != null))
336 350
                            {
......
340 354
                    }
341 355
                }
342 356

  
357
                mainMenu.SetCommentPages();
358

  
343 359
                ViewerDataModel.Instance.UndoDataList.Clear();
344 360
            }
345 361
            catch (Exception ex)
......
2295 2311
                        (Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
2296 2312
                        break;
2297 2313
                    #endregion
2298
                    //#region Cad
2299
                    //case "Inside":
2300
                    //    //instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing;
2301
                    //    //instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = false;
2302
                    //    Common.ViewerDataModel.Instance.SelectedControl = "InsideWhite";
2303
                    //    instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.InsideWhite;
2304
                    //    break;
2305
                    //case "Overlap":
2306
                    //    //instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing;
2307
                    //    //instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = false;
2308
                    //    Common.ViewerDataModel.Instance.SelectedControl = "OverlapWhite";
2309
                    //    instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.OverlapWhite;
2310
                    //    break;
2311
                    //case "Clip":
2312
                    //    //instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing;
2313
                    //    //instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = false;
2314
                    //    Common.ViewerDataModel.Instance.SelectedControl = "ClipWhite";
2315
                    //    instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ClipWhite;
2316
                    //    break;
2317
                    //case "CadExport":
2318
                    //    if (isClosed)
2319
                    //    {
2320
                    //        //토글 및 마우스 상태 초기화
2321
                    //        var toggleList = this.Parent.ChildrenOfType<RadRibbonToggleButton>();
2322
                    //        foreach (var togle in toggleList)
2323
                    //        {
2324
                    //            togle.IsChecked = false;
2325
                    //        }
2326
                    //        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2327

  
2328
                    //        isClosed = false;
2329
                    //        //Control 파일 먼저 생성
2330
                    //        CollapsedButton_Click();
2331
                    //        CadViewer check = new CadViewer();
2332
                    //        check.WindowStartupLocation = WindowStartupLocation.CenterScreen;
2333
                    //        check.Title = "Export Viewer";
2334
                    //        //check.Topmost = true;
2335
                    //        check.Show();
2336
                    //        check.Closed += Check_Closed;
2337
                    //        instanceToggle.IsChecked = false;
2338
                    //    }
2339
                    //    break;
2340
                    //case "CadViewer":
2341
                    //    if (isClosed)
2342
                    //    {
2343
                    //        //토글 및 마우스 상태 초기화
2344
                    //        var toggleList = this.Parent.ChildrenOfType<RadRibbonToggleButton>();
2345
                    //        foreach (var togle in toggleList)
2346
                    //        {
2347
                    //            togle.IsChecked = false;
2348
                    //        }
2349
                    //        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2350

  
2351
                    //        isClosed = false;
2352
                    //        CadResultViewer check = new CadResultViewer();
2353
                    //        check.WindowStartupLocation = WindowStartupLocation.CenterScreen;
2354
                    //        check.Title = "Viewer";
2355
                    //        check.Show();
2356

  
2357
                    //        check.Closed += Check_Closed;
2358

  
2359
                    //    }
2360
                    //    break;
2361
                    //#endregion
2314
                    #region Cad
2315
                    case "Inside":
2316
                        //instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing;
2317
                        //instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = false;
2318
                        Common.ViewerDataModel.Instance.SelectedControl = "InsideWhite";
2319
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.InsideWhite;
2320
                        break;
2321
                    case "Overlap":
2322
                        //instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing;
2323
                        //instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = false;
2324
                        Common.ViewerDataModel.Instance.SelectedControl = "OverlapWhite";
2325
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.OverlapWhite;
2326
                        break;
2327
                    case "Clip":
2328
                        //instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing;
2329
                        //instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = false;
2330
                        Common.ViewerDataModel.Instance.SelectedControl = "ClipWhite";
2331
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ClipWhite;
2332
                        break;
2333
                    case "CadExport":
2334
                        //if (isClosed)
2335
                        //{
2336
                        //    //토글 및 마우스 상태 초기화
2337
                        //    var toggleList = this.Parent.ChildrenOfType<RadRibbonToggleButton>();
2338
                        //    foreach (var togle in toggleList)
2339
                        //    {
2340
                        //        togle.IsChecked = false;
2341
                        //    }
2342
                        //    this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2343

  
2344
                        //    isClosed = false;
2345
                        //    //Control 파일 먼저 생성
2346
                        //    CollapsedButton_Click();
2347
                        //    CadViewer check = new CadViewer();
2348
                        //    check.WindowStartupLocation = WindowStartupLocation.CenterScreen;
2349
                        //    check.Title = "Export Viewer";
2350
                        //    //check.Topmost = true;
2351
                        //    check.Show();
2352
                        //    check.Closed += Check_Closed;
2353
                        //    instanceToggle.IsChecked = false;
2354
                        //}
2355
                        //break;
2356
                    case "CadViewer":
2357
                        //if (isClosed)
2358
                        //{
2359
                        //    //토글 및 마우스 상태 초기화
2360
                        //    var toggleList = this.Parent.ChildrenOfType<RadRibbonToggleButton>();
2361
                        //    foreach (var togle in toggleList)
2362
                        //    {
2363
                        //        togle.IsChecked = false;
2364
                        //    }
2365
                        //    this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2366

  
2367
                        //    isClosed = false;
2368
                        //    CadResultViewer check = new CadResultViewer();
2369
                        //    check.WindowStartupLocation = WindowStartupLocation.CenterScreen;
2370
                        //    check.Title = "Viewer";
2371
                        //    check.Show();
2372

  
2373
                        //    check.Closed += Check_Closed;
2374

  
2375
                        //}
2376
                        break;
2377
                    #endregion
2362 2378
                    default:
2363 2379
                        break;
2364 2380
                }

내보내기 Unified diff

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