- Layout Verschiebung behoben bei Configeditor
- 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
This commit is contained in:
30
Valheim Dashboard/Views/ConfirmDialog.axaml.cs
Normal file
30
Valheim Dashboard/Views/ConfirmDialog.axaml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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 <20>ffnen
|
||||
return _tcs.Task;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user