manager: migrate base project structure & deps
This commit is contained in:
9
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml
Normal file
9
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="ModpackUpdater.Apps.Manager.Ui.MainWindow"
|
||||
Title="MainWindow">
|
||||
Welcome to Avalonia!
|
||||
</Window>
|
||||
13
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml.cs
Normal file
13
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||
using ModpackUpdater.Manager;
|
||||
using Telerik.WinControls.UI;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui;
|
||||
|
||||
@@ -18,9 +17,7 @@ public partial class UpdatesCollectorUi : RadForm
|
||||
private readonly InstallAction[] actions;
|
||||
|
||||
public ModUpdates? CurrentUpdates { get; private set; }
|
||||
|
||||
public ModUpdateInfo? SelectedUpdate => radListView_Updates.SelectedItem?.Value as ModUpdateInfo;
|
||||
|
||||
public int SelectedVersion => radListView_VersionTags.SelectedIndex;
|
||||
|
||||
public UpdatesCollectorUi(IWorkspace workspace, params InstallAction[] actions)
|
||||
|
||||
10
ModpackUpdater.Apps.Manager/Ui/UpdatesCollectorWindow.axaml
Normal file
10
ModpackUpdater.Apps.Manager/Ui/UpdatesCollectorWindow.axaml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
Width="800" Height="500"
|
||||
x:Class="ModpackUpdater.Apps.Manager.Ui.UpdatesCollectorWindow"
|
||||
Title="UpdatesCollectorWindow">
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,33 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||
using ModpackUpdater.Manager;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui;
|
||||
|
||||
public partial class UpdatesCollectorWindow : Window
|
||||
{
|
||||
public record ModUpdateInfo(KeyValuePair<string, string>[] AvailableVersions, InstallAction Origin)
|
||||
{
|
||||
public int NewVersion { get; set; } = 0;
|
||||
}
|
||||
|
||||
public record ModUpdates(List<ModUpdateInfo> List);
|
||||
|
||||
private readonly IWorkspace workspace;
|
||||
private readonly ModpackFactory factory = new();
|
||||
private readonly InstallAction[] actions;
|
||||
|
||||
public ModUpdates? CurrentUpdates { get; private set; }
|
||||
public ModUpdateInfo? SelectedUpdate => radListView_Updates.SelectedItem?.Value as ModUpdateInfo;
|
||||
public int SelectedVersion => radListView_VersionTags.SelectedIndex;
|
||||
|
||||
public UpdatesCollectorWindow(IWorkspace workspace, params InstallAction[] actions)
|
||||
{
|
||||
this.workspace = workspace;
|
||||
this.actions = actions;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user