예제 #1
0
 private void AddListenToDB(string songid)
 {
     SongLog.AddListen(songid);
 }
예제 #2
0
        public static MainPage GetForCurrentView() => (MainPage)((Frame)Window.Current.Content).Content;  //This may be illegal"!!!!!

        /// <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;
            SongLog.InitialiseDatabase();
        }
예제 #3
0
 private void LogSongMessage(SongLog e)
 {
     // Console.WriteLine("ERROR {0} | {1}", e.Message, e.Filepath);
     // add to the database
     using (var transaction = session.BeginTransaction())
     {
         session.Save(e);
         transaction.Commit();
     }
 }