private void FilterBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            string text = FilterBox.Text;

            NotesDataModel.FilterUsesContains = true;
            NotesDataModel.Filter             = text;
            NotesDataModel.RunFilter();
            NotesTable.ItemsSource = String.IsNullOrEmpty(text) ? NotesDataModel.Notes : NotesDataModel.FilteredNotes;
        }
 private async void Logout(object sender, RoutedEventArgs e)
 {
     NotesDataModel.ClearSmartStore();
     if (SDKManager.GlobalClientManager != null)
     {
         await SDKManager.GlobalClientManager.Logout();
     }
     AccountManager.SwitchAccount();
 }
 private NotesModel GetNotes(NotesDataModel notesData)
 {
     return(new NotesModel()
     {
         Title = notesData.Title,
         Description = notesData.Description,
         CreationDate = System.IO.File.GetLastWriteTime(_folder.Path + "\\" + notesData.Title).ToString("dd MM H:mm:ss"),
         IsFavorite = Convert.ToBoolean(notesData.Favorite)
     });
 }
 public async Task SaveNotesAsync(string title, string description, string isFavorite)
 {
     var newNotesDataModel = new NotesDataModel
     {
         Title       = title,
         Description = description,
         Favorite    = isFavorite
     };
     var content = JsonConvert.SerializeObject(newNotesDataModel);
     await _localStorage.SaveFilesToStorageAsync(title, content);
 }
 private void NotesDataModel_ContactsSynced(object sender, PropertyChangedEventArgs e)
 {
     if (_firstSync && NotesDataModel.Notes.Count == 0)
     {
         _firstSync = false;
         NotesDataModel.SyncDownNotes();
     }
     else
     {
         MessageFlyout.Hide();
     }
 }
 private void Synchronize(object sender, RoutedEventArgs e)
 {
     DisplayProgressFlyout("Synchronizing Data...");
     try
     {
         NotesDataModel.SyncUpNotes();
     }
     catch (Exception)
     {
         NotesDataModel.RegisterSoup();
     }
 }
 private void ClearSearch(object sender, RoutedEventArgs e)
 {
     NotesDataModel.Filter = String.Empty;
     NotesDataModel.RunFilter();
 }