Ejemplo n.º 1
0
        private void ApplicationStarted()
        {
            try
            {
                string dir = Path.GetDirectoryName(this.logbookLocation);
                if (Directory.Exists(dir) == false)
                {
                    Directory.CreateDirectory(dir);
                }

                Console.WriteLine("Database Location: " + this.logbookLocation);
                Console.WriteLine("Settings File Location: " + this.settingsLocation);

                ApiBridge.CreateInstance(this.logbookLocation, this.settingsLocation);
                ApiBridge.Instance.Init();
            }
            catch (Exception e)
            {
                Console.WriteLine("Error creating API");
                Console.WriteLine(e);
                throw;
            }
        }
Ejemplo n.º 2
0
 private void ApplicationStopped()
 {
     Console.WriteLine("Disposing API.");
     ApiBridge.DestroyInstance();
 }