コード例 #1
0
ファイル: App.xaml.cs プロジェクト: runceel/WP7Apps
 // アプリケーションがアクティブになった (前面に表示された) ときに実行されるコード
 // このコードは、アプリケーションの初回起動時には実行されません
 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);
     }
 }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: runceel/WP7Apps
 // アプリケーションがアクティブになった (前面に表示された) ときに実行されるコード
 // このコードは、アプリケーションの初回起動時には実行されません
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     if (!e.IsApplicationInstancePreserved)
     {
         TenSecGameApplication.Context.Load();
     }
 }
コード例 #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...");
 }
コード例 #5
0
 void Current_Activated(object sender, ActivatedEventArgs e)
 {
     if (deactivatedState != null)
     {
         player.RestoreMediaState(deactivatedState);
     }
 }
コード例 #6
0
ファイル: App.xaml.cs プロジェクト: sanjayasl/Q42.WinRT
 // 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);
        }
コード例 #8
0
ファイル: App.xaml.cs プロジェクト: jel-massih/DevelopFeed
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     if (!e.IsApplicationInstancePreserved)
     {
         ApplicationUsageHelper.OnApplicationActivated();
     }
 }
コード例 #9
0
ファイル: App.xaml.cs プロジェクト: rgmills/7Pass
        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);
        }
コード例 #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);
 }
コード例 #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;
     }
 }
コード例 #12
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)
            {
                //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();
            }
        }
コード例 #13
0
ファイル: App.xaml.cs プロジェクト: jojozhuang/Projects
 // 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();
     }
 }
コード例 #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();
     }
 }
コード例 #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"];
     }
 }
コード例 #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
         }
     }
 }
コード例 #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();
     }
 }
コード例 #18
0
ファイル: App.xaml.cs プロジェクト: GunioRobot/Dominionizer
 // 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();
     }
 }
コード例 #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();
     });
 }
コード例 #20
0
ファイル: App.xaml.cs プロジェクト: damicolo/SantaJumper
        // 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();
        }
コード例 #21
0
 protected override void OnActivate(object sender, ActivatedEventArgs e)
 {
     if (!e.IsApplicationInstancePreserved)
     {
         Resurecting = true;
     }
     base.OnActivate(sender, e);
 }
コード例 #22
0
 // Код для выполнения при активации приложения (переводится в основной режим)
 // Этот код не будет выполняться при первом запуске приложения
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     // Убедитесь, что состояние приложения восстановлено правильно
     if (!App.ViewModel.IsDataLoaded)
     {
         App.ViewModel.LoadData();
     }
 }
コード例 #23
0
ファイル: JarvisAutofacModule.cs プロジェクト: rho24/Jarvis
        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);
        }
コード例 #24
0
ファイル: App.xaml.cs プロジェクト: violabazanye/Fashionista
        private void Application_Activated(object sender, ActivatedEventArgs e)
        {        
			if (e.IsApplicationInstancePreserved)
            {
                if (_vm != null)
                    _vm.Initialize(new Dictionary<string, string>());
            }
        }
コード例 #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);
        }
コード例 #26
0
ファイル: App.xaml.cs プロジェクト: soleon/BingleMaps
 // 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);
 }
コード例 #27
0
ファイル: App.xaml.cs プロジェクト: sinhpham/steamspecials
 // 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();
     }
 }
コード例 #28
0
ファイル: App.xaml.cs プロジェクト: lduparc/BeRider
 private void Application_Activated(object sender, ActivatedEventArgs e)
 {
     if (UserData.Get<bool>(UserData.LocationToggleKey))
         ViewModelController.StartLocationService();
     if (database == null)
         database = new DatabaseManager();
     database.Open();
 }
コード例 #29
0
 void registration_Activated(object sender, ActivatedEventArgs<object> e)
 {
     var screen = e.Instance as Screen;
     if (screen != null)
     {
         screen.DisplayName = "Particular Platform Installer";
     }
 }
コード例 #30
0
 private static void OnComponentActivated(object sender, ActivatedEventArgs<object> e)
 {
     var handler = e?.Instance as IHandle;
     if (handler != null)
     {
         e.Context.Resolve<IEventAggregator>().Subscribe(handler);
     }
 }
コード例 #31
0
 private void ComponentRegistration_Activated(object sender, ActivatedEventArgs <object> e)
 {
     this.ComponentCreated?.Invoke(this, new ComponentCreatedEventArgs(new ComponentContextComponentManager(e.Context), serviceType, e.Instance));
 }
コード例 #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;
 }
コード例 #33
0
ファイル: App.xaml.cs プロジェクト: danielsaul/apex-lumia
 // 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;
 }
コード例 #34
0
ファイル: App.xaml.cs プロジェクト: georgejecook/QuickCross
 // 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
 }
コード例 #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
 }
コード例 #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;
 }
コード例 #37
0
ファイル: App.xaml.cs プロジェクト: Rafaj-Design/Flurrystics
 // 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");
 }
コード例 #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();
 }
コード例 #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));
        }
コード例 #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);
 }
コード例 #41
0
ファイル: App.xaml.cs プロジェクト: houzhenggang/MonoCross
 // 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");
 }
コード例 #42
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)
 {
     _dataContext.Communication.Start();
 }
コード例 #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é
 }
コード例 #44
0
 private void OnActivated(object s, ActivatedEventArgs e)
 {
     this.IsBeingActivated();
 }
コード例 #45
0
        private static void OnActivated(object sender, ActivatedEventArgs <object> e)
        {
            var instance = e.Instance as IInitializable;

            instance?.Initialize();
        }
コード例 #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);
 }
コード例 #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();
 }
コード例 #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();
 }
コード例 #49
0
 void OnAppServiceActivated(object sender, ActivatedEventArgs args)
 {
     settings = Settings.Load();
 }
コード例 #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();
 }
コード例 #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());
 }
コード例 #52
0
ファイル: App.xaml.cs プロジェクト: oguzhankiyar/old-projects
 // 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();
 }
コード例 #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();
 }
コード例 #54
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)
        {
            LoadIsTrial();

            TiltEffect.SetIsTiltEnabled(RootFrame, true);
        }
コード例 #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();
 }
コード例 #56
0
 void OnReactivated(object sender, ActivatedEventArgs e)
 {
 }
コード例 #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);
 }
コード例 #58
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)
        {
            var state = PhoneApplicationService.Current.State;

            Model.Activate(state);
        }
コード例 #59
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)
 {
 }
コード例 #60
0
 /// <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();
 }