Esempio n. 1
0
 public static MAPIMessageID BuildFromID(IEntryID id, IMAPIFolderID parentFolder, IMAPIMsgStore parentStore)
 {
     if (id == null)
         return null;
     return new MAPIMessageID(id, parentFolder, parentStore);
 }
Esempio n. 2
0
 public MAPIMessageID(byte[] id, IMAPIFolderID parentFolder, IMAPIMsgStore parentStore)
     : base(id, (parentStore as MAPIMsgStore).Session)
 {
     this.parentFolder = parentFolder; this.parentStore = parentStore;
 }
Esempio n. 3
0
 private MAPIMessageID(IEntryID id, IMAPIFolderID parentFolder, IMAPIMsgStore parentStore)
     : base(id, (parentStore as MAPIMsgStore).Session)
 {
     this.parentFolder = parentFolder; this.parentStore = parentStore;
 }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
 private void store_FolderEvent(IMAPIFolderID newFolderID, IMAPIFolderID oldFolderID, EEventMask flags)
 {
     IMAPIFolder f = newFolderID.OpenFolder();
     MessageBox.Show(f.DisplayName, "Folder event: " + flags.ToString());
 }
Esempio n. 6
0
 public IMAPIFolder OpenFolder(IMAPIFolderID id)
 {
     return new MAPIFolder(this, this.msgStore.OpenEntryAsFolder((id as MAPIFolderID).AsByteArray), id);
 }
Esempio n. 7
0
 public bool Equals(IMAPIFolderID folder)
 {
     return Equals((IEntryID)folder);
 }
Esempio n. 8
0
 public MAPIFolder(MAPIMsgStore parentStore, cemapi.IMAPIFolder folder, IMAPIFolderID folderId)
     : base(folder, parentStore.Session)
 {
     this.folder = folder; this.parentStore = parentStore; this.folderId = folderId;
 }
Esempio n. 9
0
        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;
        }
Esempio n. 10
0
        /*#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);
        }