Example #1
0
 public static void RemoveMyAnnotation(Annotation ann, 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.RemoveMyPenAnnotation(ann.BookID, ann.PageID, "iOS", ann.ModifiedUtc);
         };
         worker.RunWorkerCompleted += delegate
         {
             if (SetMyAnnotationEvent != null)
             {
                 SetMyAnnotationEvent(lastItem);
             }
         };
         worker.RunWorkerAsync();
     }
     catch (Exception ex)
     {
         Logger.WriteLineDebugging("SaveMyStuff - RemoveMyAnnotation: {0}", ex.ToString());
     }
 }
        public static void RemoveMyAnnotationFromCloud(String bookID, String pageID, DateTime modifiedUtc)
        {
            SaveMyStuff_2 client = GenerateSaveMyStuffClient();

            client.RemoveMyPenAnnotation(bookID, pageID, "iOS", modifiedUtc);
        }