static ParseService() { ParseClient.Initialize(new ParseClient.Configuration { ApplicationId = Constants.PARSE_APP_ID, WindowsKey = Constants.PARSE_NET_KEY, Server = Constants.PARSE_SERVER_URL, }); ParseFacebookUtils.Initialize(Constants.FACEBOOK_APP_ID); }
/// <summary> /// Вызывается при обычном запуске приложения пользователем. Будут использоваться другие точки входа, /// будет использоваться, например, если приложение запускается для открытия конкретного файла. /// </summary> /// <param name="e">Сведения о запросе и обработке запуска.</param> protected override async void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif Frame rootFrame = Window.Current.Content as Frame; // Не повторяйте инициализацию приложения, если в окне уже имеется содержимое, // только обеспечьте активность окна if (rootFrame == null) { // Создание фрейма, который станет контекстом навигации, и переход к первой странице rootFrame = new Frame(); //Связывание фрейма с ключом SuspensionManager SuspensionManager.RegisterFrame(rootFrame, "AppFrame"); // Задайте язык по умолчанию rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { // Восстановление сохраненного состояния сеанса только при необходимости try { await SuspensionManager.RestoreAsync(); } catch (SuspensionManagerException) { //Возникли ошибки при восстановлении состояния. //Предполагаем, что состояние отсутствует, и продолжаем } } // Размещение фрейма в текущем окне Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // Если стек навигации не восстанавливается для перехода к первой странице, // настройка новой страницы путем передачи необходимой информации в качестве параметра // навигации rootFrame.Navigate(typeof(HubPage), e.Arguments); } // Обеспечение активности текущего окна Window.Current.Activate(); ParseClient.Initialize("bthlugArbHCrcDgbuHPS5Uiz3lZbWvmU2EIjBgaV", "SPE35IPobltfR4wHXipwa8uIFZuNoiI2tY0QHpCV"); ParseFacebookUtils.Initialize("690850497593331"); }
public App() { this.InitializeComponent(); this.Suspending += OnSuspending; ParseClient.Initialize(new ParseClient.Configuration { ApplicationId = "VHGWqcnFaJtSbzYEU0RoZd7vrksPKB3NQQNQlfrU", WindowsKey = "smzwxPjGFImASW5hYhkZKup4mfsPaNNrPrQXQA3U", Server = "https://pg-app-j8e1p7yakmanwjkdb8d7svie9iv7x3.scalabl.cloud/1/" }); ParseFacebookUtils.Initialize("518811151618797"); }
/// <summary> /// Constructeur pour l'objet Application. /// </summary> public App() { // App.xaml initialization ParseClient.Initialize("KB0XBMX06SVCiUnSUKKgA52v2pee75nSGexrh0wT", "oiclVXauxBf2mVR4fjs7VE8wAJzaVEKEAR3TrCFp"); ParseFacebookUtils.Initialize("603572813098360"); // Other initialization //// You can setup a event handler to be called back when the authentication has finished //Session.OnFacebookAuthenticationFinished += OnFacebookAuthenticationFinished; //// This line is from the above step //RootFrame.UriMapper = new FacebookUriMapper(); // Gestionnaire global pour les exceptions non interceptées. UnhandledException += Application_UnhandledException; // Initialisation du XAML standard InitializeComponent(); // Initialisation spécifique au téléphone InitializePhoneApplication(); // Initialisation de l'affichage de la langue InitializeLanguage(); // Affichez des informations de profilage graphique lors du débogage. if (Debugger.IsAttached) { // Affichez les compteurs de fréquence des trames actuels. Application.Current.Host.Settings.EnableFrameRateCounter = true; // Affichez les zones de l'application qui sont redessinées dans chaque frame. //Application.Current.Host.Settings.EnableRedrawRegions = true; // Activez le mode de visualisation d'analyse hors production, // qui montre les zones d'une page sur lesquelles une accélération GPU est produite avec une superposition colorée. //Application.Current.Host.Settings.EnableCacheVisualization = true; // Empêche l'écran de s'éteindre lorsque le débogueur est utilisé en désactivant // la détection de l'état inactif de l'application. // Attention :- À utiliser uniquement en mode de débogage. Les applications qui désactivent la détection d'inactivité de l'utilisateur continueront de s'exécuter // et seront alimentées par la batterie lorsque l'utilisateur ne se sert pas du téléphone. PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } //RootFrame.UriMapper = new FacebookUriMapper(); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { DependencyService.Register <ToastNotificatorImplementation>(); ToastNotificatorImplementation.Init(); global::Xamarin.Forms.Forms.Init(); ImageCircleRenderer.Init(); new SfAutoCompleteRenderer(); ParseClient.Initialize(new ParseClient.Configuration { ApplicationId = "myAppId", Server = "http://bigbreakers.herokuapp.com/parse/" // trailing slash is important }); ParseFacebookUtils.Initialize("1790522011216423"); LoadApplication(new App()); Xamarin.FormsGoogleMaps.Init("AIzaSyC6MmgY1vrl6B71IRKJKL9cLdfVBJssHfA"); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Xamarin.FormsGoogleMaps.Init(this, bundle); ImageCircleRenderer.Init(); DependencyService.Register <ToastNotificatorImplementation>(); ToastNotificatorImplementation.Init(this); global::Xamarin.Forms.Forms.Init(this, bundle); ParseClient.Initialize(new ParseClient.Configuration { ApplicationId = "myAppId", Server = "http://bigbreakers.herokuapp.com/parse/" // trailing slash is important }); ParseFacebookUtils.Initialize("1790522011216423"); LoadApplication(new App()); }
// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) { return; } // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new PhoneApplicationFrame(); RootFrame.Navigated += CompleteInitializePhoneApplication; // Assign the URI-mapper class to the application frame. RootFrame.UriMapper = new UriMapper(); // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Handle reset requests for clearing the backstack RootFrame.Navigated += CheckForResetNavigation; // Ensure we don't initialize again phoneApplicationInitialized = true; // ------------------------------------------------------------------ // // CUSTOM STUFF // //------------------------------------------------------------------- (App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush).Color = Color.FromArgb(255, 223, 179, 0); (App.Current.Resources["PhoneForegroundBrush"] as SolidColorBrush).Color = Colors.Black; (App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Color.FromArgb(255, 241, 190, 0);// orange // initailize parse so we can make requests: ParseClient.Initialize(Constants.Parse_ApplicationID, Constants.Parse_DotNetKey); ParseFacebookUtils.Initialize(Constants.FacebookAppId); if (ParseUser.CurrentUser != null) { ParseUser.CurrentUser.FetchAsync(); } }
/// <summary> /// Constructor for the Application object. /// </summary> public App() { // Global handler for uncaught exceptions. UnhandledException += Application_UnhandledException; // Standard XAML initialization InitializeComponent(); // Phone-specific initialization InitializePhoneApplication(); ThemeManager.ToLightTheme(); //AccentColor color = new AccentColor(); //ThemeManager.SetAccentColor(color); // Language display initialization InitializeLanguage(); // Show graphics profiling information while debugging. if (Debugger.IsAttached) { // Display the current frame rate counters. Application.Current.Host.Settings.EnableFrameRateCounter = true; // 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; // Prevent the screen from turning off while under the debugger by disabling // the application's idle detection. // 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; } ParseClient.Initialize("bthlugArbHCrcDgbuHPS5Uiz3lZbWvmU2EIjBgaV", "SPE35IPobltfR4wHXipwa8uIFZuNoiI2tY0QHpCV"); ParseFacebookUtils.Initialize("690850497593331"); }