mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-05-09 08:04:13 -04:00
Make fields readonly Remove unnecessary casts Format document Remove unnecessary usings Sort usings Use file-level namespaces Order modifiers
26 lines
920 B
C#
26 lines
920 B
C#
using AppScaffolding;
|
|
using Avalonia.Controls;
|
|
using HangoverAvalonia.ViewModels;
|
|
|
|
namespace HangoverAvalonia.Views;
|
|
|
|
public partial class MainWindow : Window
|
|
{
|
|
MainVM _viewModel => DataContext as MainVM;
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
|
|
var config = LibationScaffolding.RunPreConfigMigrations();
|
|
LibationScaffolding.RunPostConfigMigrations(config);
|
|
LibationScaffolding.RunPostMigrationScaffolding(Variety.Chardonnay, config);
|
|
}
|
|
|
|
public void OnLoad()
|
|
{
|
|
databaseTab.PropertyChanged += (_, e) => { if (e.Property.Name == nameof(TabItem.IsSelected)) databaseTab_VisibleChanged(databaseTab.IsSelected); };
|
|
deletedTab.PropertyChanged += (_, e) => { if (e.Property.Name == nameof(TabItem.IsSelected)) deletedTab_VisibleChanged(deletedTab.IsSelected); };
|
|
cliTab.PropertyChanged += (_, e) => { if (e.Property.Name == nameof(TabItem.IsSelected)) cliTab_VisibleChanged(cliTab.IsSelected); };
|
|
}
|
|
}
|