public ActivationService(IShellWindow shellWindow, ActivationHandler <LaunchActivatedEventArgs> defaultHandler, IEnumerable <IActivationHandler> activationHandlers, INavigationService navigationService) { App.CurrentWindow = shellWindow as Window; _defaultHandler = defaultHandler; _activationHandlers = activationHandlers; _navigationService = navigationService; }
public async Task ActivateAsync(object activationArgs) { if (IsInteractive(activationArgs)) { await InitializeAsync(); if (Window.Current.Content == null) { Window.Current.Content = _shell?.Value ?? new Frame(); } } ActivationHandler activationHandler = GetActivationHandlers() .FirstOrDefault(h => h.CanHandle(activationArgs)); if (activationHandler != null) { await activationHandler.HandleAsync(activationArgs); } if (IsInteractive(activationArgs)) { DefaultLaunchActivationHandler defaultHandler = new DefaultLaunchActivationHandler(_defaultNavItem); if (defaultHandler.CanHandle(activationArgs)) { await defaultHandler.HandleAsync(activationArgs); } Window.Current.Activate(); await StartupAsync(); } }
public ActivationService(IShellWindow shellWindow, ActivationHandler <LaunchActivatedEventArgs> defaultHandler, IEnumerable <IActivationHandler> activationHandlers, INavigationService navigationService, IThemeSelectorService themeSelectorService) { App.MainWindow = shellWindow as Window; _defaultHandler = defaultHandler; _activationHandlers = activationHandlers; _navigationService = navigationService; _themeSelectorService = themeSelectorService; }
public ActivationService(IShellWindow shellWindow, ActivationHandler <LaunchActivatedEventArgs> defaultHandler, IEnumerable <IActivationHandler> activationHandlers, INavigationService navigationService, IThemeSelectorService themeSelectorService, ILanguageSelectorService languageSelectorService, ISettingsService settingsService) { App.MainWindow = shellWindow as Window; this.defaultHandler = defaultHandler; this.activationHandlers = activationHandlers; this.navigationService = navigationService; this.themeSelectorService = themeSelectorService; this.languageSelectorService = languageSelectorService; this.settingsService = settingsService; }
private async Task HandleActivationAsync(object activationArgs) { ActivationHandler activationHandler = GetActivationHandlers().FirstOrDefault(h => h.CanHandle(activationArgs)); if (activationHandler != null) { await activationHandler.HandleAsync(activationArgs); } if (IsInteractive(activationArgs)) { var defaultHandler = new DefaultLaunchActivationHandler(defaultNavItem); if (defaultHandler.CanHandle(activationArgs)) { await defaultHandler.HandleAsync(activationArgs); } } }
static private async Task HandleActivationAsync(object activationArgs) { ActivationHandler activationHandler = GetActivationHandlers() .FirstOrDefault(h => h.CanHandle(activationArgs)); if (activationHandler != null) { await activationHandler.HandleAsync(activationArgs); } if (IsInteractive(activationArgs)) { DefaultActivationHandler defaultHandler = new DefaultActivationHandler(_startupViewType); if (defaultHandler.CanHandle(activationArgs)) { await defaultHandler.HandleAsync(activationArgs); } } }
void Start() { _activationHandler = targetGroup.GetComponent <ActivationHandler>(); ExperimentManager.Instance.RegisterToExperimentManager(this); this.gameObject.GetComponent <MeshRenderer>().enabled = false; }
public ActivationService(ActivationHandler <LaunchActivatedEventArgs> defaultHandler, IEnumerable <IActivationHandler> activationHandlers, INavigationService navigationService) { _defaultHandler = defaultHandler; _activationHandlers = activationHandlers; _navigationService = navigationService; }
void Start() { anim = GetComponent<Animator>(); anim.SetLayerWeight(1, 1.0f); anim.SetLayerWeight(2, 1.0f); timeScript = GetComponent<TimeActions>(); camScript = GetComponent<ThirdPersonCamera>(); activationHandler = GetComponent<ActivationHandler>(); weapHandler = GetComponent<WeaponHandler>(); ammoScript = GetComponent<Ammo>(); playerActivationHandler = GetComponent<PlayerActivationHandler>(); cloneActivationHandler = GetComponent<CloneActivationHandler>(); flash = GameObject.Find("Flash").GetComponent<Screenflash>(); if(anim.layerCount == 2) anim.SetLayerWeight(1, 1); mMoving = false; anim.SetBool("GetUp", getUpAtStart); }