コード例 #1
0
        public MainPage()
        {
            this.InitializeComponent();

            var optionsTask = OptionsHelper.LoadAsync();

            optionsTask.Wait(2000);
            this.ConfigOptions = optionsTask.Result;

            var storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;

            this.Log.Loggers.Add(new FileLogger(storageFolder.Path, "logs.txt"));

            Application.Current.Resuming           += Application_Resuming;
            Application.Current.Suspending         += Application_Suspending;
            Application.Current.UnhandledException += Current_UnhandledException;

            this.CameraAccess = new CameraAccess(this.Log);

            this.Log.Info(() => "App Started", (c) => c.AddVariable("LoggersAdded", this.Log.Loggers.Count().ToString()).AddVariable("TestKey", "TestValue"));
        }