개정판 cb5c7f06
issue #999: fixed codes for save logic
Change-Id: I4d34d82a4b670a1bcb408047cd539f077c2a18f1
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
254 | 254 |
//if (this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode != IKCOM.MouseHandlingMode.Drawing) |
255 | 255 |
if (this.ParentOfType<MainWindow>().dzMainMenu.currentControl == null && this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count == 0) |
256 | 256 |
{ |
257 |
SaveEvent(null, null); |
|
257 |
SaveEventCallback(null, null);
|
|
258 | 258 |
} |
259 |
|
|
260 | 259 |
} |
261 | 260 |
|
262 | 261 |
private void SaveTime(bool IsRun) |
... | ... | |
305 | 304 |
/// </summary> |
306 | 305 |
/// <param name="sender"></param> |
307 | 306 |
/// <param name="e"></param> |
308 |
public void SaveEvent(object sender, RoutedEventArgs e) |
|
307 |
public void SaveEventCallback(object sender, RoutedEventArgs e)
|
|
309 | 308 |
{ |
310 | 309 |
if (this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy == true) return; |
311 | 310 |
|
... | ... | |
321 | 320 |
|
322 | 321 |
/// <summary> |
323 | 322 |
/// save markup |
324 |
/// </summary> |
|
323 |
/// - convert ink control to polygon control if ink control exists |
|
324 |
/// - unselect and update my markup list |
|
325 | 325 |
/// <param name="sender"></param> |
326 | 326 |
/// <param name="e"></param> |
327 | 327 |
public void _SaveEvent(object sender, RoutedEventArgs e) |
... | ... | |
329 | 329 |
var menu = this.ParentOfType<MainWindow>().dzMainMenu; |
330 | 330 |
try |
331 | 331 |
{ |
332 |
SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
|
|
332 |
menu.ConvertInkControlToPolygon();
|
|
333 | 333 |
|
334 |
SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu); |
|
334 | 335 |
// update mylist and gridview |
335 | 336 |
menu.UpdateMyMarkupList(); |
336 | 337 |
|
337 |
this.ParentOfType<MainWindow>().dzMainMenu.ConvertInkControlToPolygon();
|
|
338 |
if (ViewerDataModel.Instance.UndoDataList.Count == 0) return;
|
|
338 | 339 |
|
339 | 340 |
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true) |
340 | 341 |
{ |
... | ... | |
343 | 344 |
else if (menu.gridViewMarkup.SelectedItems.Count == 0 && menu.gridViewMarkup.Items.Count > 0) |
344 | 345 |
{ |
345 | 346 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert"); |
346 |
return; |
|
347 | 347 |
} |
348 | 348 |
else |
349 | 349 |
{ |
... | ... | |
353 | 353 |
{ |
354 | 354 |
this.ExecuteSaveCommand(menu); |
355 | 355 |
ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now; |
356 |
if (ViewerDataModel.Instance.IsConsolidate) |
|
357 |
{ |
|
358 |
return; |
|
359 |
} |
|
360 |
|
|
361 |
if (sender != null) |
|
356 |
if (!ViewerDataModel.Instance.IsConsolidate && (sender != null)) |
|
362 | 357 |
{ |
363 | 358 |
if (ViewerDataModel.Instance.IsPressCtrl) |
364 | 359 |
{ |
... | ... | |
366 | 361 |
} |
367 | 362 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert"); |
368 | 363 |
} |
369 |
return; |
|
370 | 364 |
} |
371 | 365 |
} |
372 | 366 |
} |
367 |
|
|
373 | 368 |
if (sender != null) |
374 | 369 |
{ |
375 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
376 |
{ |
|
377 |
ViewerDataModel.Instance.IsPressCtrl = false; |
|
378 |
} |
|
370 |
if (ViewerDataModel.Instance.IsPressCtrl) ViewerDataModel.Instance.IsPressCtrl = false; |
|
379 | 371 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert"); |
380 | 372 |
} |
373 |
|
|
374 |
ViewerDataModel.Instance.UndoDataList.Clear(); |
|
381 | 375 |
} |
382 |
catch(Exception ex) |
|
376 |
catch (Exception ex)
|
|
383 | 377 |
{ |
384 | 378 |
|
385 | 379 |
} |
... | ... | |
449 | 443 |
SelectionSet.Instance.UnSelect(menu); |
450 | 444 |
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true) |
451 | 445 |
{ |
452 |
this.SaveEvent(null, null); |
|
446 |
this.SaveEventCallback(null, null);
|
|
453 | 447 |
} |
454 | 448 |
else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID) |
455 | 449 |
{ |
... | ... | |
457 | 451 |
} |
458 | 452 |
else |
459 | 453 |
{ |
460 |
this.SaveEvent(null, null); |
|
454 |
this.SaveEventCallback(null, null);
|
|
461 | 455 |
} |
462 | 456 |
} |
463 | 457 |
|
내보내기 Unified diff