BaconographyW8.App.App C# (CSharp) Метод

App() публичный Метод

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().
public App ( ) : BaconographyPortable.Messages
Результат BaconographyPortable.Messages
        public App()
        {

            this.InitializeComponent();
            this.Suspending += OnSuspending;


            var taskRegistered = false;

            foreach (var task in Windows.ApplicationModel.Background.BackgroundTaskRegistration.AllTasks)
            {
                if (task.Value.Name == "BaconographyW8BackgroundTaskLiveTileUpdater")
                {
                    taskRegistered = true;
                    break;
                }
            }

            if (!taskRegistered)
            {
                var builder = new BackgroundTaskBuilder();

                builder.Name = "BaconographyW8BackgroundTaskLiveTileUpdater";
                builder.TaskEntryPoint = "BaconographyW8BackgroundTask.LiveTileUpdater";
                builder.SetTrigger(new TimeTrigger(15, false));
                builder.Register();
            }
        }