public static MAPIMessageID BuildFromID(IEntryID id, IMAPIFolderID parentFolder, IMAPIMsgStore parentStore) { if (id == null) return null; return new MAPIMessageID(id, parentFolder, parentStore); }
public MAPIMessageID(byte[] id, IMAPIFolderID parentFolder, IMAPIMsgStore parentStore) : base(id, (parentStore as MAPIMsgStore).Session) { this.parentFolder = parentFolder; this.parentStore = parentStore; }
private MAPIMessageID(IEntryID id, IMAPIFolderID parentFolder, IMAPIMsgStore parentStore) : base(id, (parentStore as MAPIMsgStore).Session) { this.parentFolder = parentFolder; this.parentStore = parentStore; }
public WPSMSExt() { _smsList = new List<MessagingItems>(); _mapi = new MAPI(); var stores = _mapi.MessageStores; for (int i = 0, length = stores.Length; i < length; i++) { var store = stores[i]; if (store.ToString() == "SMS") _storeSMS = store; } _receiveFolder = _storeSMS.ReceiveFolder; Caption = "Messages".Localize(); }
private void store_FolderEvent(IMAPIFolderID newFolderID, IMAPIFolderID oldFolderID, EEventMask flags) { IMAPIFolder f = newFolderID.OpenFolder(); MessageBox.Show(f.DisplayName, "Folder event: " + flags.ToString()); }
public IMAPIFolder OpenFolder(IMAPIFolderID id) { return new MAPIFolder(this, this.msgStore.OpenEntryAsFolder((id as MAPIFolderID).AsByteArray), id); }
public bool Equals(IMAPIFolderID folder) { return Equals((IEntryID)folder); }
public MAPIFolder(MAPIMsgStore parentStore, cemapi.IMAPIFolder folder, IMAPIFolderID folderId) : base(folder, parentStore.Session) { this.folder = folder; this.parentStore = parentStore; this.folderId = folderId; }
public IMAPIFolderID[] GetSubFolders(int maxNum) { cemapi.IMAPITable hierarchy = this.Hierarchy; hierarchy.SetColumns(new cemapi.PropTags[] { cemapi.PropTags.PR_ENTRYID }); int available = this.NumSubFolders; if (maxNum > available) maxNum = (int)available; IMAPIFolderID[] folders = new IMAPIFolderID[maxNum]; int current = 0; while (maxNum > 0) { int num = maxNum > cemapi.MaxQueryRowCount ? cemapi.MaxQueryRowCount : maxNum; cemapi.SRow[] rows = hierarchy.QueryRows(num); for (int i = 0; i < num; i++) folders[i + current] = new MAPIFolderID(rows[i].propVals[0].AsBinary, this.parentStore); //folders[i + current] = new MAPIFolder(this.parentStore, this, this.folder.OpenEntryAsFolder(rows[i].propVals[0].AsBinary)); current += cemapi.MaxQueryRowCount; maxNum -= num; } return folders; }
/*#region Operators public static bool operator ==(MAPIFolder a, MAPIFolder b) { if (((object)a) == null || ((object)b) == null) return false; return a.EntryID.Equals(b.EntryID); } public static bool operator !=(MAPIFolder a, MAPIFolder b) { return !(a == b); } public override bool Equals(object obj) { if (obj == null) return false; return ((MAPIFolder)obj == this); } public override int GetHashCode() { return this.EntryID.GetHashCode(); } #endregion*/ public bool Equals(IMAPIFolderID folder) { return folder.Equals(this.FolderID); }