示例#1
0
文件: App.xaml.cs 项目: tobsowo/f8app
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;
            this.Resuming += OnResuming;

            _reactPage = new MainPage();
        }
示例#2
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;
            this.Resuming   += OnResuming;

            _reactPage = new MainPage();
        }
示例#3
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
                Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
                Microsoft.ApplicationInsights.WindowsCollectors.Session);
            this.InitializeComponent();
            this.Suspending += OnSuspending;
            this.Resuming   += OnResuming;

            _reactPage = new AppReactPage();
        }
示例#4
0
        public CodePushReactPackage(string deploymentKey, ReactPage mainPage)
        {
            AppVersion    = CodePushUtils.GetAppVersion();
            DeploymentKey = deploymentKey;
            MainPage      = mainPage;
            UpdateManager = new UpdateManager();

            if (CurrentInstance != null)
            {
                CodePushUtils.Log("More than one CodePush instance has been initialized. Please use the instance method codePush.getBundleUrlInternal() to get the correct bundleURL for a particular instance.");
            }

            CurrentInstance = this;
        }
示例#5
0
#pragma warning disable CS0618 // Keeping for backward compatibility
        public GreatPushReactPackage(string deploymentKey, ReactPage mainPage)
#pragma warning restore CS0618 // Keeping for backward compatibility
        {
            AppVersion    = GreatPushUtils.GetAppVersion();
            DeploymentKey = deploymentKey;
            MainPage      = mainPage;
            UpdateManager = new UpdateManager();

            if (CurrentInstance != null)
            {
                GreatPushUtils.Log("More than one GreatPush instance has been initialized. Please use the instance method greatPush.getBundleUrlInternal() to get the correct bundleURL for a particular instance.");
            }

            CurrentInstance = this;
        }
        public CodePushReactPackage(string deploymentKey, ReactPage mainPage)
        {
            AppVersion             = Package.Current.Id.Version.Major + "." + Package.Current.Id.Version.Minor + "." + Package.Current.Id.Version.Build;
            DeploymentKey          = deploymentKey;
            MainPage               = mainPage;
            UpdateManager          = new UpdateManager();
            IsRunningBinaryVersion = false;
            // TODO implement telemetryManager
            // _codePushTelemetryManager = new CodePushTelemetryManager(this.applicationContext, CODE_PUSH_PREFERENCES);

            if (CurrentInstance != null)
            {
                CodePushUtils.Log("More than one CodePush instance has been initialized. Please use the instance method codePush.getBundleUrlInternal() to get the correct bundleURL for a particular instance.");
            }

            CurrentInstance = this;
        }
        public CodePushReactPackage(string deploymentKey, ReactPage mainPage)
        {
            AppVersion = Package.Current.Id.Version.Major + "." + Package.Current.Id.Version.Minor + "." + Package.Current.Id.Version.Build;
            DeploymentKey = deploymentKey;
            MainPage = mainPage;
            UpdateManager = new UpdateManager();
            IsRunningBinaryVersion = false;
            // TODO implement telemetryManager 
            // _codePushTelemetryManager = new CodePushTelemetryManager(this.applicationContext, CODE_PUSH_PREFERENCES);

            InitializeUpdateAfterRestart();
            if (CurrentInstance != null)
            {
                CodePushUtils.Log("More than one CodePush instance has been initialized. Please use the instance method codePush.getBundleUrlInternal() to get the correct bundleURL for a particular instance.");
            }

            CurrentInstance = this;
        }