public FindItemsControlViewModel(ISessionEntityFinder finder, AplicationViewModel iAplicationViewModel)
        {
            _ApplicationMain = iAplicationViewModel;
            _AlbumFinder = finder.AlbumFinder;
            _IArtistFinder = finder.ArtistFinder;
            _TrackFinder = finder.TrackFinder;

            Commit = RelayCommand.Instanciate(DoCommit);
            Reset = RelayCommand.Instanciate(DoReset);
            Activate = RelayCommand.Instanciate(DoActivate);

            InitLists();
        }
Ejemplo n.º 2
0
        static async private void slaphscreen_Loaded(object sender, RoutedEventArgs e)
        {
            ThreadProperties TP = new ThreadProperties(ThreadPriority.Highest, null);

            new ThreadProperties(ThreadPriority.Normal, ProcessPriorityClass.High).SetCurrentThread();

            using (var tt = TimeTracer.TimeTrack("Load Time"))
            {
                IMusicImporter DB = _IS.GetDBImporter();

                await Task.WhenAll(DB.LoadAsync(TP), ScriptConverter.LoadAsync(TP));
            }

            MusicCollectionWPF.Windows.MainWindow window = new MusicCollectionWPF.Windows.MainWindow();
            _AplicationViewModel = new AplicationViewModel(_IS);
            window.Opacity = 0;
            window.Loaded += window_Loaded;
            App.Current.MainWindow = window;

            window.Show();
        }