- Config zuordnung überarbeitet -> keine vorhanden zeigt im editor dann hinweis an: Keine Config gefunden. Server bereits neu gestartet ? - Config Speichern behoben - Ladeanimationen hinzugefügt - Mod löschen funktion eingefügt -> Popup zur bestätigung ob gelöscht werden soll
31 lines
768 B
C#
31 lines
768 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Valheim_Dashboard.Views
|
|
{
|
|
public partial class ConfirmDialog : Window
|
|
{
|
|
private TaskCompletionSource<bool> _tcs = new();
|
|
|
|
public ConfirmDialog()
|
|
{
|
|
InitializeComponent();
|
|
|
|
YesButton.Click += (_, __) => { _tcs.TrySetResult(true); Close(); };
|
|
NoButton.Click += (_, __) => { _tcs.TrySetResult(false); Close(); };
|
|
}
|
|
|
|
public void SetMessage(string message)
|
|
{
|
|
MessageText.Text = message;
|
|
}
|
|
|
|
public Task<bool> ShowDialogAsync(Window parent)
|
|
{
|
|
base.ShowDialog(parent); // Fenster modal öffnen
|
|
return _tcs.Task;
|
|
}
|
|
}
|
|
}
|