更换为wpf

This commit is contained in:
ww-rm
2025-05-27 15:55:10 +08:00
parent d0f629d9ba
commit 17257a0ffe
316 changed files with 19206 additions and 76537 deletions

View File

@@ -0,0 +1,37 @@
using SpineViewer.Resources;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace SpineViewer.Services
{
public static class MessagePopupService
{
public static void Info(string text, string? title = null)
{
title ??= AppResource.Str_InfoPopup;
MessageBox.Show(text, title, MessageBoxButton.OK, MessageBoxImage.Information);
}
public static void Warn(string text, string? title = null)
{
title ??= AppResource.Str_WarnPopup;
MessageBox.Show(text, title, MessageBoxButton.OK, MessageBoxImage.Warning);
}
public static void Error(string text, string? title = null)
{
title ??= AppResource.Str_ErrorPopup;
MessageBox.Show(text, title, MessageBoxButton.OK, MessageBoxImage.Error);
}
public static bool Quest(string text, string? title = null)
{
title ??= AppResource.Str_QuestPopup;
return MessageBox.Show(text, title, MessageBoxButton.OKCancel, MessageBoxImage.Question) == MessageBoxResult.OK;
}
}
}