// Token: 0x06002EBF RID: 11967 RVA: 0x0010C6C0 File Offset: 0x0010A8C0
		private void ProcessOwaConditionAdvisors()
		{
			Dictionary<OwaStoreObjectId, OwaConditionAdvisor> conditionAdvisorTable = base.UserContext.NotificationManager.ConditionAdvisorTable;
			if (conditionAdvisorTable != null)
			{
				OwaStoreObjectId remindersSearchFolderOwaId = base.UserContext.RemindersSearchFolderOwaId;
				bool flag = false;
				IDictionaryEnumerator dictionaryEnumerator = conditionAdvisorTable.GetEnumerator();
				while (dictionaryEnumerator.MoveNext())
				{
					OwaConditionAdvisor owaConditionAdvisor = (OwaConditionAdvisor)dictionaryEnumerator.Value;
					OwaStoreObjectId folderId = owaConditionAdvisor.FolderId;
					try
					{
						MailboxSession mailboxSession = folderId.GetSession(base.UserContext) as MailboxSession;
						if (mailboxSession != null)
						{
							bool flag2 = owaConditionAdvisor.IsConditionTrue(mailboxSession);
							if (base.UserContext.UserOptions.EnableReminders && !flag && folderId.Equals(remindersSearchFolderOwaId))
							{
								flag = flag2;
							}
							if (flag2 || owaConditionAdvisor.IsRecycled)
							{
								if (!folderId.Equals(remindersSearchFolderOwaId))
								{
									this.Writer.Write("stDrty(\"");
									Utilities.JavascriptEncode(folderId.ToBase64String(), this.Writer);
									this.Writer.Write("\");");
								}
								owaConditionAdvisor.ResetCondition(mailboxSession);
								owaConditionAdvisor.IsRecycled = false;
							}
						}
					}
					catch (ObjectNotFoundException)
					{
					}
				}
				if (base.UserContext.UserOptions.EnableReminders)
				{
					this.ProcessReminders(flag);
				}
			}
		}
