protected SearchResultsTabViewModel(MainModel mainModel, IWindowContext parentWindowContext, LibgenObjectType libgenObjectType, string searchQuery)
     : base(mainModel, parentWindowContext, searchQuery)
 {
     this.libgenObjectType   = libgenObjectType;
     emptySelectedItemFields = new ObservableCollection <string>();
     this.searchQuery        = searchQuery;
     lastExecutedSearchQuery = searchQuery;
     UpdateBookmarkedState();
     isExportPanelVisible             = false;
     isSearchProgressPanelVisible     = false;
     isSearchResultsGridVisible       = true;
     isStatusBarVisible               = true;
     ExportPanelViewModel             = new ExportPanelViewModel(mainModel, libgenObjectType, parentWindowContext);
     ExportPanelViewModel.ClosePanel += CloseExportPanel;
     SearchCommand            = new Command(Search);
     InterruptSearchCommand   = new Command(InterruptSearch);
     ToggleBookmarkCommand    = new Command(ToggleBookmark);
     OpenDetailsCommand       = new Command(OpenDetails);
     OpenFileCommand          = new Command(OpenFile);
     DownloadCommand          = new Command(Download);
     CopyCommand              = new Command(param => Copy(param as string));
     ToggleExportPanelCommand = new Command(ToggleExportPanel);
     mainModel.Localization.LanguageChanged += LocalizationLanguageChanged;
     Events.RaiseEvent(ViewModelEvent.RegisteredEventId.FOCUS_SEARCH_TEXT_BOX);
 }
 public ExportPanelViewModel(MainModel mainModel, LibgenObjectType libgenObjectType, IWindowContext parentWindowContext)
 {
     this.mainModel           = mainModel;
     this.libgenObjectType    = libgenObjectType;
     this.parentWindowContext = parentWindowContext;
     SelectPathCommand        = new Command(SelectPath);
     ExportCommand            = new Command(Export);
     CancelCommand            = new Command(Cancel);
     CancelExportCommand      = new Command(CancelExport);
     ShowResultCommand        = new Command(ShowResult);
     CloseCommand             = new Command(Close);
     Initialize();
 }
 protected SearchResultsTabViewModel(MainModel mainModel, IWindowContext parentWindowContext, LibgenObjectType libgenObjectType, string searchQuery)
     : base(mainModel, parentWindowContext, searchQuery)
 {
     this.libgenObjectType   = libgenObjectType;
     this.searchQuery        = searchQuery;
     lastExecutedSearchQuery = searchQuery;
     UpdateBookmarkedState();
     isExportPanelVisible         = false;
     isSearchProgressPanelVisible = false;
     ExportPanelViewModel         = new ExportPanelViewModel(mainModel, libgenObjectType, parentWindowContext);
     SearchCommand          = new Command(Search);
     InterruptSearchCommand = new Command(InterruptSearch);
     ToggleBookmarkCommand  = new Command(ToggleBookmark);
 }
Esempio n. 4
0
 public ExportPanelViewModel(MainModel mainModel, LibgenObjectType libgenObjectType, IWindowContext parentWindowContext)
     : base(mainModel)
 {
     this.libgenObjectType    = libgenObjectType;
     this.parentWindowContext = parentWindowContext;
     localization             = mainModel.Localization.CurrentLanguage.ExportPanel;
     SelectPathCommand        = new Command(SelectPath);
     ExportCommand            = new Command(Export);
     CancelCommand            = new Command(Cancel);
     CancelExportCommand      = new Command(CancelExport);
     ShowResultCommand        = new Command(ShowResult);
     CloseCommand             = new Command(Close);
     Initialize();
 }
Esempio n. 5
0
 protected LibgenObject(LibgenObjectType libgenObjectType)
 {
     LibgenObjectType = libgenObjectType;
 }
 protected SearchResultsTabViewModel(MainModel mainModel, IWindowContext parentWindowContext, LibgenObjectType libgenObjectType, string searchQuery)
     : base(mainModel, parentWindowContext, searchQuery)
 {
     this.searchQuery             = searchQuery;
     isExportPanelVisible         = false;
     isSearchProgressPanelVisible = false;
     ExportPanelViewModel         = new ExportPanelViewModel(mainModel, libgenObjectType, parentWindowContext);
     SearchCommand          = new Command(Search);
     InterruptSearchCommand = new Command(InterruptSearch);
 }