private async void ImportReleasesFromFile() { var openPicker = new FileOpenPicker(); openPicker.ViewMode = PickerViewMode.Thumbnail; openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; openPicker.FileTypeFilter.Add(".releases"); var file = await openPicker.PickSingleFileAsync(); if (file == null) { return; } var content = await FileIO.ReadTextAsync(file); var synchronizeService = SyncService.Current(); await synchronizeService.SynchronizeReleasesFromContent(content); }
public ReleasesView() { InitializeComponent(); m_ViewModel = new ReleasesViewModel(ApiService.Current(), StorageService.Current(), SyncService.Current(), new AnalyticsService(), ReleaseSingletonService.Current()); DataContext = m_ViewModel; Window.Current.CoreWindow.KeyUp += GlobalKeyUpHandler; Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated; m_ViewModel.SetCommentsUrl = SetCommentsUrl; m_ViewModel.RefreshBackground = LoadReleaseBackground; }
public ReleasesView() { InitializeComponent(); m_ViewModel = new ReleasesViewModel(ApiService.Current(), StorageService.Current(), SyncService.Current(), new AnalyticsService()); DataContext = m_ViewModel; Window.Current.CoreWindow.KeyUp += GlobalKeyUpHandler; m_ViewModel.SetCommentsUrl = SetCommentsUrl; }