Пример #1
0
        /// <summary>
        /// Executes the import.
        /// </summary>
        /// <param name="obj">The object.</param>
        private void ExecuteImport(object obj)
        {
            VisibleSimulate = Visibility.Visible;
            //MenuButtonStyle = _view.FindResource("MenuButtonHover") as Style;
            MenuImportButtonStyle = _view.FindResource("MenuImportButton") as Style;
            _mainViewModel.ShowMessage("Importing...");
            var executeImport = new BackgroundWorker();

            executeImport.DoWork             += OnExecuteImport_Dowork;
            executeImport.RunWorkerCompleted += OnExecuteImport_RunWorkerCompleted;
            executeImport.RunWorkerAsync();
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ImportFilePageViewModel"/> class.
 /// </summary>
 /// <param name="view">The view.</param>
 /// <param name="folderId">The folder identifier.</param>
 public ImportFilePageViewModel(ImportFilePage view, int folderId)
 {
     _mainViewModel    = PageNavigatorHelper.GetMainModel();
     ImportCommand     = new RelayCommand(ExecuteImport, CanImport);
     CancelCommand     = new RelayCommand(ExecuteCancel);
     BrowseFileCommand = new RelayCommand(ExecuteBrowseFile, CanBrowseFile);
     _view             = view;
     ReloadData(folderId);
     VisibleSimulate       = Visibility.Collapsed;
     MenuImportButtonStyle = _view.FindResource("MenuButton") as Style;
 }