Esempio n. 1
0
 //--------------------CREATE--------------------//
 public void InsertLesson(Lessons newobj)
 {
     using (var dbConn = new SQLiteConnection(App.DB_PATH))
     {
         var existingLesson = dbConn.Query<Lessons>("select * from Lessons where Id =" + newobj.Id).FirstOrDefault();
         if (existingLesson != null)
         {
             Debug.WriteLine("Already exists, item: " + existingLesson.Id);
             return;
         }
         dbConn.RunInTransaction(() =>
         {
             dbConn.Insert(newobj);
         });
     }
 }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     navParam = e.Parameter as Lessons;
     createHtmlFileInLocalState();
     this.navigationHelper.OnNavigatedTo(e);
 }
 void webView3_ScriptNotify(object sender, NotifyEventArgs e)
 {
     string str = e.Value;
     Lessons obj = new Lessons("Example from lesson", "This is an example from the lesson you were viewing. Feel free to tinker around.", str);
     this.Frame.Navigate(typeof(CodeEditor), new CodeEditorContext(obj, "LessonExample"));
 }