mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Migrate encodings from Eto.Forms to Avalonia.
This commit is contained in:
@@ -13,8 +13,9 @@ namespace Aaru.Gui.ViewModels
|
||||
|
||||
public MainWindowViewModel(MainWindow view)
|
||||
{
|
||||
AboutCommand = ReactiveCommand.Create(ExecuteAboutCommand);
|
||||
_view = view;
|
||||
AboutCommand = ReactiveCommand.Create(ExecuteAboutCommand);
|
||||
EncodingsCommand = ReactiveCommand.Create(ExecuteEncodingsCommand);
|
||||
_view = view;
|
||||
}
|
||||
|
||||
public string Greeting => "Welcome to Aaru!";
|
||||
@@ -23,7 +24,8 @@ namespace Aaru.Gui.ViewModels
|
||||
!NativeMenu.GetIsNativeMenuExported((Application.Current.ApplicationLifetime as
|
||||
IClassicDesktopStyleApplicationLifetime)?.MainWindow);
|
||||
|
||||
public ReactiveCommand<Unit, Unit> AboutCommand { get; }
|
||||
public ReactiveCommand<Unit, Unit> AboutCommand { get; }
|
||||
public ReactiveCommand<Unit, Unit> EncodingsCommand { get; }
|
||||
|
||||
internal void ExecuteAboutCommand()
|
||||
{
|
||||
@@ -31,5 +33,12 @@ namespace Aaru.Gui.ViewModels
|
||||
dialog.DataContext = new AboutDialogViewModel(dialog);
|
||||
dialog.ShowDialog(_view);
|
||||
}
|
||||
|
||||
internal void ExecuteEncodingsCommand()
|
||||
{
|
||||
var dialog = new EncodingsDialog();
|
||||
dialog.DataContext = new EncodingsDialogViewModel(dialog);
|
||||
dialog.ShowDialog(_view);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user