protected async override void OnExit(ExitEventArgs e) { await BackupTask.ConfigureAwait(false); Ninja.Get <Database>().Commit(); base.OnExit(e); }
public void Execute(object parameter) { var table = Ninja.Get <TableViewModel>(); var manager = Ninja.Get <SongManager>(); manager.Remove(table.SelectedSongModel); }
public void Execute(object parameter) { var source = Ninja.Get <EntryViewModel>(); manager.AddSongToDatabase(); source.FirstItemHasFocus = true; }
public void Execute(object parameter) { var type = typeof(SongModel); var property = type.GetProperty(parameter as string); var entry = Ninja.Get <EntryViewModel>(); property.SetValue(entry.Current, property.GetValue(manager.PreviousEditableSong)); entry.Notify(nameof(entry.Current)); }
public void Execute(object parameter) { var manager = Ninja.Get <SongManager>(); manager.FinishEditing(); var table = Ninja.Get <TableViewModel>(); table.SelectedSongModel = null; }
public MainWindow() { InitializeComponent(); DataContext = Ninja.Get <MainViewModel>(); }
protected T Get <T>() => Ninja.Get <T>();