Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();

            ProgressBarViewModel progressBarViewModel = new ProgressBarViewModel();

            ProgressPanel.DataContext = progressBarViewModel;

            FilteringViewModel filteringViewModel = new FilteringViewModel();

            LoadFiltersData(filteringViewModel);
            Closing += (s, e) => SaveFiltersData(filteringViewModel);
            FilterPanel.DataContext = filteringViewModel;

            FilesListViewModel filesListViewModel = new FilesListViewModel(filteringViewModel.GetFilteringManager(), progressBarViewModel.GetProgressBarManager());

            FilesPanel.DataContext = filesListViewModel;

            WindowViewModel windowViewModel = new WindowViewModel(progressBarViewModel.GetProgressBarManager(), filesListViewModel.GetFilesListManager());

            this.Drop  += (s, e) => ProcessWindowDrop(e, windowViewModel);
            DataContext = windowViewModel;

            FilesList.ItemContainerStyle.Setters.Add(new EventSetter(
                                                         DataGridRow.MouseDoubleClickEvent,
                                                         new MouseButtonEventHandler((s, e) => FilesList_MouseDoubleClick(s, windowViewModel.WindowState, windowViewModel.PathValue))));

            RegisterUncaughtExpectionsHandler(AppDomain.CurrentDomain);
        }
Beispiel #2
0
        public async Task <IActionResult> List(int pageindex = 1)
        {
            var VM = new FilesListViewModel(ce);

            VM.files = await fms.GetListAsync(pageindex, 10);

            VM.pageindex = pageindex;

            return(View(VM));
        }
        public ActionResult Files()
        {
            FilesListViewModel filesList = new FilesListViewModel
            {
                CdnUri            = ((CloudFilesUploadService)this.publicCloudService).GetCdnUri(),
                NetworkFiles      = this.networkService.GetFileList(),
                PrivateCloudFiles = this.privateCloudService.GetFileList(),
                PublicCloudFiles  = this.publicCloudService.GetFileList()
            };

            return(View(filesList));
        }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FilesListPage"/> class
 /// </summary>
 /// <param name="mediaType">Chosen media type of files to show</param>
 public FilesListPage(MediaType mediaType)
 {
     _viewModel = new FilesListViewModel(mediaType, Navigation);
     InitializeComponent();
     BindingContext = _viewModel;
 }