Exemple #1
0
        protected async override void OnExit(ExitEventArgs e)
        {
            await BackupTask.ConfigureAwait(false);

            Ninja.Get <Database>().Commit();
            base.OnExit(e);
        }
Exemple #2
0
        public void Execute(object parameter)
        {
            var table   = Ninja.Get <TableViewModel>();
            var manager = Ninja.Get <SongManager>();

            manager.Remove(table.SelectedSongModel);
        }
Exemple #3
0
        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));
        }
Exemple #5
0
        public void Execute(object parameter)
        {
            var manager = Ninja.Get <SongManager>();

            manager.FinishEditing();

            var table = Ninja.Get <TableViewModel>();

            table.SelectedSongModel = null;
        }
Exemple #6
0
        public MainWindow()
        {
            InitializeComponent();

            DataContext = Ninja.Get <MainViewModel>();
        }
Exemple #7
0
 protected T Get <T>() => Ninja.Get <T>();