Beispiel #1
0
        // Token: 0x0600212A RID: 8490 RVA: 0x000BE800 File Offset: 0x000BCA00
        internal static FlagAction GetFlagActionForItem(UserContext userContext, Item item)
        {
            FlagStatus property  = ItemUtility.GetProperty <FlagStatus>(item, ItemSchema.FlagStatus, FlagStatus.NotFlagged);
            ExDateTime property2 = ItemUtility.GetProperty <ExDateTime>(item, ItemSchema.UtcDueDate, ExDateTime.MinValue);

            return(FlagContextMenu.GetFlagActionForItem(userContext, property2, property));
        }
Beispiel #2
0
        protected void RenderFlagState(TextWriter writer)
        {
            FlagStatus flagStatus   = this.DataSource.GetItemProperty <FlagStatus>(ItemSchema.FlagStatus, FlagStatus.NotFlagged);
            int        itemProperty = this.DataSource.GetItemProperty <int>(ItemSchema.ItemColor, int.MinValue);
            bool       flag         = ObjectClass.IsTask(this.DataSource.GetItemClass());

            if (flag)
            {
                if (this.DataSource.GetItemProperty <bool>(ItemSchema.IsComplete, false))
                {
                    flagStatus = FlagStatus.Complete;
                }
                else
                {
                    flagStatus = FlagStatus.Flagged;
                }
            }
            if (flagStatus != FlagStatus.NotFlagged)
            {
                ExDateTime itemProperty2 = this.DataSource.GetItemProperty <ExDateTime>(ItemSchema.UtcDueDate, ExDateTime.MinValue);
                if (itemProperty2 != ExDateTime.MinValue)
                {
                    writer.Write(" sFlgDt=\"");
                    writer.Write(DateTimeUtilities.GetJavascriptDate(itemProperty2));
                    writer.Write("\"");
                }
                FlagAction flagActionForItem = FlagContextMenu.GetFlagActionForItem(base.UserContext, itemProperty2, flagStatus);
                writer.Write(" sFA=");
                writer.Write((int)flagActionForItem);
                if (itemProperty == -2147483648 && flagStatus == FlagStatus.Flagged && !flag)
                {
                    writer.Write(" sFS=1");
                }
            }
        }
        // Token: 0x06001F51 RID: 8017 RVA: 0x000B43CC File Offset: 0x000B25CC
        private void RenderConversationMetaDataExpandos(TextWriter writer, int globalCount, IList <StoreObjectId> itemIds)
        {
            base.InternalRenderItemMetaDataExpandos(writer);
            int itemProperty = this.DataSource.GetItemProperty <int>(ConversationItemSchema.ConversationUnreadMessageCount, 0);

            writer.Write(" ");
            writer.Write("iUC");
            writer.Write("=");
            writer.Write(itemProperty);
            int itemProperty2 = this.DataSource.GetItemProperty <int>(ConversationItemSchema.ConversationMessageCount, 0);

            writer.Write(" ");
            writer.Write("iTC");
            writer.Write("=");
            writer.Write(itemProperty2);
            writer.Write(" ");
            writer.Write("iGC");
            writer.Write("=");
            writer.Write(globalCount);
            if (itemIds.Count > 0)
            {
                writer.Write(" ");
                writer.Write("sMID");
                writer.Write("=\"");
                Utilities.HtmlEncode(Utilities.GetItemIdString(itemIds[0], this.parentFolderId), writer);
                writer.Write("\"");
            }
            if (globalCount == 1)
            {
                string[] itemProperty3 = this.DataSource.GetItemProperty <string[]>(ConversationItemSchema.ConversationGlobalMessageClasses, null);
                if (base.UserContext.DraftsFolderId.Equals(this.parentFolderId.StoreObjectId))
                {
                    writer.Write(" ");
                    writer.Write("sMS");
                    writer.Write("=\"Draft\"");
                }
                writer.Write(" ");
                writer.Write("sMT");
                writer.Write("=\"");
                Utilities.HtmlEncode(itemProperty3[0], writer);
                writer.Write("\"");
                if (ObjectClass.IsMeetingRequest(itemProperty3[0]))
                {
                    writer.Write(" fMR=1");
                    writer.Write(" fRR=1");
                }
            }
            if (itemProperty > 0)
            {
                writer.Write(" ");
                writer.Write("read");
                writer.Write("=\"0\"");
            }
            FlagStatus itemProperty4 = (FlagStatus)this.DataSource.GetItemProperty <int>(ConversationItemSchema.ConversationFlagStatus, 0);

            if (itemProperty4 != FlagStatus.NotFlagged)
            {
                ExDateTime itemProperty5 = this.DataSource.GetItemProperty <ExDateTime>(ConversationItemSchema.ConversationFlagCompleteTime, ExDateTime.MinValue);
                if (itemProperty5 != ExDateTime.MinValue)
                {
                    writer.Write(" sFlgDt=\"");
                    writer.Write(DateTimeUtilities.GetJavascriptDate(itemProperty5));
                    writer.Write("\"");
                }
                FlagAction flagActionForItem = FlagContextMenu.GetFlagActionForItem(base.UserContext, itemProperty5, itemProperty4);
                writer.Write(" sFA=");
                writer.Write((int)flagActionForItem);
            }
            if (this.RenderLastModifiedTime)
            {
                base.RenderLastModifiedTimeExpando(writer);
            }
        }