internal SearchScope GetSearchScope(OutlookModule outlookModule) { if (!this.MailboxSession.Mailbox.IsContentIndexingEnabled) { return(SearchScope.SelectedFolder); } switch (outlookModule) { case OutlookModule.Tasks: return((SearchScope)this[UserOptionPropertySchema.UserOptionPropertyID.TasksSearchScope]); case OutlookModule.Contacts: return((SearchScope)this[UserOptionPropertySchema.UserOptionPropertyID.ContactsSearchScope]); default: return((SearchScope)this[UserOptionPropertySchema.UserOptionPropertyID.SearchScope]); } }
// Token: 0x06000C4D RID: 3149 RVA: 0x00054A04 File Offset: 0x00052C04 private MostRecentlyUsedCategories(MasterCategoryList masterCategoryList, OutlookModule outlookModule) { Category[] array = masterCategoryList.ToArray(); Array.Sort <Category>(array, MasterCategoryList.CreateUsageBasedComparer(outlookModule)); int num = 10; if (array.Length < 10) { num = array.Length; } this.mostRecentCategories = new Category[num]; Array.Copy(array, this.mostRecentCategories, num); Array.Sort <Category>(this.mostRecentCategories, new MostRecentlyUsedCategories.CategoryNameComparer()); int num2 = array.Length - num; if (0 < num2) { this.otherCategories = new Category[num2]; Array.Copy(array, num, this.otherCategories, 0, num2); Array.Sort <Category>(this.otherCategories, new MostRecentlyUsedCategories.CategoryNameComparer()); } }
// Token: 0x06000C4C RID: 3148 RVA: 0x000549FA File Offset: 0x00052BFA public static MostRecentlyUsedCategories Create(MasterCategoryList masterCategoryList, OutlookModule outlookModule) { return(new MostRecentlyUsedCategories(masterCategoryList, outlookModule)); }
// Token: 0x060021C9 RID: 8649 RVA: 0x000C0E10 File Offset: 0x000BF010 internal void RenderSearch(Folder folder) { OutlookModule outlookModule = OutlookModule.None; SearchScope value = SearchScope.SelectedFolder; bool flag = false; bool flag2 = false; MailboxSession mailboxSession = base.UserContext.MailboxSession; if (folder != null) { outlookModule = Utilities.GetModuleForFolder(folder, base.UserContext); value = base.UserContext.UserOptions.GetSearchScope(outlookModule); mailboxSession = (folder.Session as MailboxSession); if (mailboxSession != null && mailboxSession.Mailbox.IsContentIndexingEnabled && folder.Id.ObjectId.Equals(base.UserContext.GetRootFolderId(mailboxSession))) { value = SearchScope.AllFoldersAndItems; } flag = Utilities.IsPublic(folder); if (!flag) { flag2 = Utilities.IsOtherMailbox(folder); } } this.Writer.Write("<div id=divSearchBox class=iactv "); this.Writer.Write("style=\"top:"); this.Writer.Write(this.SearchControlTop); this.Writer.Write("px;\">"); this.Writer.Write("<div id=divBasicSearch"); if (!this.FindBarOn) { this.Writer.Write(" style=\"display:none\""); } this.Writer.Write(">"); this.Writer.Write("<div id=divSearch"); this.Writer.Write(" iScp=\""); this.Writer.Write((int)value); this.Writer.Write("\""); if (this.RenderSearchDropDown) { this.Writer.Write(" sFldNm=\""); Utilities.HtmlEncode(this.ContainerName, this.Writer); this.Writer.Write("\" L_Fld=\""); this.Writer.Write(LocalizedStrings.GetHtmlEncoded(-41655958)); this.Writer.Write("\" L_FldSub=\""); this.Writer.Write(LocalizedStrings.GetHtmlEncoded(-444616176)); this.Writer.Write("\""); if (outlookModule == OutlookModule.Contacts || outlookModule == OutlookModule.Tasks) { this.Writer.Write(" L_Mod=\""); if (outlookModule == OutlookModule.Contacts) { this.Writer.Write(LocalizedStrings.GetHtmlEncoded(-1237143503)); } else { this.Writer.Write(LocalizedStrings.GetHtmlEncoded(-464657744)); } this.Writer.Write("\""); } else { this.Writer.Write(" L_FldAll=\""); if (Utilities.IsInArchiveMailbox(folder)) { string s = string.Format(CultureInfo.InvariantCulture, LocalizedStrings.GetNonEncoded(1451900553), new object[] { Utilities.GetMailboxOwnerDisplayName((MailboxSession)folder.Session) }); Utilities.HtmlEncode(s, this.Writer); } else { this.Writer.Write(LocalizedStrings.GetHtmlEncoded(-622081149)); } this.Writer.Write("\""); } } if (!this.AllowAdvancedSearch) { this.Writer.Write(" style=\""); this.Writer.Write(base.UserContext.IsRtl ? "left:" : "right:"); this.Writer.Write("5px;\">"); } this.Writer.Write(">"); this.Writer.Write("<div id=divTxt class=\""); this.Writer.Write((this.RenderSearchDropDown && folder != null && !Utilities.IsOtherMailbox(folder)) ? "txtBox" : "txtBoxNoScope"); this.Writer.Write("\">"); this.Writer.Write("<input type=text maxlength=256 id=txtS"); if (this.RenderSearchDropDown) { string s2; switch (value) { case SearchScope.SelectedFolder: s2 = string.Format(CultureInfo.InvariantCulture, LocalizedStrings.GetNonEncoded(-41655958), new object[] { this.ContainerName }); goto IL_442; case SearchScope.SelectedAndSubfolders: s2 = string.Format(CultureInfo.InvariantCulture, LocalizedStrings.GetNonEncoded(-444616176), new object[] { this.ContainerName }); goto IL_442; case SearchScope.AllItemsInModule: if (outlookModule == OutlookModule.Contacts) { s2 = LocalizedStrings.GetNonEncoded(-1237143503); goto IL_442; } s2 = LocalizedStrings.GetNonEncoded(-464657744); goto IL_442; } if (Utilities.IsInArchiveMailbox(folder)) { s2 = string.Format(CultureInfo.InvariantCulture, LocalizedStrings.GetNonEncoded(1451900553), new object[] { Utilities.GetMailboxOwnerDisplayName((MailboxSession)folder.Session) }); } else { s2 = LocalizedStrings.GetNonEncoded(-622081149); } IL_442: this.Writer.Write(" class=inactv fScp=1 value=\""); Utilities.HtmlEncode(s2, this.Writer); this.Writer.Write("\""); } this.Writer.Write("></div>"); this.Writer.Write("<div "); if (folder != null && Utilities.IsOtherMailbox(folder)) { this.Writer.Write("class=\"sImgb iactv\" "); } else { this.Writer.Write("class=\"sImg iactv\" "); } if (!this.RenderSearchDropDown) { this.Writer.Write(" style=\""); this.Writer.Write(base.UserContext.IsRtl ? "left:" : "right:"); this.Writer.Write("0px;\""); } this.Writer.Write("id=divSIcon>"); base.UserContext.RenderThemeImage(this.Writer, ThemeFileId.Search, null, new object[] { "id=imgS" }); this.Writer.Write("</div>"); if (folder == null || !Utilities.IsOtherMailbox(folder)) { this.Writer.Write("<div id=divSScp class=iactv"); this.Writer.Write(this.RenderSearchDropDown ? ">" : " style=\"display:none\">"); base.UserContext.RenderThemeImage(this.Writer, ThemeFileId.DownButton3); this.Writer.Write("</div>"); } this.Writer.Write("</div>"); if (this.AllowAdvancedSearch) { this.Writer.Write("<div id=divASChevron>"); base.UserContext.RenderThemeImage(this.Writer, ThemeFileId.Expand, null, new object[] { "id=imgSAS", "title=\"" + LocalizedStrings.GetHtmlEncoded(903934295) + "\"" }); base.UserContext.RenderThemeImage(this.Writer, ThemeFileId.Collapse, null, new object[] { "id=imgHAS", "style=display:none", "title=\"" + LocalizedStrings.GetHtmlEncoded(-5515128) + "\"" }); this.Writer.Write("</div>"); } this.Writer.Write("</div>"); this.Writer.Write("<div id=divAS style=\"display:none;\">"); if (this is FolderListViewSubPage && !flag && !mailboxSession.Mailbox.IsContentIndexingEnabled && !flag2) { this.Writer.Write("<div id=divDsblCI style=\"display:none\">"); RenderingUtilities.RenderError(base.UserContext, this.Writer, -485624509); this.Writer.Write("</div>"); } this.Writer.Write("</div>"); this.Writer.Write("</div>"); }
internal SearchScopeMenu(UserContext userContext, OutlookModule outlookModule, string archiveName) : base("divScpMnu", userContext, false) { this.outlookModule = outlookModule; this.archiveName = archiveName; }
// Token: 0x06001FD1 RID: 8145 RVA: 0x000B820B File Offset: 0x000B640B private DefaultSearchScopeMenu(UserContext userContext, OutlookModule outlookModule, string archiveName) : base("divDftScpMnu", userContext, true) { this.outlookModule = outlookModule; this.archiveName = archiveName; }
// Token: 0x06001FD0 RID: 8144 RVA: 0x000B8201 File Offset: 0x000B6401 internal static DefaultSearchScopeMenu Create(UserContext userContext, OutlookModule outlookModule, string archiveName) { return(new DefaultSearchScopeMenu(userContext, outlookModule, archiveName)); }
public UsageBasedCategoryComparer(OutlookModule module) { this.module = module; }
public CategoryUsageRecord(string categoryName, OutlookModule moduleForItem) { this.CategoryName = categoryName; this.ModuleForItem = moduleForItem; }
public static IComparer <Category> CreateUsageBasedComparer(OutlookModule module) { EnumValidator.ThrowIfInvalid <OutlookModule>(module); return(new MasterCategoryList.UsageBasedCategoryComparer(module)); }