public CoreDispatcherPriorityScheduler(CoreDispatcher dispatcher) { _lowScheduler = new CoreDispatcherScheduler(dispatcher, CoreDispatcherPriority.Low); _normalScheduler = new CoreDispatcherScheduler(dispatcher, CoreDispatcherPriority.Normal); _highScheduler = new CoreDispatcherScheduler(dispatcher, CoreDispatcherPriority.High); _lowestScheduler = new CoreDispatcherScheduler(dispatcher, CoreDispatcherPriority.Idle); }
public WinRtSchedulers(CoreDispatcherScheduler coreDispatcher, IPriorityScheduler dispatcher, IPriorityScheduler threadPool) { if (coreDispatcher == null) throw new ArgumentNullException("coreDispatcher"); if (dispatcher == null) throw new ArgumentNullException("dispatcher"); if (threadPool == null) throw new ArgumentNullException("threadPool"); _coreDispatcher = coreDispatcher; _dispatcher = dispatcher; _threadPool = threadPool; }
public WinRtSchedulers(CoreDispatcherScheduler coreDispatcher, IPriorityScheduler dispatcher, IPriorityScheduler threadPool) { if (coreDispatcher == null) { throw new ArgumentNullException("coreDispatcher"); } if (dispatcher == null) { throw new ArgumentNullException("dispatcher"); } if (threadPool == null) { throw new ArgumentNullException("threadPool"); } _coreDispatcher = coreDispatcher; _dispatcher = dispatcher; _threadPool = threadPool; }
public WinRtModule(Frame frame, CoreDispatcherScheduler dispatcher) { _frame = frame; _dispatcher = dispatcher; }
private async Task <PlayerViewManager> GetEnsureSecondaryView() { if (IsMainView && SecondaryCoreAppView == null) { var playerView = CoreApplication.CreateNewView(); HohoemaSecondaryViewFrameViewModel vm = null; int id = 0; ApplicationView view = null; INavigationService ns = null; await playerView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() => { // SecondaryViewのスケジューラをセットアップ SecondaryViewScheduler = new CoreDispatcherScheduler(playerView.Dispatcher); playerView.TitleBar.ExtendViewIntoTitleBar = true; var content = new Views.HohoemaSecondaryViewFrame(); var frameFacade = new FrameFacadeAdapter(content.Frame, EventAggregator); var sessionStateService = new SessionStateService(); //sessionStateService.RegisterFrame(frameFacade, "secondary_view_player"); ns = new FrameNavigationService(frameFacade , (pageToken) => { if (pageToken == nameof(Views.VideoPlayerPage)) { return(typeof(Views.VideoPlayerPage)); } else if (pageToken == nameof(Views.LivePlayerPage)) { return(typeof(Views.LivePlayerPage)); } else { return(typeof(Views.BlankPage)); } }, sessionStateService); vm = content.DataContext as HohoemaSecondaryViewFrameViewModel; Window.Current.Content = content; id = ApplicationView.GetApplicationViewIdForWindow(playerView.CoreWindow); view = ApplicationView.GetForCurrentView(); view.TitleBar.ButtonBackgroundColor = Windows.UI.Colors.Transparent; view.TitleBar.ButtonInactiveBackgroundColor = Windows.UI.Colors.Transparent; Window.Current.Activate(); await ApplicationViewSwitcher.TryShowAsStandaloneAsync(id, ViewSizePreference.UseHalf, MainViewId, ViewSizePreference.UseHalf); // ウィンドウサイズの保存と復元 if (Services.Helpers.DeviceTypeHelper.IsDesktop) { var localObjectStorageHelper = App.Current.Container.Resolve <Microsoft.Toolkit.Uwp.Helpers.LocalObjectStorageHelper>(); if (localObjectStorageHelper.KeyExists(secondary_view_size)) { view.TryResizeView(localObjectStorageHelper.Read <Size>(secondary_view_size)); } view.VisibleBoundsChanged += View_VisibleBoundsChanged; } view.Consolidated += SecondaryAppView_Consolidated; }); SecondaryAppView = view; _SecondaryViewVM = vm; SecondaryCoreAppView = playerView; SecondaryViewPlayerNavigationService = ns; App.Current.Container.RegisterInstance(SECONDARY_VIEW_PLAYER_NAVIGATION_SERVICE, SecondaryViewPlayerNavigationService); } return(this); }
public ConcurrencyService() { _dispatcherScheduler = new CoreDispatcherScheduler(CoreApplication.MainView.CoreWindow.Dispatcher); }
public ConcurrencyService() { _dispatcherScheduler = new CoreDispatcherScheduler(CoreApplication.MainView.CoreWindow.Dispatcher); _scheduler = new PeriodicBatchScheduler(_dispatcherScheduler); }
public XamarinDispatcherScheduler(CoreDispatcherScheduler dispatchScheduler) =>
static partial void OverrideDispatchScheduler(ref IScheduler scheduler) { scheduler = new CoreDispatcherScheduler(Window.Current.Dispatcher); }