public void Load() { db = new MorkDatabase(file); db.Read(); switch (account.Type) { case AccountType.Pop3: case AccountType.Imap: case AccountType.Rss: case AccountType.Nntp: case AccountType.MoveMail: db.EnumNamespace = "ns:msg:db:row:scope:msgs:all"; break; case AccountType.AddressBook: db.EnumNamespace = "ns:addrbk:db:row:scope:card:all"; break; } current = db.GetEnumerator(); }
public void LoadDatabase () { // Load the database file try { database = new MorkDatabase (uri.AbsolutePath); database.Read (); database.EnumNamespace = "ns:addrbk:db:row:scope:card:all"; } catch (Exception e) { MessageDialog dialog = new MessageDialog ( MainWindow, DialogFlags.DestroyWithParent, MessageType.Error, ButtonsType.Ok, false, String.Format (Catalog.GetString ("Unable to open mork database:\n\n {0}"), e.Message)); dialog.Run (); dialog.Destroy (); Environment.Exit (1); } // Populate the gui with nice stuff Clear (); FillContactList (); try { Match m = Regex.Match (uri.Query, @"\?id=(?<id>[0-9A-Fa-f]+)"); ShowContact (m.Result ("${id}")); } catch { Gtk.MessageDialog dialog = new MessageDialog ( MainWindow, DialogFlags.DestroyWithParent, MessageType.Warning, ButtonsType.Ok, Catalog.GetString ("The specified ID does not exist in this database!")); dialog.Run (); dialog.Destroy (); } }
public DatabaseEnumerator(MorkDatabase db, Account account, IEnumerator enumerator) { this.db = db; this.enumerator = enumerator; this.account = account; }
public DatabaseEnumerator (MorkDatabase db, Account account, IEnumerator enumerator) { this.db = db; this.enumerator = enumerator; this.account = account; }
public void Load () { db = new MorkDatabase (file); db.Read(); switch (account.Type) { case AccountType.Pop3: case AccountType.Imap: case AccountType.Rss: case AccountType.Nntp: case AccountType.MoveMail: db.EnumNamespace = "ns:msg:db:row:scope:msgs:all"; break; case AccountType.AddressBook: db.EnumNamespace = "ns:addrbk:db:row:scope:card:all"; break; } current = db.GetEnumerator (); }