using Microsoft.UI.Dispatching;
namespace XFEExtension.NetCore.WinUIHelper.Interface.Services;
///
/// 全局页面加载显示服务
///
public interface ILoadingService : IGlobalService
{
IAutoNavigationService? NavigationService { get; }
///
/// 初始化加载显示服务
///
/// 加载用网格
/// 全局加载网格
/// 全局加载文本
/// Dispatcher
/// 导航服务
void Initialize(Grid loadingGrid, Grid globalLoadingGrid, TextBlock globalLoadingTextBox, DispatcherQueue dispatcherQueue, IAutoNavigationService navigationService);
///
/// 开始加载
///
/// 需要显示的页面
/// 加载提示文本呢
/// 该页面上是否已经有了加载项
bool StartLoading(string showText = "Loading...") where T : Page;
///
/// 开始全局加载
///
/// 加载提示文本
void StartLoading(string showText = "Loading...");
///
/// 停止全局加载服务
///
void StopLoading();
///
/// 停止加载
///
/// 需要显示的页面
/// 是否成功停止
bool StopLoading() where T : Page;
}