예제 #1
0
        public App()
        {
            InitializeComponent();

            if (database == null)
            {
                CreatedDB = new NoteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Notes.db3"));
            }

            MainPage = new MainPage(CreatedDB);
        }
예제 #2
0
        public MainPage(NoteDatabase database)
        {
            InitializeComponent();
            Note note = new Note
            {
                Name = "ales je kok",
                Text = "ale je bily"
            };

            database.SaveNoteAsync(note);

            list = database.GetNotesAsync().Result;
            foreach (Note kok in list)
            {
                Console.WriteLine(kok);
            }
        }