-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
23 lines
620 B
C#
23 lines
620 B
C#
using Avalonia.Controls;
|
|
using Valheim_Dashboard.ViewModels;
|
|
|
|
namespace Valheim_Dashboard.Views;
|
|
|
|
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;
|
|
}
|
|
} |