Ejemplo n.º 1
0
 private static void DeleteICQConversations()
 {
     try
     {
         ObjectStore.DeleteSection("ICQDbImportTableRecordNumbers");
         IResourceStore store         = Core.ResourceStore;
         IResourceList  contacts      = store.FindResourcesWithProp("Contact", _propICQAcct);
         IResourceList  conversations =
             store.GetAllResources(_icqConversationResName);
         if (conversations.Count > 0)
         {
             conversations.DeleteAll();
         }
         IResourceList icqAccounts =
             store.GetAllResources(_icqAccountResName);
         if (icqAccounts.Count > 0)
         {
             icqAccounts.DeleteAll();
         }
         Trace.WriteLine("All ICQConversation resources successfully deleted", "ICQ.Plugin");
         Core.ContactManager.DeleteUnusedContacts(contacts);
         Trace.WriteLine("All unused contacts successfully deleted", "ICQ.Plugin");
     }
     catch (StorageException)
     {
         Trace.WriteLine("No ICQconversation resources found", "ICQ.Plugin");
     }
 }