2025-05-05 20:43:28 +03:00
|
|
|
using Avalonia.Controls;
|
2025-07-14 10:06:38 +03:00
|
|
|
using Nebula.Launcher.ViewModels;
|
2025-05-05 20:43:28 +03:00
|
|
|
|
|
|
|
|
namespace Nebula.Launcher.MessageBox;
|
|
|
|
|
|
|
|
|
|
public partial class MessageView : UserControl, IMessageContainerProvider
|
|
|
|
|
{
|
2025-07-14 10:06:38 +03:00
|
|
|
private readonly VisualErrorViewModel _context;
|
|
|
|
|
public MessageView()
|
2025-05-05 20:43:28 +03:00
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2025-07-14 10:06:38 +03:00
|
|
|
_context = new VisualErrorViewModel();
|
|
|
|
|
ErrorView.Content = _context;
|
2025-05-05 20:43:28 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ShowMessage(string message, string title)
|
|
|
|
|
{
|
2025-07-14 10:06:38 +03:00
|
|
|
_context.Title = title;
|
|
|
|
|
_context.Description = message;
|
2025-05-05 20:43:28 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public interface IMessageContainerProvider
|
|
|
|
|
{
|
|
|
|
|
public void ShowMessage(string message, string title);
|
|
|
|
|
}
|