순정 MessageBox 를 앱 테마 대화상자로 교체 (53곳 중 49곳)
다크 테마에서 흰 시스템 창이 튀어나오던 알림을 자체 창(MessageDialogView)으로 바꿨다. 앱 셸과 같은 커스텀 타이틀바(36px) + B.Surface 본문 + 성격 아이콘 + 우측 버튼 줄. 폭 440 고정, 내용에 따라 높이 자동, 긴 예외는 스크롤로 흡수한다. 진입점은 DialogService 정적 메서드 4개로 모았다 — Notify / Confirm / ConfirmWithCancel / ShowError. MessageBox 는 Win32 호출이라 아무 데서나 되지만 WPF 창은 아니다. 교체로 새로 생기는 제약 셋을 DialogService 한곳에서 막는다. - 진단 모드에서는 창을 만들지 않고 기각 기본값을 즉시 돌려준다. 스모크는 무인 실행이라 모달이 하나라도 뜨면 타임아웃 없이 영원히 멈춘다 — 실제로 편집 스모크가 지나는 경로에 붙여넣기·개명 가드가 있다. 규약을 스모크 검사 3건으로 고정했다. - UI 스레드가 아니면 Dispatcher 로 넘긴다. - 소유 창은 '살아 있는 것'만 건다. 아직 안 보였거나 이미 닫힌 창을 Owner 로 주면 예외이고, 진단 렌더러가 도는 동안 MainWindow 가 닫힌 창을 가리킬 수 있다. App.xaml.cs 4곳은 다르게 처리했다. - 기동 실패(:49)·예외 폭주(:82)·복구 안내(:89) 3곳은 순정 유지. 창이 없는 시점이라 자체 창을 띄우면 종료코드가 유실되고, 이미 예외가 터진 자리에서 WPF 창을 새로 만들면 같은 핸들러로 재진입한다. 이유를 각 자리에 주석으로 남겼다. 덤으로 :89 는 e.Handled 를 알림보다 먼저 세우도록 순서를 바로잡았다 — 알림이 던지면 '복구 가능한 예외'가 하드 크래시로 바뀐다. - 알 수 없는 진단 옵션(:179)은 알림을 없앴다. 옵션 오타 하나로 무인 실행이 멈추던 자리다. 함께 고친 것 — Primary 버튼 스타일. 공유 버튼 템플릿의 호버 트리거가 TargetName 으로 채움을 회색으로 덮는데(TargetName 트리거는 TemplateBinding 을 이긴다) 글자는 흰색 그대로라, 라이트에서 마우스를 올리면 #F3F3F3 위 흰 글자 1.08:1 로 사라진다. 지금까지 Primary 사용처가 0건이라 드러난 적이 없었고 이 창이 첫 사용이다. 전용 템플릿 + 채움 호버·누름 토큰 2종 신설. 신설 토큰: B.Warning / B.Danger(라이트는 다크값을 못 쓴다 — 앰버 #E0A33A 는 흰 면 위 2.22:1 로 아이콘 기준 3:1 도 미달), B.AccentFillHover / B.AccentFillPressed. 전부 양 테마에 동시 추가. Lucide 아이콘 4종(info·circle-alert·triangle-alert·circle-help) 추가. 바꾸지 않은 것: 예외 원문. 18곳을 ShowError 로 수렴시키면 화면에서 ex.Message 가 오류코드+로그로 대체되는 동작 변경이 된다 — 요청은 시각 변경이라 문구·정보량을 그대로 뒀다. 남는 시스템 대화상자: 인쇄(PrintDialog)와 파일 열기/저장 — OS 셸 대화상자라 대상이 아니다. 진단 렌더러에 알림 5종(오류·경고·확인·저장확인·정보)을 등록해 라이트/다크 10장이 자동으로 남는다. 회귀: 테스트 124/124, 편집 스모크 실패 0, DB 왕복 1,271건 diff 0/예외 0, 종이 렌더 P062 바이트 동일. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
bd0d055e0d
commit
604f8f7d1b
@@ -448,8 +448,8 @@ public sealed class DesignerViewModel : ViewModelBase
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (MessageBox.Show($"페이지 {target.Index + 1}을(를) 삭제할까요? (컨트롤 {target.Controls.Count}개 포함)",
|
||||
"페이지 삭제", MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
|
||||
if (!DialogService.Confirm("페이지 삭제", $"페이지 {target.Index + 1}을(를) 삭제할까요?",
|
||||
$"컨트롤 {target.Controls.Count}개가 함께 삭제됩니다.", yes: "삭제", no: "취소", destructive: true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -465,8 +465,8 @@ public sealed class DesignerViewModel : ViewModelBase
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (MessageBox.Show($"페이지 {SelectedPage.Index + 1}을(를) 삭제할까요? (컨트롤 {SelectedPage.Controls.Count}개 포함)",
|
||||
"페이지 삭제", MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
|
||||
if (!DialogService.Confirm("페이지 삭제", $"페이지 {SelectedPage.Index + 1}을(를) 삭제할까요?",
|
||||
$"컨트롤 {SelectedPage.Controls.Count}개가 함께 삭제됩니다.", yes: "삭제", no: "취소", destructive: true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1117,12 +1117,11 @@ public sealed class DesignerViewModel : ViewModelBase
|
||||
var (pastable, blocked) = FilterPastable(clipboard);
|
||||
if (blocked > 0)
|
||||
{
|
||||
System.Windows.MessageBox.Show(
|
||||
$"표(Spread) {blocked}개는 붙여넣지 않았습니다.\n\n" +
|
||||
Services.DialogService.Notify(Services.DialogKind.Warning, "붙여넣기",
|
||||
$"표(Spread) {blocked}개는 붙여넣지 않았습니다.",
|
||||
"표의 격자 디자인은 서식코드+컨트롤이름으로 별도 테이블(E_SpdMst)에서 조회됩니다.\n" +
|
||||
"복제본에는 격자가 없어 EMR 에서 해당 서식이 열리지 않습니다.\n" +
|
||||
"표 추가는 레거시 서식생성기를 사용하세요.",
|
||||
"붙여넣기", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Warning);
|
||||
"표 추가는 레거시 서식생성기를 사용하세요.");
|
||||
}
|
||||
if (pastable.Count == 0)
|
||||
{
|
||||
|
||||
@@ -341,7 +341,7 @@ public sealed class InspectorViewModel : ViewModelBase
|
||||
{
|
||||
if (target.Model.Props.Contains(key))
|
||||
{
|
||||
System.Windows.MessageBox.Show($"이미 존재하는 속성입니다: {key}", "속성 추가");
|
||||
Services.DialogService.Notify(Services.DialogKind.Warning, "속성 추가", $"이미 존재하는 속성입니다: {key}");
|
||||
return;
|
||||
}
|
||||
designer.Undo.Snapshot();
|
||||
@@ -609,11 +609,10 @@ public sealed class InspectorViewModel : ViewModelBase
|
||||
// 최상위로 전파되어 그 서식이 통째로 열리지 않는다. SheetMe 는 E_SpdMst 행을 만들 수 없으므로 금지한다.
|
||||
if (DesignerViewModel.IsSpread(vm.Model))
|
||||
{
|
||||
System.Windows.MessageBox.Show(
|
||||
"표(Spread)는 이름을 바꿀 수 없습니다.\n\n" +
|
||||
Services.DialogService.Notify(Services.DialogKind.Warning, "이름 변경",
|
||||
"표(Spread)는 이름을 바꿀 수 없습니다.",
|
||||
$"격자 디자인이 서식코드+이름('{vm.Id}')으로 별도 테이블(E_SpdMst)에 저장되어 있어,\n" +
|
||||
"이름을 바꾸면 EMR 에서 이 서식이 열리지 않습니다.",
|
||||
"이름 변경", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Warning);
|
||||
"이름을 바꾸면 EMR 에서 이 서식이 열리지 않습니다.");
|
||||
Rebuild();
|
||||
return;
|
||||
}
|
||||
@@ -622,7 +621,7 @@ public sealed class InspectorViewModel : ViewModelBase
|
||||
used.Remove(vm.Id);
|
||||
if (used.Contains(trimmed))
|
||||
{
|
||||
System.Windows.MessageBox.Show($"이미 사용 중인 이름입니다: {trimmed}", "이름 변경");
|
||||
Services.DialogService.Notify(Services.DialogKind.Warning, "이름 변경", $"이미 사용 중인 이름입니다: {trimmed}");
|
||||
// 거부했으므로 편집 상자에 남은 잘못된 이름을 원래 값으로 되돌린다
|
||||
Rebuild();
|
||||
return;
|
||||
|
||||
@@ -308,8 +308,9 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
return;
|
||||
}
|
||||
if (designer.Undo.IsDirty
|
||||
&& MessageBox.Show($"'{designer.DisplayName}' 문서에 저장하지 않은 변경이 있습니다.\n닫을까요?",
|
||||
"문서 닫기", MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
|
||||
&& !DialogService.Confirm("문서 닫기",
|
||||
$"'{designer.DisplayName}' 문서에 저장하지 않은 변경이 있습니다.",
|
||||
"닫을까요?", yes: "닫기", no: "취소", destructive: true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -341,24 +342,23 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
// 과거 버전 열람 탭은 저장하면 활성 디자인을 과거 내용으로 덮게 되므로 저장 선택지를 주지 않는다
|
||||
if (designer.HistorySdgKey is not null)
|
||||
{
|
||||
var discard = MessageBox.Show(
|
||||
$"'{designer.DisplayName}' 은(는) 과거 버전 열람 탭이라 저장할 수 없습니다.\n변경을 버리고 종료할까요?",
|
||||
"종료", MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
||||
if (discard != MessageBoxResult.Yes)
|
||||
if (!DialogService.Confirm("종료",
|
||||
$"'{designer.DisplayName}' 은(는) 과거 버전 열람 탭이라 저장할 수 없습니다.",
|
||||
"변경을 버리고 종료할까요?", yes: "버리고 종료", no: "취소", destructive: true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
var answer = MessageBox.Show(
|
||||
$"'{designer.DisplayName}' 문서에 저장하지 않은 변경이 있습니다.\n저장할까요?",
|
||||
"종료", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
||||
if (answer == MessageBoxResult.Cancel)
|
||||
var answer = DialogService.ConfirmWithCancel("종료",
|
||||
$"'{designer.DisplayName}' 문서에 저장하지 않은 변경이 있습니다.",
|
||||
"저장할까요?", yes: "저장", no: "저장 안 함");
|
||||
if (answer is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (answer == MessageBoxResult.No)
|
||||
if (answer == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -390,20 +390,19 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
case SheetDesignPermission.Allowed:
|
||||
return true;
|
||||
case SheetDesignPermission.NotRegistered:
|
||||
MessageBox.Show($"기록지 정보에 등록되지 않은 서식 코드입니다. ({shtCod})", "확인",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, "확인",
|
||||
$"기록지 정보에 등록되지 않은 서식 코드입니다. ({shtCod})");
|
||||
return false;
|
||||
default:
|
||||
Services.AppLog.Audit($"[권한거부] {shtCod} — ShtUsrDesYon 차단 (by {dataBusiness.User.Display})");
|
||||
MessageBox.Show("서식생성기를 사용하지 않는 서식지입니다.\n기록지 정보를 확인해주세요.", "확인",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, "확인",
|
||||
"서식생성기를 사용하지 않는 서식지입니다.", "기록지 정보를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"서식 권한을 확인하지 못했습니다.\n\n{ex.Message}", "확인",
|
||||
MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
DialogService.Notify(DialogKind.Warning, "확인", "서식 권한을 확인하지 못했습니다.", ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -497,8 +496,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"저장 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "저장 중 오류가 발생했습니다.", ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -536,8 +534,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"DB에서 서식을 여는 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "DB에서 서식을 여는 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -564,8 +561,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
var document = dataBusiness.OpenFromDb(shtCod);
|
||||
if (document is null)
|
||||
{
|
||||
MessageBox.Show("활성 디자인을 찾지 못했습니다.", "DB 열기",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, "DB 열기", "활성 디자인을 찾지 못했습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -586,16 +582,18 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
if (!dataBusiness.CanSaveToDb)
|
||||
{
|
||||
MessageBox.Show("DB 저장이 비활성화되어 있습니다.\nappsettings.json 의 FormStore:SaveMode 를 'Db' 로 설정한 뒤 사용하세요.\n(운영 레거시 테이블에 기록되므로 명시적 활성화가 필요합니다)",
|
||||
"DB 저장", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
DialogService.Notify(DialogKind.Warning, "DB 저장",
|
||||
"DB 저장이 비활성화되어 있습니다.",
|
||||
"appsettings.json 의 FormStore:SaveMode 를 'Db' 로 설정한 뒤 사용하세요.\n" +
|
||||
"(운영 레거시 테이블에 기록되므로 명시적 활성화가 필요합니다)");
|
||||
return false;
|
||||
}
|
||||
if (!dataBusiness.CanWriteDb)
|
||||
{
|
||||
MessageBox.Show("HIS 사용자가 확인되지 않아 DB에 저장할 수 없습니다.\n" +
|
||||
DialogService.Notify(DialogKind.Warning, "DB 저장",
|
||||
"HIS 사용자가 확인되지 않아 DB에 저장할 수 없습니다.",
|
||||
"기록지정보 화면에서 서식생성기를 실행하거나, 사용자 코드를 인자로 전달해 주세요.\n" +
|
||||
"(저장 이력에 남길 수정자를 특정할 수 없습니다)",
|
||||
"DB 저장", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
"(저장 이력에 남길 수정자를 특정할 수 없습니다)");
|
||||
return false;
|
||||
}
|
||||
CommitPendingEdits();
|
||||
@@ -627,12 +625,12 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
document.Title = register.SheetName;
|
||||
}
|
||||
|
||||
var confirm = MessageBox.Show(
|
||||
$"서식 [{document.FormId}] {document.Title} 을(를) DB(E_SdgMst/E_SctMst)에 저장할까요?\n\n" +
|
||||
var confirm = DialogService.Confirm("DB 저장 확인",
|
||||
$"서식 [{document.FormId}] {document.Title} 을(를) DB(E_SdgMst/E_SctMst)에 저장할까요?",
|
||||
"기존 활성 디자인은 이력(SdgDelYon='Y')으로 보존되고 새 버전이 생성됩니다.\n" +
|
||||
"(제자리 갱신 서식(ShtCneYon='Y')은 기존 버전이 갱신됩니다)",
|
||||
"DB 저장 확인", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||
if (confirm != MessageBoxResult.Yes)
|
||||
yes: "저장", no: "취소");
|
||||
if (!confirm)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -643,14 +641,14 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
CurrentDesigner.Undo.MarkSaved();
|
||||
CurrentDesigner.NotifyDisplayNameChanged();
|
||||
StatusText = $"DB 저장 완료: {document.FormId} → SdgKey {sdgKey}";
|
||||
MessageBox.Show($"저장되었습니다. (SdgKey {sdgKey})\n레거시 뷰어/디자이너에서 열어 확인하세요.", "DB 저장",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Info, "DB 저장",
|
||||
$"저장되었습니다. (SdgKey {sdgKey})", "레거시 뷰어/디자이너에서 열어 확인하세요.");
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"DB 저장 중 오류가 발생했습니다. (트랜잭션 롤백됨)\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류",
|
||||
"DB 저장 중 오류가 발생했습니다. (트랜잭션 롤백됨)", ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -675,8 +673,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"JSON 내보내기 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "JSON 내보내기 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,8 +696,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"JSON 가져오기 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "JSON 가져오기 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -743,8 +739,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"서식 목록 조회 중 오류가 발생했습니다.\n\n{ex.Message}", "서식 목록",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "서식 목록", "서식 목록 조회 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -765,16 +760,14 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
if (!sheet.HasDesign)
|
||||
{
|
||||
MessageBox.Show("선택한 서식에는 저장된 디자인이 없습니다.", "서식 열기",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, "서식 열기", "선택한 서식에는 저장된 디자인이 없습니다.");
|
||||
return;
|
||||
}
|
||||
OpenDbSheet(sheet.ShtCod);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"서식을 여는 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "서식을 여는 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -806,8 +799,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"인쇄 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "인쇄 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,8 +826,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
var document = CurrentDesigner.Document;
|
||||
if (document.FormId.Length == 0 || document.FormId == "NewSheet")
|
||||
{
|
||||
MessageBox.Show("수정이력은 DB에 저장된 서식에서 사용할 수 있습니다.", "서식 수정이력",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, "서식 수정이력", "수정이력은 DB에 저장된 서식에서 사용할 수 있습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -849,8 +840,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
var versions = dataBusiness.ListVersions(document.FormId);
|
||||
if (versions.Count == 0)
|
||||
{
|
||||
MessageBox.Show("저장된 버전이 없습니다.", "서식 수정이력",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Info, "서식 수정이력", "저장된 버전이 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -875,8 +865,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
var versionDocument = dataBusiness.OpenFromDbVersion(document.FormId, sdgKey);
|
||||
if (versionDocument is null)
|
||||
{
|
||||
MessageBox.Show("해당 버전을 불러오지 못했습니다.", "서식 수정이력",
|
||||
MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
DialogService.Notify(DialogKind.Warning, "서식 수정이력", "해당 버전을 불러오지 못했습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -889,8 +878,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"수정이력 조회 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "수정이력 조회 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -909,8 +897,8 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
var document = CurrentDesigner.Document;
|
||||
if (document.FormId.Length == 0 || document.FormId == "NewSheet")
|
||||
{
|
||||
MessageBox.Show("상용구는 서식 코드 단위로 저장됩니다.\n먼저 DB에 저장(서식 등록)한 뒤 사용하세요.",
|
||||
"상용구 관리", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, "상용구 관리",
|
||||
"상용구는 서식 코드 단위로 저장됩니다.", "먼저 DB에 저장(서식 등록)한 뒤 사용하세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -922,8 +910,7 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"상용구 관리 중 오류가 발생했습니다.\n\n{ex.Message}", "오류",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
DialogService.Notify(DialogKind.Error, "오류", "상용구 관리 중 오류가 발생했습니다.", ex.Message);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -935,8 +922,8 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
{
|
||||
return true;
|
||||
}
|
||||
MessageBox.Show("DB 접속 문자열(ConnectionStrings:His)이 설정되지 않았습니다.\nappsettings.json 을 확인하세요.",
|
||||
"DB 연결", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, "DB 연결",
|
||||
"DB 접속 문자열(ConnectionStrings:His)이 설정되지 않았습니다.", "appsettings.json 을 확인하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -948,8 +935,8 @@ internal sealed class MainViewModel : ViewModelBase
|
||||
}
|
||||
var summary = string.Join("\n", warnings.Take(20));
|
||||
var more = warnings.Count > 20 ? $"\n... 외 {warnings.Count - 20}건" : string.Empty;
|
||||
MessageBox.Show($"읽기 경고 {warnings.Count}건 (미지원 컨트롤은 자리표시로 보존됩니다):\n\n{summary}{more}",
|
||||
caption, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
DialogService.Notify(DialogKind.Warning, caption,
|
||||
$"읽기 경고 {warnings.Count}건 (미지원 컨트롤은 자리표시로 보존됩니다)", summary + more);
|
||||
}
|
||||
|
||||
private static int CountControls(List<Core.Models.ControlElement> controls)
|
||||
|
||||
Reference in New Issue
Block a user