// アプリケーションがアクティブになった (前面に表示された) ときに実行されるコード // このコードは、アプリケーションの初回起動時には実行されません private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { SearchHubApplication.Current.Load(); } }
void registration_Activated(object sender, ActivatedEventArgs<object> e) { if (e.Instance.GetType().GetInterfaces().Any(x=>x.Name.Contains("IHandle"))) { ContainerFactory.Container.Resolve<IEventAggregator>().Subscribe(e.Instance); } }
// アプリケーションがアクティブになった (前面に表示された) ときに実行されるコード // このコードは、アプリケーションの初回起動時には実行されません private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { TenSecGameApplication.Context.Load(); } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if(e.IsApplicationInstancePreserved) System.Diagnostics.Debug.WriteLine("Activated..."); else System.Diagnostics.Debug.WriteLine("Recovered from tombstoning, Activated..."); }
void Current_Activated(object sender, ActivatedEventArgs e) { if (deactivatedState != null) { player.RestoreMediaState(deactivatedState); } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private async void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { await WebDataCache.Init(); } }
static void OnComponentActivated(object sender, ActivatedEventArgs<object> args) { // nothing we can do if a null event argument is passed (should never happen) if (args == null) { return; } // nothing we can do if instance is not a handler var handler = args.Instance as IHandle; if (handler == null) { return; } // subscribe to handler, and prepare unsubscription when it's time for disposal var context = args.Context; var lifetimeScope = context.Resolve<ILifetimeScope>(); var eventAggregator = lifetimeScope.Resolve<IEventAggregator>(); eventAggregator.Subscribe(handler); var disposableAction = new DisposableAction(() => { eventAggregator.Unsubscribe(handler); }); lifetimeScope.Disposer.AddInstanceForDisposal(disposableAction); }
private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { ApplicationUsageHelper.OnApplicationActivated(); } }
private void Application_Activated( object sender, ActivatedEventArgs e) { AnalyticsTracker.Track( "start", "activated"); if (e.IsApplicationInstancePreserved) { var global = GlobalPassHandler.Instance; global.Reset(); if (global.ShouldPromptGlobalPass) { var root = RootFrame; root.Dispatcher.BeginInvoke(() => root.Navigate(Navigation.GetPathTo <GlobalPassVerify>())); } return; } ThemeData.Initialize(); Cache.RestoreCache(RootFrame.Dispatcher); }
private void OnComponentRegistrationOnActivated(object sender, ActivatedEventArgs<object> activation_event) { // compose by batch to allow for recomposition var batch = new CompositionBatch(); batch.AddPart(activation_event.Instance); _mefContainer.Compose(batch); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (Debugger.IsAttached) { Log.Level = Log.LogLevel.Verbose; } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { //Trace the event for debug purposes Utils.Trace("Application Activated"); //Create new data object variable TravelReportInfo travelReportInfo = null; //Try to locate previous data in transient state of the application if (PhoneApplicationService.Current.State.ContainsKey("UnsavedTravelReportInfo")) { //If found, initialize the data variable and remove in from application's state travelReportInfo = PhoneApplicationService.Current.State["UnsavedTravelReportInfo"] as TravelReportInfo; PhoneApplicationService.Current.State.Remove("UnsavedTravelReportInfo"); } //If found set it as a DataContext for all the pages of the application //An application is not guaranteed to be activated after it has been tombstoned, //thus if not found create new data object if (null != travelReportInfo) RootFrame.DataContext = travelReportInfo; else RootFrame.DataContext = new TravelReportInfo(); } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (!App.ViewModel.IsDataLoaded) { App.ViewModel.LoadData(); } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (e.IsApplicationInstancePreserved == false) { InitializeSDK(); } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (PhoneApplicationService.Current.State.ContainsKey("AccountDB")) { this.WorkingDB = (AccountDB)PhoneApplicationService.Current.State["AccountDB"]; } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { PhoneApplicationService.Current.State["newpage"] = "true"; // adding newpage value for checking it later if (PhoneApplicationService.Current.State.ContainsKey("hasspass")) // Checking if Isolated storage has key notelistiso { Settings.HashedPassword = (PhoneApplicationService.Current.State["hasspass"] as string); // Retriving Notes from Isolated storage } if (PhoneApplicationService.Current.State.ContainsKey("passhint")) // Checking if Isolated storage has key notelistiso { Settings.PasswordHint = (PhoneApplicationService.Current.State["passhint"] as string); // Retriving Notes from Isolated storage } if (PhoneApplicationService.Current.State.ContainsKey("pass")) // Checking if Isolated storage has key notelistiso { Settings.Password = (PhoneApplicationService.Current.State["pass"] as string); // Retriving Notes from Isolated storage } if (PhoneApplicationService.Current.State.ContainsKey("saltval")) // Checking if Isolated storage has key notelistiso { Settings.Salt = (PhoneApplicationService.Current.State["saltval"] as byte[]); // Retriving Notes from Isolated storage } if (PhoneApplicationService.Current.State.ContainsKey("notestate")) // Checking if State contains key notestate { Settings.NotesList = (PhoneApplicationService.Current.State["notestate"] as ObservableCollection<Note>); // Retriving Notes from State } } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { // Ensure that application state is restored appropriately if (!App.ViewModel.IsDataLoaded) { App.ViewModel.LoadData(); } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { var vml = Resources["Locator"] as GlobalViewModelLocator; vml.LoadState(); } }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { System.Threading.ThreadPool.QueueUserWorkItem((o) => { Countly.Countly.SharedInstance().init("http://demo.count.ly", "c3e3ea3fa1f3cc43a668c53e17da0ecd8072243f"); Countly.Countly.SharedInstance().OnStart(); }); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (RootVisual == null) return; MainPage m = (MainPage)((PhoneApplicationFrame)RootVisual).Content; m.OnAppActivated(); }
protected override void OnActivate(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { Resurecting = true; } base.OnActivate(sender, e); }
// Код для выполнения при активации приложения (переводится в основной режим) // Этот код не будет выполняться при первом запуске приложения private void Application_Activated(object sender, ActivatedEventArgs e) { // Убедитесь, что состояние приложения восстановлено правильно if (!App.ViewModel.IsDataLoaded) { App.ViewModel.LoadData(); } }
void registration_Activated(object sender, ActivatedEventArgs<object> e) { if(e == null) return; if(e.Instance.GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IJarvisHandle<>))) e.Context.Resolve<IJarvisEventAggregator>().Subscribe(e.Instance); }
private void Application_Activated(object sender, ActivatedEventArgs e) { if (e.IsApplicationInstancePreserved) { if (_vm != null) _vm.Initialize(new Dictionary<string, string>()); } }
private static void OnComponentActivated(object sender, ActivatedEventArgs<object> args) { var handler = args.Instance as IHandle; if (handler == null) return; var eventAggregator = args.Context.Resolve<IEventAggregator>(); eventAggregator.Subscribe(handler); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void ApplicationActivated(object sender, ActivatedEventArgs e) { if (e.IsApplicationInstancePreserved) { return; } ViewModelLocator.MainStatic.Wake(NotifyOldSaveData); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { // Need to restore from tombstone. var x = App.Current.Resources["Locator"] as ViewModelLocator; x.LoadStates(); } }
private void Application_Activated(object sender, ActivatedEventArgs e) { if (UserData.Get<bool>(UserData.LocationToggleKey)) ViewModelController.StartLocationService(); if (database == null) database = new DatabaseManager(); database.Open(); }
void registration_Activated(object sender, ActivatedEventArgs<object> e) { var screen = e.Instance as Screen; if (screen != null) { screen.DisplayName = "Particular Platform Installer"; } }
private static void OnComponentActivated(object sender, ActivatedEventArgs<object> e) { var handler = e?.Instance as IHandle; if (handler != null) { e.Context.Resolve<IEventAggregator>().Subscribe(handler); } }
private void ComponentRegistration_Activated(object sender, ActivatedEventArgs <object> e) { this.ComponentCreated?.Invoke(this, new ComponentCreatedEventArgs(new ComponentContextComponentManager(e.Context), serviceType, e.Instance)); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { OriginalIdleMode = PhoneApplicationService.Current.UserIdleDetectionMode; PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { //Allow app to continue running under the lock screen PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled; }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { EnsureSampleAppApplication(RootFrame); // TODO check whether we need to navigate to a view or whether this is done for us by the Windows Phone OS }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { // Ensure that application state is restored appropriately }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { StateUtilities.IsLaunching = false; }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { FlurryWP7SDK.Api.StartSession("9697X37ZJW956JD76Q3M"); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { GlobalViewModel.LoadSettings(); }
private void Registration_Activated(object sender, ActivatedEventArgs <object> e) { Type serviceType = (sender as IComponentRegistration).Metadata["ServiceType"] as Type; this.ComponentCreated?.Invoke(this, new ComponentCreatedEventArgs(new ComponentContextComponentManager(e.Context), serviceType, e.Instance)); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { rhoruntime.CRhoRuntime.getInstance().onActivate(1); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { System.Diagnostics.Debug.WriteLine("Application_Activated"); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { _dataContext.Communication.Start(); }
// Code à exécuter lorsque l'application est activée (affichée au premier plan) // Ce code ne s'exécute pas lorsque l'application est démarrée pour la première fois private void Application_Activated(object sender, ActivatedEventArgs e) { // Assurez-vous que l'état de l'application est correctement restauré }
private void OnActivated(object s, ActivatedEventArgs e) { this.IsBeingActivated(); }
private static void OnActivated(object sender, ActivatedEventArgs <object> e) { var instance = e.Instance as IInitializable; instance?.Initialize(); }
// Code à exécuter lorsque l'application est activée (affichée au premier plan) // Ce code ne s'exécute pas lorsque l'application est démarrée pour la première fois private void Application_Activated(object sender, ActivatedEventArgs e) { ViewModel.HandleAppActivated(!e.IsApplicationInstancePreserved); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { ApplicationUsageHelper.OnApplicationActivated(); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { //IsolatedStorageExplorer.Explorer.RestoreFromTombstone(); }
void OnAppServiceActivated(object sender, ActivatedEventArgs args) { settings = Settings.Load(); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { Debug.WriteLine("[Linphone] Activated"); LinphoneManager.Instance.ConnectBackgroundProcessToInterface(); }
/// <summary> /// The handler called when the application is activated. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The activated event args.</param> private static void AppResumed(object sender, ActivatedEventArgs e) { lastPingTime = DateTime.Now.Ticks; SendPing(GetSavedActiveTime()); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { Database.Fill(); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { ValidateTrialMode(); StartFlurry(); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { LoadIsTrial(); TiltEffect.SetIsTiltEnabled(RootFrame, true); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { App.Engine.LoadSessionData(); }
void OnReactivated(object sender, ActivatedEventArgs e) { }
/// <summary> /// Code to execute when the application is activated (brought to foreground) /// This code will not execute when the application is first launched /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Application_Activated(object sender, ActivatedEventArgs e) { MainPage.ActivateSession(PhoneApplicationService.Current.State, e.IsApplicationInstancePreserved); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { var state = PhoneApplicationService.Current.State; Model.Activate(state); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { }
/// <summary> /// Starts audio engine when application is activated. /// </summary> /// <param name="sender">PhoneApplicationService</param> /// <param name="e">Event arguments</param> void AppActivated(object sender, ActivatedEventArgs e) { m_d3dInterop.StartAudioEngine(); }