sa/Stars Assistant/Views/MainWindow.axaml.cs

31 lines
844 B
C#
Raw Permalink Normal View History

2024-07-23 07:40:10 +00:00
using Avalonia.Controls;
2024-09-13 19:09:33 +00:00
using Avalonia.ReactiveUI;
2024-07-23 07:40:10 +00:00
using System.Diagnostics;
using System;
2024-09-13 19:09:33 +00:00
using StarsAssistant.ViewModels;
using Avalonia.Markup.Xaml;
2024-09-14 16:47:59 +00:00
using ReactiveUI;
using System.Reactive.Disposables;
2024-07-23 07:40:10 +00:00
2024-08-15 19:46:43 +00:00
namespace StarsAssistant.Views;
2024-07-23 07:40:10 +00:00
2024-09-13 19:09:33 +00:00
public partial class MainWindow : ReactiveWindow<MainWindowViewModel>
2024-07-23 07:40:10 +00:00
{
public MainWindow()
{
2024-09-23 20:40:18 +00:00
InitializeComponent();
this.WhenActivated(disposables =>
{
this.OneWayBind(ViewModel, vm => vm.DbPath, v => v.DbPath.Text)
.DisposeWith(disposables);
2024-09-23 20:40:18 +00:00
this.BindCommand(ViewModel, vm => vm.NewCommand, v => v.NewButton)
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.OpenCommand, v => v.OpenButton)
.DisposeWith(disposables);
});
2024-07-23 07:40:10 +00:00
}
2024-09-14 16:47:59 +00:00
2024-07-23 07:40:10 +00:00
}