private void AddSection(bool rename = true) { if (SelectedNotebook == null) { AddNotebook(); return; } NotebookSection section = new NotebookSection(); section.NotebookID = SelectedNotebook.ID; section.Title = "New Section"; section.LastModified = DateTime.UtcNow; section.Color = NotesFunctions.GenerateSectionColor(); NoteDatabase.Add(section); AddSection(section, true); AddPage(); sectionTabs.UpdateLayout(); if (rename) { RenameActiveSection(); } }
public void Test_DeleteNote() { NoteAdministration.Notes.Clear(); NoteAdministration.AddNote(test.Information, test.AccountEmail); Note note = NoteDatabase.GetNote(new Note(test.Information, test.AccountEmail)); Assert.IsTrue(NoteAdministration.RemoveNote(note)); try { NoteAdministration.RemoveNote(test); } catch (Exception exception) { Assert.IsTrue(exception is PlannerExceptions); Assert.AreEqual(exception.Message, "Note doesn't exist in the note list"); } //Database test NoteAdministration.AddNote("tester", "*****@*****.**"); Note not2 = NoteDatabase.GetNote(new Note("tester", "*****@*****.**")); Assert.IsTrue(NoteAdministration.RemoveNote(new Note("tester", "*****@*****.**"))); NoteDatabase noteDatabase = new NoteDatabase(); Assert.IsNotNull(noteDatabase.GetNote(new Note("tester", "*****@*****.**"))); }
public void OnAppearing() { //Debug.WriteLine (id); var database = new NoteDatabase(); if (id > 0) { Who = database.GetPerson(id); } else { String fname = database.GetToken("fname").Value; String lname = database.GetToken("lname").Value; String email = database.GetToken("email").Value; String phone = database.GetToken("phone").Value; String org = database.GetToken("org").Value; String uid = database.GetToken("uid").Value; String profilepicture = database.GetToken("profilepicture").Value; Who = new Person(fname, lname, email, phone, org, uid, profilepicture); } RaisePropertyChanged(() => Name); RaisePropertyChanged(() => Email); RaisePropertyChanged(() => Phone); RaisePropertyChanged(() => Org); RaisePropertyChanged(() => ProfilePicture); RaisePropertyChanged(() => EventView); }
public static void SaveToken(string token) { _Token = token; var database = new NoteDatabase(); database.InsertOrUpdateToken(new Tconnect.Data.Token("Yammer", token)); database.InsertOrUpdateToken(new Tconnect.Data.Token("Calendar", "1")); MyCalendar.ImportCalendar(); MyCalendar.ImportContacts(); MyCalendar cal = new MyCalendar(); Debug.WriteLine("ruight herjelkfjsd tohooooooooooooo"); String[] s = cal.getUserDeets(token); database.InsertOrUpdateToken(new Tconnect.Data.Token("fname", s[0])); database.InsertOrUpdateToken(new Tconnect.Data.Token("lname", s[1])); database.InsertOrUpdateToken(new Tconnect.Data.Token("email", s[2])); database.InsertOrUpdateToken(new Tconnect.Data.Token("phone", s[3])); database.InsertOrUpdateToken(new Tconnect.Data.Token("org", s[4])); database.InsertOrUpdateToken(new Tconnect.Data.Token("uid", s[5])); database.InsertOrUpdateToken(new Tconnect.Data.Token("profilepicture", s[6])); // { fname, lname, email, phone, org, uid, profilepicture }; Debug.WriteLine("oi we got here m8"); //Person p = new Person (s [0], s [1], s [2], s [3], s [4], s [5], s [6]); //p.NoteId = 0; //database.InsertOrUpdatePerson (p); //Debug.WriteLine ("afftaahh:: " + database.GetPerson(0).Name); }
private static void ExecutedNewNoteCommand(object sender, ExecutedRoutedEventArgs e) { NotesView notesView = (NotesView)sender; NotebookPage page = (NotebookPage)e.Parameter; NotebookSection section = NoteDatabase.GetSection(page.SectionID); Notebook notebook = NoteDatabase.GetNotebook(section.NotebookID); if (notesView.SelectedNotebook == null) { notesView.AddNotebook(notebook, true); return; } if (notesView.SelectedSection == null) { notesView.AddSection(section, true); return; } if (notesView.SelectedPage == null) { notesView.AddPage(page, true); } else { notesView.AddPage(page); } }
private void PageDelete_Click(object sender, RoutedEventArgs e) { NotebookPage selectedPage = SelectedPage; NoteDatabase.Delete(selectedPage); SelectedPage = null; foreach (FrameworkElement each in pageTabs.Items) { if (each.Tag == selectedPage) { int index = pageTabs.Items.IndexOf(each); pageTabs.Items.Remove(each); if (pageTabs.HasItems) { if (index > 0) { ((ToggleButton)pageTabs.Items[index - 1]).IsChecked = true; } else { ((ToggleButton)pageTabs.Items[0]).IsChecked = true; } } else { SelectedPage = null; ShowEmptySectionMessage(); } break; } } }
public void OnAppearing() { if (id > 0) { var database = new NoteDatabase(); Event = database.GetNote(id); //Debug.WriteLine (Event.TimeStamp); people = new List <Person> (); if (Event.Attendees.Contains(",")) { var p = Event.Attendees.Split(','); foreach (string me in p) { var who = database.GetPerson(int.Parse(me)); people.Add(who); } } else { int p; if (int.TryParse(Event.Attendees, out p)) { var who = database.GetPerson(p); people.Add(who); } } RaisePropertyChanged(() => People); RaisePropertyChanged(() => Event); } //RaisePropertyChanged (() => Event); }
void OnSaveButtonClicked(object sender, EventArgs e) { Note nuevaNota = new Note(); nuevaNota.Text = EditorNote.Text; nuevaNota.Date = DateTime.UtcNow; //Guardarlo en la BD. crearNote de este metodo. NoteDatabase DataBase = new NoteDatabase (Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "Notes.db3")); try { int Result = DataBase.CreatetNote(nuevaNota); if (Result == 1) { DisplayAlert("Aviso", DataBase.MessageStatus, "ok"); } OnNoteAdded(this, nuevaNota); } catch (Exception ex) { DisplayAlert("Error", DataBase.MessageStatus, "Ok"); } finally { Navigation.PopAsync(); } }
/// <summary> /// Create a new blank page. /// </summary> public void AddPage() { if (!HasLoaded) { _createOnLoad = true; return; } if (SelectedNotebook == null) { AddNotebook(); return; } if (SelectedSection == null) { AddSection(); return; } NotebookPage p = new NotebookPage(); p.SectionID = SelectedSection.ID; p.Title = "Untitled Page"; p.Created = p.LastModified = DateTime.UtcNow; NoteDatabase.Add(p); AddPage(p, true); }
public FlowDocument GetFlowDocument() { FlowDocument doc = (FlowDocument)Application.LoadComponent( new Uri("/Daytimer.DatabaseHelpers;component/Templates/NoteTemplate.xaml", UriKind.Relative)); NotebookSection section = NoteDatabase.GetSection(_page.SectionID); Notebook notebook = NoteDatabase.GetNotebook(section.NotebookID); ((Paragraph)doc.FindName("Title")).Inlines.Add(_page.Title); ((Paragraph)doc.FindName("Created")).Inlines.Add(FormatHelpers.FormatDate(_page.Created.Date) + " " + RandomFunctions.FormatTime(_page.Created.TimeOfDay)); ((Paragraph)doc.FindName("Notebook")).Inlines.Add(notebook.Title); ((Paragraph)doc.FindName("Section")).Inlines.Add(section.Title); Section details = (Section)doc.FindName("Details"); FlowDocument detailsDoc = _page.DetailsDocument; if (detailsDoc != null) { BlockCollection blocks = _page.DetailsDocument.Copy().Blocks; while (blocks.Count > 0) { details.Blocks.Add(blocks.FirstBlock); } } return(doc); }
private async Task Save(NotebookPage page, NotebookSection section, Notebook notebook, FlowDocument document) { if (page != null) { if (document != null) { await page.SetDetailsDocumentAsync(document); } await Task.Factory.StartNew(() => { page.LastModified = DateTime.UtcNow; NoteDatabase.UpdatePage(page); section.LastSelectedPageID = page.ID; section.LastModified = DateTime.UtcNow; NoteDatabase.UpdateSection(section); notebook.LastSelectedSectionID = section.ID; notebook.LastModified = DateTime.UtcNow; NoteDatabase.UpdateNotebook(notebook); Settings.LastOpenedNotebook = notebook.ID; }); } else { await Task.Factory.StartNew(() => { if (section != null) { section.LastSelectedPageID = ""; section.LastModified = DateTime.UtcNow; NoteDatabase.UpdateSection(section); } if (notebook != null) { if (section != null) { notebook.LastSelectedSectionID = section.ID; } else { notebook.LastSelectedSectionID = ""; } notebook.LastModified = DateTime.UtcNow; NoteDatabase.UpdateNotebook(notebook); Settings.LastOpenedNotebook = notebook.ID; } else { Settings.LastOpenedNotebook = ""; } }); } }
private List <Note> GetAllNotes() { var database = new NoteDatabase (FileAccessHelper.GetLocalFilePath("Notes.db3")); var NotesFromDB = database.ReadNotes(); return(new List <Note>(NotesFromDB)); }
public void Load() { IEnumerable <Notebook> notebooks = NoteDatabase.GetNotebooks(); if (notebooks.GetEnumerator().MoveNext()) { foreach (Notebook each in notebooks) { AddNotebook(each); } string lastOpened = Settings.LastOpenedNotebook; bool found = false; if (lastOpened != "") { foreach (ToggleButton each in notebookTabs.Items) { if (((DatabaseObject)each.Tag).ID == lastOpened) { each.IsChecked = true; found = true; break; } } } if (!found) { ((ToggleButton)notebookTabs.Items[0]).IsChecked = true; } } else { SelectedNotebook = null; SelectedSection = null; SelectedPage = null; ShowEmptyWorkspaceMessage(); } HasLoaded = true; LastUsedNotesView = this; if (_createOnLoad) { AddPage(); _createOnLoad = false; } if (_scrollToNoteId != null) { ScrollToNote(_scrollToNoteId); } }
public MainPage() { InitializeComponent(); // variable de tipo entera int A; // Declarar variable de mis propios tipos. NoteDatabase dataBase = new NoteDatabase(""); // Utilizar Dot Notation para acceder a los miembros de un tipo. dataBase.CreatetNote(new Note()); }
public string[] GetTextDocument() { NotebookSection section = NoteDatabase.GetSection(_page.SectionID); Notebook notebook = NoteDatabase.GetNotebook(section.NotebookID); return(new string[] { "Title:\t" + _page.Title, "Created:\t" + FormatHelpers.FormatDate(_page.Created.Date) + " " + RandomFunctions.FormatTime(_page.Created.TimeOfDay), "Notebook:\t" + notebook.Title, "Section:\t" + section.Title, "Details:\t" + _page.Details }); }
protected override void OnAppearing() { base.OnAppearing(); NoteDatabase db = new NoteDatabase(Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "Notes.db3")); var NotesFromDB = db.ReadNotes(); listView.ItemsSource = NotesFromDB; }
public override async void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); if (_initialized) { return; } // Connect Flutter plugins (uncomment only if Flutter module uses plugins) //FlutnetNotes.PluginInterop.GeneratedPluginRegistrant.Register(this.Engine); try { // // Init the runtime using the application key (generated from the flutnet console) // FlutnetRuntime.Init("TRIAL-APP-KEY"); // // Launcher Service // FlutnetRuntime.RegisterPlatformService(new LauncherService(), "launcher_service"); // // Preference Service // FlutnetRuntime.RegisterPlatformService(new PreferenceService(), "preference_service"); // // Notes Database // NoteDatabase noteDatabase = new NoteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Notes.db3")); FlutnetRuntime.RegisterPlatformService(noteDatabase, "note_database"); // Initialize the bridge #if (DEBUG) _bridge = new FlutnetBridge(this.Engine, FlutnetBridgeMode.PlatformChannel); #else _bridge = new FlutnetBridge(this.Engine); #endif _initialized = true; } catch (Exception e) { var taskCompletionSource = new TaskCompletionSource <bool>(); var alert = UIAlertController.Create("Fatal Error", e.Message, UIAlertControllerStyle.Alert); alert.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, a => taskCompletionSource.SetResult(true))); this.PresentViewController(alert, true, null); await taskCompletionSource.Task; throw; } }
private void NewNote(Notebook nb = null, NotebookSection ns = null, NotebookPage page = null) { if (page == null) { page = new NotebookPage(); page.Created = page.LastModified = DateTime.UtcNow; } if (nb == null) { string nbID = Settings.LastOpenedNotebook; if (nbID != null) { nb = NoteDatabase.GetNotebook(nbID); } if (nb == null) { nb = NoteDatabase.FirstNotebook(); } } if (nb == null) { nb = new Notebook(); nb.Title = "My Notebook"; nb.Color = NotesFunctions.GenerateNotebookColor(); NoteDatabase.Add(nb); } if (ns == null) { ns = NoteDatabase.GetSection(nb.LastSelectedSectionID); } if (ns == null) { ns = new NotebookSection(); ns.Title = "Quick Notes"; ns.NotebookID = nb.ID; ns.Color = NotesFunctions.GenerateSectionColor(); NoteDatabase.Add(ns); } page.SectionID = ns.ID; SelectedPage = page; SelectedSection = ns; SelectedNotebook = nb; }
private static void ConfigureFlutnetRuntime() { try { // // Init the runtime using the application key (generated from the flutnet console) // FlutnetRuntime.Init("TRIAL-APP-KEY"); // // Launcher Service // FlutnetRuntime.RegisterPlatformService(new LauncherService(), "launcher_service"); // // Preference Service // FlutnetRuntime.RegisterPlatformService(new PreferenceService(), "preference_service"); // // Notes Database // NoteDatabase noteDatabase = new NoteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Notes.db3")); FlutnetRuntime.RegisterPlatformService(noteDatabase, "note_database"); Initialized = true; } catch (Exception e) { if (CurrentActivity != null) { AlertDialog.Builder builder = new AlertDialog.Builder(CurrentActivity); builder.SetTitle("Fatal Error"); builder.SetMessage(e.Message); builder.SetCancelable(false); builder.SetPositiveButton("OK", (sender, args) => { Process.KillProcess(Process.MyPid()); Environment.Exit(0); }); AlertDialog dialog = builder.Create(); dialog.Show(); } else { throw; } } }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); Args = e.Args; CreateJumpList(); // Make the main process appear connected to the update process // in the taskbar. try { SetCurrentProcessExplicitAppUserModelID(GlobalAssemblyInfo.AssemblyName); } catch { } AppointmentDatabase.Load(); AppointmentDatabase.OnSaveCompletedEvent += AppointmentDatabase_OnSaveCompletedEvent; ContactDatabase.Load(); ContactDatabase.OnSaveCompletedEvent += ContactDatabase_OnSaveCompletedEvent; TaskDatabase.Load(); TaskDatabase.OnSaveCompletedEvent += TaskDatabase_OnSaveCompletedEvent; NoteDatabase.Load(); NoteDatabase.OnSaveCompletedEvent += NoteDatabase_OnSaveCompletedEvent; SyncDatabase.Load(); SyncDatabase.OnSaveCompletedEvent += SyncDatabase_OnSaveCompletedEvent; QuoteDatabase.Load(); QuoteDatabase.OnSaveCompletedEvent += QuoteDatabase_OnSaveCompletedEvent; ThemeHelpers.UpdateTheme(true); MainWindow mainWindow = new MainWindow(); mainWindow.ContentRendered += mainWindow_ContentRendered; mainWindow.Show(); SystemEvents.UserPreferenceChanged += SystemEvents_UserPreferenceChanged; SystemEvents.TimeChanged += SystemEvents_TimeChanged; if (BackstageEvents.StaticUpdater == null) { BackstageEvents.StaticUpdater = new BackstageEvents(); } BackstageEvents.StaticUpdater.OnForceUpdateEvent += StaticUpdater_OnForceUpdateEvent; BackstageEvents.StaticUpdater.OnThemeChangedEvent += StaticUpdater_OnThemeChangedEvent; BackstageEvents.StaticUpdater.OnExportEvent += StaticUpdater_OnExportEvent; BackstageEvents.StaticUpdater.OnHelpEvent += StaticUpdater_OnHelpEvent; BackstageEvents.StaticUpdater.OnDocumentRequestEvent += StaticUpdater_OnDocumentRequestEvent; BackstageEvents.StaticUpdater.OnPrintStartedEvent += StaticUpdater_OnPrintStartedEvent; BackstageEvents.StaticUpdater.OnImportEvent += StaticUpdater_OnImportEvent; BackstageEvents.StaticUpdater.OnQuotesChangedEvent += StaticUpdater_OnQuotesChangedEvent; }
private void AddNotebook() { Notebook notebook = new Notebook(); notebook.Title = "New Notebook"; notebook.LastModified = DateTime.UtcNow; notebook.Color = NotesFunctions.GenerateNotebookColor(); NoteDatabase.Add(notebook); AddNotebook(notebook, true); AddSection(false); RenameActiveNotebook(); }
void OnDeleteButtonClicked(object sender, EventArgs e) { NoteDatabase DataBase = new NoteDatabase (Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "Notes.db3")); int Result = DataBase.DeleteNote(note); if (Result == 1) { DisplayAlert("Aviso", $"Registro eliminado con éxito.ID:{note.ID}", "ok"); } Navigation.PopAsync(); }
private void TaskDatabase_OnSaveCompletedEvent(object sender, EventArgs e) { try { Dispatcher.Invoke(() => { if (MainWindow != null) { ((MainWindow)MainWindow).SaveNotesView(); } }); } catch { } NoteDatabase.Save(); }
private void SectionDelete_Click(object sender, RoutedEventArgs e) { NotebookSection selectedSection = SelectedSection; NoteDatabase.Delete(selectedSection); SelectedSection = null; SelectedPage = null; foreach (object each in sectionTabs.Items) { RadioButton rb = each as RadioButton; if (rb != null && rb.Tag == selectedSection) { int index = sectionTabs.Items.IndexOf(each); sectionTabs.Items.Remove(each); if (sectionTabs.Items.Count > 2) { if (index > 0) { ((ToggleButton)sectionTabs.Items[index - 1]).IsChecked = true; } else { ((ToggleButton)sectionTabs.Items[0]).IsChecked = true; } } else { SelectedSection = null; SelectedPage = null; ShowEmptyNotebookMessage(); } break; } } if (NotesAppBar.LastUsedNotesAppBar != null && NotesAppBar.LastUsedNotesAppBar.SelectedSection.ID == selectedSection.ID) { NotesAppBar.LastUsedNotesAppBar.SelectedNotebook = null; NotesAppBar.LastUsedNotesAppBar.SelectedSection = null; NotesAppBar.LastUsedNotesAppBar.SelectedPage = null; NotesAppBar.LastUsedNotesAppBar.Close(); } }
private void NotebookDelete_Click(object sender, RoutedEventArgs e) { Notebook selectedNotebook = SelectedNotebook; NoteDatabase.Delete(selectedNotebook); SelectedNotebook = null; SelectedSection = null; SelectedPage = null; foreach (FrameworkElement each in notebookTabs.Items) { if (each.Tag == selectedNotebook) { int index = notebookTabs.Items.IndexOf(each); notebookTabs.Items.Remove(each); if (notebookTabs.HasItems) { if (index > 0) { ((ToggleButton)notebookTabs.Items[index - 1]).IsChecked = true; } else { ((ToggleButton)notebookTabs.Items[0]).IsChecked = true; } } else { SelectedNotebook = null; SelectedSection = null; SelectedPage = null; ShowEmptyWorkspaceMessage(); } break; } } if (NotesAppBar.LastUsedNotesAppBar != null && NotesAppBar.LastUsedNotesAppBar.SelectedNotebook.ID == selectedNotebook.ID) { NotesAppBar.LastUsedNotesAppBar.SelectedNotebook = null; NotesAppBar.LastUsedNotesAppBar.SelectedSection = null; NotesAppBar.LastUsedNotesAppBar.SelectedPage = null; NotesAppBar.LastUsedNotesAppBar.Close(); } }
void OnSaveButtonClicked(object sender, EventArgs e) { Note nuevaNota = new Note(); nuevaNota.Text = EditorNote.Text; nuevaNota.Date = DateTime.UtcNow; //Guardarlo en la BD. crearNote de este metodo. NoteDatabase DataBase = new NoteDatabase (Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "Notes.db3")); int Result = DataBase.CreatetNote(nuevaNota); if (Result == 1) { DisplayAlert("Aviso", $"Registro ingresado con exito.ID:{nuevaNota.ID}", "ok"); } Navigation.PopAsync(); }
private void dochecks() { //Login if (!IsLoggedIn) { var database = new NoteDatabase(); if (database.HasToken("Yammer")) { var t = database.GetToken("Yammer"); if (t != null) { _Token = t.Value; } Debug.WriteLine(_Token); } } if (IsLoggedIn) { MyCalendar.ImportCalendar(); } }
/// <summary> /// Save the active note, if any, and close it, showing a message for the notebook page /// being opened in another window. /// </summary> public void CloseActiveNote() { //await Save(); ShowNoteInUseMessage(); string pageId = SelectedPage.ID; string sectionId = SelectedSection.ID; string notebookId = SelectedNotebook.ID; SelectedPage = null; foreach (ToggleButton each in pageTabs.Items) { each.IsChecked = false; } if (NotesAppBar.LastUsedNotesAppBar != null) { NotesAppBar.LastUsedNotesAppBar.Closed += (s, e) => { // If the page still exists and we don't have any other page open, re-open it. if (SelectedPage == null && SelectedSection.ID == sectionId && SelectedNotebook.ID == notebookId) { foreach (ToggleButton each in pageTabs.Items) { if (((DatabaseObject)each.Tag).ID == pageId) { // Reload the note. each.Tag = NoteDatabase.GetPage(pageId); each.IsChecked = true; break; } } } } } ; }
protected override void OnExit(ExitEventArgs e) { base.OnExit(e); // // Save databases // AppointmentDatabase.OnSaveCompletedEvent -= AppointmentDatabase_OnSaveCompletedEvent; AppointmentDatabase.Save(); ContactDatabase.OnSaveCompletedEvent -= AppointmentDatabase_OnSaveCompletedEvent; ContactDatabase.Save(); TaskDatabase.OnSaveCompletedEvent -= TaskDatabase_OnSaveCompletedEvent; TaskDatabase.Save(); NoteDatabase.OnSaveCompletedEvent -= NoteDatabase_OnSaveCompletedEvent; NoteDatabase.Save(); SyncDatabase.OnSaveCompletedEvent -= SyncDatabase_OnSaveCompletedEvent; SyncDatabase.Save(); // // Unregister system hooks // SystemEvents.UserPreferenceChanged -= SystemEvents_UserPreferenceChanged; SystemEvents.TimeChanged -= SystemEvents_TimeChanged; // // Delete autorecover information // new RecoveryDatabase(RecoveryVersion.Current).Delete(); new RecoveryDatabase(RecoveryVersion.LastRun).Delete(); // // Install any updates which may have been downloaded. // string localPath = (new FileInfo(Process.GetCurrentProcess().MainModule.FileName)).DirectoryName; Process.Start(localPath + "\\UpdateManager.exe", "/update " + Process.GetCurrentProcess().Id.ToString()); }
public async Task Save() { NotebookPage selected = SelectedPage; if (selected != null) { if (document.HasContentChanged) { await selected.SetDetailsDocumentAsync(document.Document); } selected.LastModified = DateTime.UtcNow; NoteDatabase.UpdatePage(selected); //SelectedSection.LastSelectedPageID = selected.ID; SelectedSection.LastModified = DateTime.UtcNow; NoteDatabase.UpdateSection(SelectedSection); } else if (SelectedSection != null) { //SelectedSection.LastSelectedPageID = ""; SelectedSection.LastModified = DateTime.UtcNow; NoteDatabase.UpdateSection(SelectedSection); } if (SelectedNotebook != null) { //if (SelectedSection != null) // SelectedNotebook.LastSelectedSectionID = SelectedSection.ID; //else // SelectedNotebook.LastSelectedSectionID = ""; SelectedNotebook.LastModified = DateTime.UtcNow; NoteDatabase.UpdateNotebook(SelectedNotebook); } }
public void OnAppearing() { //Debug.WriteLine (id); var database = new NoteDatabase (); if (id > 0) { Who = database.GetPerson (id); } else { String fname = database.GetToken ("fname").Value; String lname = database.GetToken ("lname").Value; String email = database.GetToken ("email").Value; String phone = database.GetToken ("phone").Value; String org = database.GetToken ("org").Value; String uid = database.GetToken ("uid").Value; String profilepicture = database.GetToken ("profilepicture").Value; Who = new Person (fname, lname, email, phone, org, uid, profilepicture); } RaisePropertyChanged (() => Name); RaisePropertyChanged (() => Email); RaisePropertyChanged (() => Phone); RaisePropertyChanged (() => Org); RaisePropertyChanged (() => ProfilePicture); RaisePropertyChanged (() => EventView); }