- ServerDashbord Hinzugefügt
-Ftp Seite überarbeitet mit path auswahl und zurück plus weiter button. Fehlt noch logik zum speichern vom path in global variable (: um sie zu laden evtl local zwischen speichern damit nicht jedes mal eine anfrage zum server kommt. -Server Dashboard beispiel mod config hinzugefügt um ftp string zu lesen und schreiben. Plugin unterstützung fehlt hier noch plus plugin muss erstmal geschrieben werden das er es kann :P
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Avalonia.Controls;
|
||||
using Valheim_Dashboard.ViewModels;
|
||||
|
||||
namespace Valheim_Dashboard.Views;
|
||||
|
||||
@@ -7,5 +8,16 @@ public partial class MainWindow : Window
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
var locator = new ViewModelLocator();
|
||||
var mainVm = new MainWindowViewModel(locator);
|
||||
DataContext = mainVm;
|
||||
|
||||
// MainWindow ins ServerDashboardViewModel setzen
|
||||
if (locator.ServerDashboardViewModel is ServerDashboardViewModel dashboardVm)
|
||||
{
|
||||
dashboardVm.SetMainWindow(this); // <-- hier 'this' ist MainWindow
|
||||
}
|
||||
|
||||
this.DataContext = mainVm;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user