示例#1
0
        public override void AddContentTableColumns(NamedTableContext contentsTable)
        {
            base.AddContentTableColumns(contentsTable);

            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidSideEffects, PropertyTypeName.PtypInteger32);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidHeaderItem, PropertyTypeName.PtypInteger32);
        }
示例#2
0
        public override void AddContentTableColumns(NamedTableContext contentsTable)
        {
            base.AddContentTableColumns(contentsTable);

            contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagCreationTime, PropertyTypeName.PtypTime);

            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidRecurring, PropertyTypeName.PtypBoolean);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentEndWhole, PropertyTypeName.PtypTime);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidSideEffects, PropertyTypeName.PtypInteger32);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidHeaderItem, PropertyTypeName.PtypInteger32);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentStateFlags, PropertyTypeName.PtypInteger32);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidFInvited, PropertyTypeName.PtypBoolean);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentColor, PropertyTypeName.PtypInteger32);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidTimeZoneStruct, PropertyTypeName.PtypBinary);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidLocation, PropertyTypeName.PtypString);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidReminderSet, PropertyTypeName.PtypBoolean);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentRecur, PropertyTypeName.PtypBinary);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentSubType, PropertyTypeName.PtypBoolean);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidBusyStatus, PropertyTypeName.PtypInteger32);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentStartWhole, PropertyTypeName.PtypTime);
            contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidMeetingWorkspaceUrl, PropertyTypeName.PtypString);

            if (this.File.WriterCompatibilityMode >= WriterCompatibilityMode.Outlook2010RTM)
            {
                contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidTimeZoneDescription, PropertyTypeName.PtypString);
                contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentTimeZoneDefinitionRecur, PropertyTypeName.PtypBinary);
                contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentTimeZoneDefinitionStartDisplay, PropertyTypeName.PtypBinary);
                contentsTable.AddPropertyColumnIfNotExist(PropertyNames.PidLidAppointmentTimeZoneDefinitionEndDisplay, PropertyTypeName.PtypBinary);
            }
        }
示例#3
0
 /// <summary>
 /// Add columns if not exist
 /// </summary>
 public virtual void AddContentTableColumns(NamedTableContext contentsTable)
 {
     contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagIconIndex, PropertyTypeName.PtypInteger32);
     contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagSearchKey, PropertyTypeName.PtypBinary);
     contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagInternetMessageId, PropertyTypeName.PtypString);
     contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagFlagStatus, PropertyTypeName.PtypInteger32);
     contentsTable.AddPropertyColumnIfNotExist(PropertyID.PidTagReplyTime, PropertyTypeName.PtypTime);
 }
示例#4
0
 public NamedTableContext GetContentsTable()
 {
     if (m_contentsTable == null)
     {
         PSTNode node = GetContentsTableNode();
         m_contentsTable = node.NamedTableContext;
     }
     return(m_contentsTable);
 }
示例#5
0
        public byte[] GetMessageBytesProperty(int rowIndex, PropertyName propertyName)
        {
            NamedTableContext tc = GetContentsTable();
            int columnIndex      = tc.FindColumnIndexByPropertyTag(propertyName, PropertyTypeName.PtypBinary);

            if (columnIndex >= 0)
            {
                return(tc.GetBytesProperty(rowIndex, columnIndex));
            }
            else
            {
                return(GetMessage(rowIndex).PC.GetBytesProperty(propertyName));
            }
        }
示例#6
0
        public string GetMessageStringProperty(int rowIndex, PropertyName propertyName)
        {
            NamedTableContext tc = GetContentsTable();
            int columnIndex      = tc.FindColumnIndexByPropertyTag(propertyName, PropertyTypeName.PtypString);

            if (columnIndex >= 0)
            {
                return(tc.GetStringProperty(rowIndex, columnIndex));
            }
            else
            {
                return(GetMessage(rowIndex).PC.GetStringProperty(propertyName));
            }
        }
示例#7
0
        public Nullable <DateTime> GetMessageDateTimeProperty(int rowIndex, PropertyName propertyName)
        {
            NamedTableContext tc = GetContentsTable();
            int columnIndex      = tc.FindColumnIndexByPropertyTag(propertyName, PropertyTypeName.PtypTime);

            if (columnIndex >= 0)
            {
                return(tc.GetDateTimeProperty(rowIndex, columnIndex));
            }
            else
            {
                return(GetMessage(rowIndex).PC.GetDateTimeProperty(propertyName));
            }
        }
示例#8
0
        public Nullable <bool> GetMessageBooleanProperty(int rowIndex, PropertyID propertyID)
        {
            NamedTableContext tc = GetContentsTable();
            int columnIndex      = tc.FindColumnIndexByPropertyTag(propertyID, PropertyTypeName.PtypBoolean);

            if (columnIndex >= 0)
            {
                return(tc.GetBooleanProperty(rowIndex, columnIndex));
            }
            else
            {
                return(GetMessage(rowIndex).PC.GetBooleanProperty(propertyID));
            }
        }
示例#9
0
        /// <summary>
        /// Dissociate a message from this folder
        /// </summary>
        public void RemoveMessage(MessageObject message)
        {
            NamedTableContext contentsTable = GetContentsTable();
            int rowIndex = contentsTable.GetRowIndex(message.NodeID.Value);

            if (rowIndex >= 0)
            {
                int contentCount = PC.GetInt32Property(PropertyID.PidTagContentCount).Value;
                contentCount--;

                PC.SetInt32Property(PropertyID.PidTagContentCount, contentCount);
                // Changes to the PC must be saved later

                // update hierarchy table of parent (will be saved during SaveChanges):
                m_contentCount = contentCount;

                // Update contents table (will be saved during SaveChanges)
                contentsTable.DeleteRow(rowIndex);
            }
        }
示例#10
0
        public void AddMessage(MessageObject message)
        {
            int contentCount = PC.GetInt32Property(PropertyID.PidTagContentCount).Value;

            contentCount++;

            PC.SetInt32Property(PropertyID.PidTagContentCount, contentCount);
            // Changes to the PC must be saved later

            // update hierarchy table of parent (will be saved during SaveChanges):
            m_contentCount = contentCount;

            // Update contents table (will be saved during SaveChanges)
            NamedTableContext contentsTable = GetContentsTable();

            AddContentTableColumns(contentsTable);

            int rowIndex = contentsTable.AddRow(message.NodeID.Value);

            UpdateMessage(message, contentsTable, rowIndex);

            this.File.SearchManagementQueue.AddMessage(message.NodeID, this.NodeID);
        }