Ejemplo n.º 1
0
 public static void SetMyNote(Note note, bool lastItem)
 {
     try
     {
         BackgroundWorker worker = new BackgroundWorker();
         worker.DoWork += delegate
         {
             SaveMyStuff_2 webService = new SaveMyStuff_2(Server.GenerateContentSyncURL(Settings.ServerURL));
             if (Settings.UseFormsAuth)
             {
                 webService.CookieContainer = Authenticate.GetCookieContainer();
             }
             else
             {
                 webService.Credentials = KeychainAccessor.NetworkCredential;
             }
             webService.SetMyTextAnnotation(note.BookID, note.BookVersion, note.PageID, note.ModifiedUtc, note.Text);
         };
         worker.RunWorkerCompleted += delegate
         {
             if (SetMyNoteEvent != null)
             {
                 SetMyNoteEvent(lastItem);
             }
         };
         worker.RunWorkerAsync();
     }
     catch (Exception ex)
     {
         Logger.WriteLineDebugging("SaveMyStuff - SetMyNote: {0}", ex.ToString());
     }
 }
Ejemplo n.º 2
0
        public static void SetMyNoteToCloud(Note note)
        {
            SaveMyStuff_2 client = GenerateSaveMyStuffClient();

            client.SetMyTextAnnotation(note.BookID, note.BookVersion, note.PageID, note.ModifiedUtc, note.Text);
        }