Ejemplo n.º 1
0
 // アプリケーションがアクティブになった (前面に表示された) ときに実行されるコード
 // このコードは、アプリケーションの初回起動時には実行されません
 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);
     }
 }
Ejemplo n.º 3
0
 // アプリケーションがアクティブになった (前面に表示された) ときに実行されるコード
 // このコードは、アプリケーションの初回起動時には実行されません
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     if (!e.IsApplicationInstancePreserved)
     {
         TenSecGameApplication.Context.Load();
     }
 }
Ejemplo n.º 4
0
 // 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);
     }
 }
Ejemplo n.º 6
0
 // 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);
        }
Ejemplo n.º 8
0
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     if (!e.IsApplicationInstancePreserved)
     {
         ApplicationUsageHelper.OnApplicationActivated();
     }
 }
Ejemplo n.º 9
0
        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);
        }
Ejemplo n.º 10
0
 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);
 }
Ejemplo n.º 11
0
 // 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();
            }
        }
Ejemplo n.º 13
0
 // 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();
     }
 }
Ejemplo n.º 14
0
 // 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();
     }
 }
Ejemplo n.º 15
0
 // 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"];
     }
 }
Ejemplo n.º 16
0
 // 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
         }
     }
 }
Ejemplo n.º 17
0
 // 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();
     }
 }
Ejemplo n.º 18
0
 // 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();
     }
 }
Ejemplo n.º 19
0
 // 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();
     });
 }
Ejemplo n.º 20
0
        // 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);
 }
Ejemplo n.º 22
0
 // Код для выполнения при активации приложения (переводится в основной режим)
 // Этот код не будет выполняться при первом запуске приложения
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     // Убедитесь, что состояние приложения восстановлено правильно
     if (!App.ViewModel.IsDataLoaded)
     {
         App.ViewModel.LoadData();
     }
 }
Ejemplo n.º 23
0
        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);
        }
Ejemplo n.º 24
0
        private void Application_Activated(object sender, ActivatedEventArgs e)
        {        
			if (e.IsApplicationInstancePreserved)
            {
                if (_vm != null)
                    _vm.Initialize(new Dictionary<string, string>());
            }
        }
Ejemplo n.º 25
0
        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);
        }
Ejemplo n.º 26
0
 // 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);
 }
Ejemplo n.º 27
0
 // 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();
     }
 }
Ejemplo n.º 28
0
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     if (UserData.Get<bool>(UserData.LocationToggleKey))
         ViewModelController.StartLocationService();
     if (database == null)
         database = new DatabaseManager();
     database.Open();
 }
Ejemplo n.º 29
0
 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);
     }
 }
Ejemplo n.º 31
0
 private void ComponentRegistration_Activated(object sender, ActivatedEventArgs <object> e)
 {
     this.ComponentCreated?.Invoke(this, new ComponentCreatedEventArgs(new ComponentContextComponentManager(e.Context), serviceType, e.Instance));
 }
Ejemplo n.º 32
0
 // 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;
 }
Ejemplo n.º 33
0
 // 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;
 }
Ejemplo n.º 34
0
 // 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
 }
Ejemplo n.º 35
0
 // 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
 }
Ejemplo n.º 36
0
 // 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;
 }
Ejemplo n.º 37
0
 // 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");
 }
Ejemplo n.º 38
0
 // 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();
 }
Ejemplo n.º 39
0
        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));
        }
Ejemplo n.º 40
0
 // 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);
 }
Ejemplo n.º 41
0
 // 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();
 }
Ejemplo n.º 43
0
 // 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é
 }
Ejemplo n.º 44
0
 private void OnActivated(object s, ActivatedEventArgs e)
 {
     this.IsBeingActivated();
 }
Ejemplo n.º 45
0
        private static void OnActivated(object sender, ActivatedEventArgs <object> e)
        {
            var instance = e.Instance as IInitializable;

            instance?.Initialize();
        }
Ejemplo n.º 46
0
 // 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);
 }
Ejemplo n.º 47
0
 // 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();
 }
Ejemplo n.º 48
0
 // 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();
 }
Ejemplo n.º 49
0
 void OnAppServiceActivated(object sender, ActivatedEventArgs args)
 {
     settings = Settings.Load();
 }
Ejemplo n.º 50
0
 // 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();
 }
Ejemplo n.º 51
0
 /// <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());
 }
Ejemplo n.º 52
0
 // 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();
 }
Ejemplo n.º 53
0
 // 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);
        }
Ejemplo n.º 55
0
 // 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();
 }
Ejemplo n.º 56
0
 void OnReactivated(object sender, ActivatedEventArgs e)
 {
 }
Ejemplo n.º 57
0
 /// <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();
 }