Ejemplo n.º 2
0
 // Token: 0x06002240 RID: 8768 RVA: 0x000C3048 File Offset: 0x000C1248
 internal bool SelectSpecifiedFolder(OwaStoreObjectId folderId)
 {
     foreach (TreeNode treeNode in this.Children)
     {
         FolderTreeNode folderTreeNode = treeNode as FolderTreeNode;
         if (folderTreeNode != null && folderId.Equals(folderTreeNode.FolderId))
         {
             folderTreeNode.Selected = true;
             return(true);
         }
         if (treeNode.SelectSpecifiedFolder(folderId))
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 3
0
        private void LoadFolderViewStates(CalendarFolder advicedFolder, ref ExDateTime[] days, ref CalendarViewType viewType, out int viewWidth, out ReadingPanePosition readingPanePosition)
        {
            OwaStoreObjectId owaStoreObjectId = null;

            if (advicedFolder != null)
            {
                owaStoreObjectId = OwaStoreObjectId.CreateFromStoreObject(advicedFolder);
            }
            if (owaStoreObjectId != null && (owaStoreObjectId.Equals(this.UserContext.CalendarFolderOwaId) || owaStoreObjectId.IsPublic))
            {
                CalendarAdapter.InternalGetFolderViewStates(this.UserContext, advicedFolder, ref days, ref viewType, out viewWidth, out readingPanePosition);
                return;
            }
            using (CalendarFolder folderForContent = Utilities.GetFolderForContent <CalendarFolder>(this.UserContext, this.UserContext.CalendarFolderOwaId, CalendarUtilities.FolderViewProperties))
            {
                CalendarAdapter.InternalGetFolderViewStates(this.UserContext, folderForContent, ref days, ref viewType, out viewWidth, out readingPanePosition);
            }
        }
Ejemplo n.º 4
0
        public static IList <TargetFolderMRUEntry> AddAndGetFolders(OwaStoreObjectId folderId, UserContext userContext)
        {
            SimpleConfiguration <TargetFolderMRUEntry> simpleConfiguration = new SimpleConfiguration <TargetFolderMRUEntry>(userContext);

            simpleConfiguration.Load();
            bool flag = false;
            ReadOnlyCollection <TargetFolderMRUEntry> result = new ReadOnlyCollection <TargetFolderMRUEntry>(simpleConfiguration.Entries);

            while (simpleConfiguration.Entries.Count > 10)
            {
                simpleConfiguration.Entries.RemoveAt(10);
                flag = true;
            }
            int i = 0;

            while (i < simpleConfiguration.Entries.Count)
            {
                OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromString(simpleConfiguration.Entries[i].FolderId);
                if (owaStoreObjectId.Equals(folderId))
                {
                    if (i == 0)
                    {
                        if (flag)
                        {
                            simpleConfiguration.Save();
                        }
                        return(result);
                    }
                    simpleConfiguration.Entries.RemoveAt(i);
                    break;
                }
                else
                {
                    i++;
                }
            }
            if (simpleConfiguration.Entries.Count == 10)
            {
                simpleConfiguration.Entries.RemoveAt(9);
            }
            simpleConfiguration.Entries.Insert(0, new TargetFolderMRUEntry(folderId));
            simpleConfiguration.Save();
            return(result);
        }
Ejemplo n.º 5
0
 // Token: 0x06002FAE RID: 12206 RVA: 0x00114FF8 File Offset: 0x001131F8
 private void RenderFolderTreeChangedNode(OwaStoreObjectId parentFolderId, OwaStoreObjectId newFolderId, bool isExpanded, bool updateFolderId, FolderTreeRenderType renderType)
 {
     this.Writer.Write("<div id=tn");
     if (base.UserContext.ArchiveAccessed && parentFolderId.Equals(base.UserContext.GetArchiveRootFolderId()))
     {
         this.Writer.Write(" archiveroot=\"1\"");
         MailboxSession mailboxSession = parentFolderId.GetSession(base.UserContext) as MailboxSession;
         if (mailboxSession != null && mailboxSession.MailboxOwner.MailboxInfo.IsRemote)
         {
             this.Writer.Write(" isremote=\"1\"");
         }
     }
     if (updateFolderId)
     {
         this.Writer.Write(" ufid=\"f");
         Utilities.HtmlEncode(parentFolderId.ToString(), this.Writer);
         this.Writer.Write("\"");
     }
     this.Writer.Write(">");
     if (isExpanded)
     {
         this.RenderSiblingNodes(parentFolderId, newFolderId, renderType);
     }
     else
     {
         if (newFolderId == null)
         {
             throw new ArgumentNullException("newFolderId");
         }
         FolderTreeNode folderTreeNode = FolderTreeNode.Load(base.UserContext, newFolderId, renderType);
         if (folderTreeNode != null)
         {
             FolderTreeNode folderTreeNode2 = folderTreeNode;
             folderTreeNode2.CustomAttributes += " _NF=1";
             folderTreeNode.RenderUndecoratedNode(this.Writer);
         }
     }
     this.Writer.Write("</div>");
 }
Ejemplo n.º 6
0
        protected void RenderData(CalendarViewBase view, OwaStoreObjectId selectedItemId)
        {
            bool flag = true;
            int  num  = 0;

            if (view.RemovedItemCount > 0)
            {
                this.itemIndex = new Hashtable();
            }
            else
            {
                this.itemIndex = null;
            }
            this.selectedItemIndex = -1;
            TimeSpan       t = TimeSpan.MinValue;
            PositionInTime positionInTime = PositionInTime.None;
            int            num2           = 0;

            for (int i = 0; i < view.DataSource.Count; i++)
            {
                if (!view.IsItemRemoved(i))
                {
                    bool             flag2  = false;
                    OwaStoreObjectId itemId = view.DataSource.GetItemId(i);
                    if (view.DataSource.SharedType != SharedType.None)
                    {
                        flag2 = view.DataSource.IsPrivate(i);
                    }
                    if (!flag)
                    {
                        this.output.Write(",");
                    }
                    flag = false;
                    num2++;
                    if (this.itemIndex != null)
                    {
                        this.itemIndex[i] = num;
                        num++;
                    }
                    ExDateTime startTime = view.DataSource.GetStartTime(i);
                    ExDateTime endTime   = view.DataSource.GetEndTime(i);
                    if (flag2)
                    {
                        this.RenderPrivateAppointmentData(startTime, endTime);
                    }
                    else
                    {
                        this.RenderAppointmentData(view, i, startTime, endTime);
                    }
                    if (!flag2)
                    {
                        if (selectedItemId != null)
                        {
                            if (selectedItemId.Equals(itemId))
                            {
                                this.selectedItemIndex = ((this.itemIndex != null) ? ((int)this.itemIndex[i]) : i);
                            }
                        }
                        else
                        {
                            bool           flag3     = false;
                            TimeSpan       timeSpan  = TimeSpan.MinValue;
                            ExDateTime     localTime = DateTimeUtilities.GetLocalTime();
                            PositionInTime positionInTime2;
                            if (endTime < localTime)
                            {
                                positionInTime2 = PositionInTime.Past;
                            }
                            else if (startTime > localTime)
                            {
                                positionInTime2 = PositionInTime.Future;
                            }
                            else
                            {
                                positionInTime2 = PositionInTime.Present;
                            }
                            if (positionInTime2 == PositionInTime.Past)
                            {
                                timeSpan = localTime - endTime;
                                if (positionInTime == PositionInTime.Past)
                                {
                                    if (timeSpan < t)
                                    {
                                        flag3 = true;
                                    }
                                }
                                else if (positionInTime == PositionInTime.None)
                                {
                                    flag3 = true;
                                }
                            }
                            else if (positionInTime2 == PositionInTime.Present)
                            {
                                timeSpan = endTime - localTime;
                                if (positionInTime == PositionInTime.Present)
                                {
                                    if (timeSpan < t)
                                    {
                                        flag3 = true;
                                    }
                                }
                                else
                                {
                                    flag3 = true;
                                }
                            }
                            else if (positionInTime2 == PositionInTime.Future)
                            {
                                timeSpan = startTime - localTime;
                                if (positionInTime == PositionInTime.Future)
                                {
                                    timeSpan = startTime - localTime;
                                    if (timeSpan < t)
                                    {
                                        flag3 = true;
                                    }
                                }
                                else if (positionInTime == PositionInTime.Past || positionInTime == PositionInTime.None)
                                {
                                    flag3 = true;
                                }
                            }
                            if (flag3)
                            {
                                this.selectedItemIndex = ((this.itemIndex != null) ? ((int)this.itemIndex[i]) : i);
                                t = timeSpan;
                                positionInTime = positionInTime2;
                            }
                        }
                    }
                }
            }
        }