예제 #1
0
        private void exportTags()
        {
            SaveFileDialog saveTagsDialog = MediaViewer.Model.Utils.Windows.FileDialog.createSaveTagsFileDialog();

            if (saveTagsDialog.ShowDialog() == false)
            {
                return;
            }

            CancellableOperationProgressView exportView = new CancellableOperationProgressView();
            TagOperationsViewModel           vm         = new TagOperationsViewModel();

            exportView.DataContext = vm;
            Task.Run(() => vm.export(saveTagsDialog.FileName));
            exportView.ShowDialog();
        }
예제 #2
0
        void clearTags()
        {
            MessageBoxResult result = MessageBox.Show("Are you sure you want to clear all unused Tags from the database?", "Clear All Unused Tags", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No);

            if (result == MessageBoxResult.No)
            {
                return;
            }

            CancellableOperationProgressView clearView = new CancellableOperationProgressView();
            TagOperationsViewModel           vm        = new TagOperationsViewModel();

            clearView.DataContext = vm;
            Task.Run(() => vm.clear());
            clearView.ShowDialog();
            NrTags = 0;
        }
예제 #3
0
        private void importTags()
        {
            OpenFileDialog loadTagsDialog = MediaViewer.Model.Utils.Windows.FileDialog.createLoadTagsFileDialog();

            if (loadTagsDialog.ShowDialog() == false)
            {
                return;
            }

            CancellableOperationProgressView importView = new CancellableOperationProgressView();
            TagOperationsViewModel           vm         = new TagOperationsViewModel();

            importView.DataContext = vm;
            Task.Run(() => vm.import(loadTagsDialog.FileName));
            importView.ShowDialog();
            NrTags = 0;
        }
예제 #4
0
        void clearTags()
        {
            MessageBoxResult result = MessageBox.Show("Are you sure you want to clear all unused Tags from the database?", "Clear All Unused Tags", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No);
            if (result == MessageBoxResult.No) return;

            CancellableOperationProgressView clearView = new CancellableOperationProgressView();
            TagOperationsViewModel vm = new TagOperationsViewModel();
            clearView.DataContext = vm;
            Task.Run(() => vm.clear());
            clearView.ShowDialog();
            NrTags = 0;

        }
예제 #5
0
        private void importTags()
        {
            OpenFileDialog loadTagsDialog = MediaViewer.Model.Utils.Windows.FileDialog.createLoadTagsFileDialog();
            if (loadTagsDialog.ShowDialog() == false) return;

            CancellableOperationProgressView importView = new CancellableOperationProgressView();
            TagOperationsViewModel vm = new TagOperationsViewModel();
            importView.DataContext = vm;
            Task.Run(() => vm.import(loadTagsDialog.FileName));
            importView.ShowDialog();
            NrTags = 0;           
        }
예제 #6
0
        private void exportTags()
        {
            SaveFileDialog saveTagsDialog = MediaViewer.Model.Utils.Windows.FileDialog.createSaveTagsFileDialog();
            if (saveTagsDialog.ShowDialog() == false) return;

            CancellableOperationProgressView exportView = new CancellableOperationProgressView();
            TagOperationsViewModel vm = new TagOperationsViewModel();
            exportView.DataContext = vm;
            Task.Run(() => vm.export(saveTagsDialog.FileName));                      
            exportView.ShowDialog();           
        }