private void App_Activated(object sender, Microsoft.Phone.Shell.ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { ApplicationUsageHelper.OnApplicationActivated(); } }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { var nameHelper = new AssemblyName(Assembly.GetExecutingAssembly().FullName); var version = nameHelper.Version; var full = nameHelper.FullName; var name = nameHelper.Name; ApplicationUsageHelper.Init(version.ToString()); RadRateApplicationReminder radRateApplicationReminder = new RadRateApplicationReminder(); radRateApplicationReminder.AllowUsersToSkipFurtherReminders = true; //radRateApplicationReminder.AreFurtherRemindersSkipped = false; radRateApplicationReminder.RecurrencePerUsageCount = 5; radRateApplicationReminder.Notify(); RadTrialApplicationReminder applicationReminder = new RadTrialApplicationReminder(); //applicationReminder.SimulateTrialForTests = true; //applicationReminder.OccurrencePeriod = new TimeSpan(15, 0, 0, 0); //applicationReminder.AllowedTrialPeriod = new TimeSpan(30, 0, 0, 0); //applicationReminder.OccurrencePeriod = new TimeSpan(0, 0, 5, 0); //applicationReminder.AllowedTrialPeriod = new TimeSpan(0, 0, 15, 0); applicationReminder.AllowedTrialUsageCount = 30; applicationReminder.FreeUsageCount = 15; //applicationReminder.OccurrenceUsageCount = 1; applicationReminder.Notify(); }
// 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(); mainViewModels.PlayQueue = new System.Collections.ObjectModel.ObservableCollection <PlaylistItem>(); PodcastPlaybackManager.getInstance().updateCurrentlyPlayingEpisode(); 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) { // Telerik Diagnostics ApplicationUsageHelper.OnApplicationActivated(); AppInformation.IsStartupModeActivate = true; AppInformation.HasPinLockIntroduced = false; NetworkService.CheckChangesIP(); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { //Before using any of the ApplicationBuildingBlocks, this class should be initialized with the version of the application. var versionAttrib = new AssemblyName(Assembly.GetExecutingAssembly().FullName); ApplicationUsageHelper.Init(versionAttrib.Version.ToString()); currentVersion = versionAttrib.Version.ToString(); }
// 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) { //This will ensure that the ApplicationUsageHelper is initialized again if the application has been in Tombstoned state. 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 ApplicationActivated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { AppStartup(); } ApplicationUsageHelper.OnApplicationActivated(); }
private void InitErrorHandler() { ApplicationUsageHelper.Init(Assembly.GetExecutingAssembly().GetVersion()); var diagnostics = new RadDiagnostics(); diagnostics.ExceptionOccurred += OnExceptionOccurred; diagnostics.HandleUnhandledException = true; diagnostics.Init(); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched #region Events /// <summary> /// Handles the Activated event of the Application control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ActivatedEventArgs" /> instance containing the event data.</param> private void Application_Activated(object sender, ActivatedEventArgs e) { ApplicationUsageHelper.OnApplicationActivated(); // Ensure that application state is restored appropriately if (!ViewModel.IsRvDataChanged) { ViewModel.LoadReturnVisitList(SortOrder.DateOldestToNewest); } }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { //Before using any of the ApplicationBuildingBlocks, this class should be initialized with the version of the application. ApplicationUsageHelper.Init("1.0"); //Create database DataHelper dataHelper = new DataHelper(); dataHelper.CreateDatabase(); }
// 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) { AuthenticationService.Current.Start(SimpleIoc.Default.GetInstance <IExtendedApiClient>(), new MBLogger(typeof(AuthenticationService))); } ApplicationUsageHelper.OnApplicationActivated(); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { //Before using any of the ApplicationBuildingBlocks, this class should be initialized with the version of the application. ApplicationUsageHelper.Init(Settings.AppVersion()); if (Settings.GetAppSettingValue <bool>(Constants.SETTINGS.LIVE_TILE)) { PeriodicTaskClient.Current.Start(); } }
// 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) { //This will ensure that the ApplicationUsageHelper is initialized again if the application has been in Tombstoned state. ApplicationUsageHelper.OnApplicationActivated(); } var versionAttrib = new AssemblyName(Assembly.GetExecutingAssembly().FullName); currentVersion = versionAttrib.Version.ToString(); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { // IsolatedStorageExplorer.Explorer.Start("192.168.0.6"); using (var db = new PodcastSqlModel()) { db.createDB(); } // Updates episodes from the audio agent. refreshEpisodesFromAudioAgent(); // Diagnostics ApplicationUsageHelper.Init(App.AppVersion); }
// 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) { //This will ensure that the ApplicationUsageHelper is initialized again if the application has been in Tombstoned state. ApplicationUsageHelper.OnApplicationActivated(); } // Ensure that application state is restored appropriately if (!App.ViewModel.IsDataLoaded) { App.ViewModel.LoadData(); } }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private async void Application_Launching(object sender, LaunchingEventArgs e) { //Before using any of the ApplicationBuildingBlocks, this class should be initialized with the version of the application. var versionAttrib = new AssemblyName(Assembly.GetExecutingAssembly().FullName); ApplicationUsageHelper.Init(versionAttrib.Version.ToString()); if (KernelService.Kernel.Get <ISettingsService>().LoadSetting <bool>("SyncEnabled")) { if (await((WP8SyncService)KernelService.Kernel.Get <SyncService>()).LiveLoginSilent()) { KernelService.Kernel.Get <MainViewModel>().SyncCommand.Execute(null); } } }
/// <summary> /// Constructor for the Application object. /// </summary> public App() { ApplicationUsageHelper.Init("1.8.2.1"); //Global exception handling var diagnostics = new RadDiagnostics { EmailTo = "*****@*****.**" }; diagnostics.Init(); // Standard Silverlight initialization InitializeComponent(); // Phone-specific initialization InitializePhoneApplication(); var color = System.Windows.Media.Color.FromArgb(255, 31, 117, 204); ThemeManager.SetAccentColor(color); ThemeManager.OverrideOptions = ThemeManagerOverrideOptions.None; ThemeManager.ToLightTheme(); // Show graphics profiling information while debugging. if (System.Diagnostics.Debugger.IsAttached) { //TODO: Uncomment the code //Display the current frame rate counters. const bool helper = false; Current.Host.Settings.EnableFrameRateCounter = helper; MetroGridHelper.IsVisible = helper; // Show the areas of the app that are being redrawn in each frame. //Application.Current.Host.Settings.EnableRedrawRegions = true; // Enable non-production analysis visualization mode, // which shows areas of a page that are handed off to GPU with a colored overlay. //Application.Current.Host.Settings.EnableCacheVisualization = true; // Disable the application idle detection by setting the UserIdleDetectionMode property of the // application's PhoneApplicationService object to Disabled. // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run // and consume battery power when the user is not using the phone. PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { // Initialize Telerik Diagnostics with the actual app version information ApplicationUsageHelper.Init(AppService.GetAppVersion()); AppInformation.HasPinLockIntroduced = false; NetworkService.CheckChangesIP(); #if WINDOWS_PHONE_81 // Code to intercept files that are send to MEGA as share target var shareEventArgs = e as ShareLaunchingEventArgs; if (shareEventArgs != null) { this.ShareOperation = shareEventArgs.ShareTargetActivatedEventArgs.ShareOperation; } #endif }
// 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) { var versionAttrib = new AssemblyName(Assembly.GetExecutingAssembly().FullName); if (!e.IsApplicationInstancePreserved) { //This will ensure that the ApplicationUsageHelper is initialized again if the application has been in Tombstoned state. ApplicationUsageHelper.OnApplicationActivated(); if (KernelService.Kernel.Get <ISettingsService>().LoadSetting <bool>("SyncEnabled")) { if (await((WP8SyncService)KernelService.Kernel.Get <SyncService>()).LiveLoginSilent()) { KernelService.Kernel.Get <MainViewModel>().SyncCommand.Execute(null); } } } }
protected override void OnActivate(object sender, ActivatedEventArgs e) { base.OnActivate(sender, e); var serviceResolver = IoC.Get <INavigationServiceResolver>(); if (!e.IsApplicationInstancePreserved) { serviceResolver.TryRestore(); } var analitics = IoC.Get <IAnalyticsService>(); analitics.StartSession(); serviceResolver.TryResolve(); ApplicationUsageHelper.OnApplicationActivated(); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { ApplicationUsageHelper.Init("1.0"); try { string val = IsolatedStorageSettings.ApplicationSettings["RemindAgain"].ToString(); } catch (KeyNotFoundException) { RadRateApplicationReminder reminder = new RadRateApplicationReminder(); reminder.AllowUsersToSkipFurtherReminders = true; reminder.MessageBoxInfo = new Telerik.Windows.Controls.Reminders.MessageBoxInfoModel() { Title = "Rate Liquid Gold", Buttons = MessageBoxButtons.YesNo, Content = "Would you like to rate this app? It would be greatly appreciated.", SkipFurtherRemindersMessage = "Skip further reminders" }; reminder.ShowReminderMessage(reminder.MessageBoxInfo); reminder.ReminderClosed += new EventHandler <ReminderClosedEventArgs>(reminder_ReminderClosed); } Diagnostics = new RadDiagnostics() { EmailTo = "*****@*****.**", EmailSubject = "ERROR", IncludeScreenshot = true, HandleUnhandledException = true, ApplicationName = "Liquid Gold", ApplicationVersion = "1.0" }; Diagnostics.MessageBoxInfo = new Telerik.Windows.Controls.Reminders.MessageBoxInfoModel() { Buttons = MessageBoxButtons.YesNo, Title = "ERROR", Content = "There seems to have been an error. Do you want to send a report to help resolve this issue?" }; Diagnostics.Init(); Diagnostics.ExceptionOccurred += new EventHandler <ExceptionOccurredEventArgs>(Diagnostics_ExceptionOccurred); }
protected override void OnLaunch(object sender, LaunchingEventArgs e) { base.OnLaunch(sender, e); var serviceResolver = IoC.Get <INavigationServiceResolver>(); serviceResolver.TryRestore(); ApplicationUsageHelper.Init(Assembly.GetExecutingAssembly().GetVersion()); var analitics = IoC.Get <IAnalyticsService>(); analitics.StartSession(); // register at MSPN var pushChannelService = IoC.Get <IPushChannelService>(); var vm = IoC.Get <PushSettingsPageViewModel>(); pushChannelService.Error += (o, args) => Deployment.Current.Dispatcher.BeginInvoke(() => { vm.IsError = true; }); pushChannelService.ManagementIdChanged += (o, args) => Deployment.Current.Dispatcher.BeginInvoke(() => { vm.Token = args.Data; }); pushChannelService.Connect(); }
/// <summary> /// OnLaunch event fires when the application first starts up /// </summary> /// <param name="sender">Responsible party</param> /// <param name="e">The arguments coming in with the Event</param> protected override void OnLaunch(object sender, LaunchingEventArgs e) { base.OnLaunch(sender, e); var sterlingService = this.GetInstance(typeof(ISterlingService), null) as ISterlingService; if (sterlingService != null) { sterlingService.Activate(); } ApplicationUsageHelper.Init("1.0"); if (System.Diagnostics.Debugger.IsAttached) { Application.Current.Host.Settings.EnableFrameRateCounter = true; PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } // Added an imposed delay to allow the Splash Screen to show properly System.Threading.Thread.Sleep(750); }
// 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 launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { ApplicationUsageHelper.Init("1.0"); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { ApplicationUsageHelper.Init(AppSettings.AppVersion()); // LowMemoryHelper.BeginRecording(); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { //Before using any of the ApplicationBuildingBlocks, this class should be initialized with the version of the application. ApplicationUsageHelper.Init("1.0"); ReviewBugger.CheckNumOfRuns(); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void ApplicationLaunching(object sender, LaunchingEventArgs e) { AppStartup(); ApplicationUsageHelper.Init(ApplicationManifest.Current.App.Version); }
private void App_Launching(object sender, Microsoft.Phone.Shell.LaunchingEventArgs e) { ApplicationUsageHelper.Init("2.5.0.0"); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void ApplicationLaunching(object sender, LaunchingEventArgs e) { AuthenticationService.Current.Start(SimpleIoc.Default.GetInstance <IExtendedApiClient>(), new MBLogger(typeof(AuthenticationService))); ApplicationUsageHelper.Init(ApplicationManifest.Current.App.Version); }