// Token: 0x06002543 RID: 9539 RVA: 0x000D7898 File Offset: 0x000D5A98 protected override void RenderButtons() { ToolbarButtonFlags flags = ToolbarButtonFlags.None; if (!ReadContactToolbar.CanMailToContact(this.contact)) { flags = ToolbarButtonFlags.Disabled; } base.RenderButton(ToolbarButtons.NewMessageToContact, flags); if (base.UserContext.IsFeatureEnabled(Feature.Calendar)) { base.RenderButton(ToolbarButtons.NewMeetingRequestToContact, flags); } if (base.UserContext.IsSmsEnabled) { base.RenderButton(ToolbarButtons.SendATextMessage); } ToolbarButtonFlags flags2 = ToolbarButtonFlags.None; if (!ItemUtility.UserCanDeleteItem(this.contact)) { flags2 = ToolbarButtonFlags.Disabled; } base.RenderButton(ToolbarButtons.Delete, flags2); }
// Token: 0x060003CE RID: 974 RVA: 0x00021E4A File Offset: 0x0002004A public ToolbarButton(string command, ToolbarButtonFlags flags, Strings.IDs textId, ThemeFileId image) { this.command = command; this.flags = flags; this.textId = textId; this.image = image; }
// Token: 0x06002105 RID: 8453 RVA: 0x000BDF9C File Offset: 0x000BC19C protected override void RenderButtons() { base.RenderHelpButton(HelpIdsLight.MailLight.ToString(), string.Empty); base.RenderButton(ToolbarButtons.Post); base.RenderButton(ToolbarButtons.AttachFile); base.RenderButton(ToolbarButtons.ImportanceHigh, (this.initialImportance == Importance.High) ? ToolbarButtonFlags.Pressed : ToolbarButtonFlags.None); base.RenderButton(ToolbarButtons.ImportanceLow, (this.initialImportance == Importance.Low) ? ToolbarButtonFlags.Pressed : ToolbarButtonFlags.None); base.RenderButton(ToolbarButtons.Flag); base.RenderButton(ToolbarButtons.Categories); if (base.UserContext.IsFeatureEnabled(Feature.Signature)) { base.RenderButton(ToolbarButtons.InsertSignature); } bool flag = base.UserContext.BrowserType == BrowserType.IE; if (flag) { ToolbarButtonFlags flags = ToolbarButtonFlags.None; if (!base.UserContext.IsFeatureEnabled(Feature.SpellChecker)) { flags = ToolbarButtonFlags.Disabled; } base.RenderButton(ToolbarButtons.SpellCheck, flags, new Toolbar.RenderMenuItems(base.RenderSpellCheckLanguageDialog)); } string currentSelection = "0"; if (this.initialMarkup != Markup.Html) { currentSelection = "1"; } base.RenderHtmlTextToggle(currentSelection); }
private void RenderComboDropDown(ToolbarButton button, ToolbarButtonFlags flags, Toolbar.RenderMenuItems renderMenuItems) { ToolbarButtonFlags toolbarButtonFlags = ToolbarButtonFlags.ComboDropDown | (flags & ToolbarButtonFlags.BigSize) | (flags & ToolbarButtonFlags.CustomMenu) | (flags & ToolbarButtonFlags.Disabled) | (flags & ToolbarButtonFlags.Hidden) | (flags & ToolbarButtonFlags.AlwaysPressed); if ((flags & ToolbarButtonFlags.CustomMenu) == ToolbarButtonFlags.None) { toolbarButtonFlags |= ToolbarButtonFlags.Menu; } this.RenderButton(new ToolbarButton(button.Command, toolbarButtonFlags), renderMenuItems); }
private void InternalRenderMenu(ToolbarButton button, ToolbarButtonFlags flags, Toolbar.RenderMenuItems renderMenuItems) { if ((flags & ToolbarButtonFlags.Menu) != ToolbarButtonFlags.None) { this.writer.Write("<div id=\"tbl"); this.writer.Write(button.Command); this.writer.Write("Mnu\" class=\"subMenu\" style=\"display:none;\">"); renderMenuItems(); RenderingUtilities.RenderDropShadows(this.writer, this.sessionContext); this.writer.Write("</div>"); } }
private void InternalRenderButtonEnd(ToolbarButton button, ToolbarButtonFlags flags, Toolbar.RenderMenuItems renderMenuItems, bool isBig, bool renderBigButtonWrapper, bool isComboMenu) { this.writer.Write("</div>"); if ((!this.IsRightAligned || isBig) && isComboMenu) { this.RenderComboDropDown(button, flags, renderMenuItems); } if (renderBigButtonWrapper) { this.writer.Write("</div>"); } }
protected override void RenderButtons() { ToolbarButtonFlags toolbarButtonFlags = ToolbarButtonFlags.Text; ToolbarButtonFlags toolbarButtonFlags2 = ToolbarButtonFlags.Pressed; base.RenderButton(ToolbarButtons.PrintCalendarLabel); base.RenderFloatedSpacer(20); base.RenderButton(ToolbarButtons.PrintDailyView, (this.viewType == CalendarViewType.Min) ? (toolbarButtonFlags | toolbarButtonFlags2) : toolbarButtonFlags); base.RenderFloatedSpacer(20); base.RenderButton(ToolbarButtons.PrintWeeklyView, (this.viewType == CalendarViewType.Weekly || this.viewType == CalendarViewType.WorkWeek) ? (toolbarButtonFlags | toolbarButtonFlags2) : toolbarButtonFlags); base.RenderFloatedSpacer(20); base.RenderButton(ToolbarButtons.PrintMonthlyView, (this.viewType == CalendarViewType.Monthly) ? (toolbarButtonFlags | toolbarButtonFlags2) : toolbarButtonFlags); }
// Token: 0x06002552 RID: 9554 RVA: 0x000D8090 File Offset: 0x000D6290 protected override void RenderButtons() { ToolbarButtonFlags flags = this.disableSharingButton ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None; if (this.sharingMessageType.IsInvitationOrAcceptOfRequest) { base.RenderButton(ToolbarButtons.AddThisCalendar, flags); } if (this.sharingMessageType.IsRequest) { base.RenderButton(ToolbarButtons.SharingMyCalendar, flags); } }
private void RenderDeleteButton() { ToolbarButtonFlags flags = this.canDelete ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; if (this.isMeeting && this.meetingRequestWasSent) { base.RenderButton(ToolbarButtons.CancelMeeting, flags); return; } if (!this.isNew) { base.RenderButton(ToolbarButtons.Delete, flags); } }
protected override void RenderButtons() { bool flag = base.UserContext.BrowserType == BrowserType.IE; ToolbarButtonFlags flags = this.isSendButtonEnabledInForm ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; base.RenderHelpButton(this.HelpId, string.Empty); base.RenderButton(ToolbarButtons.Send, flags); base.RenderButton(ToolbarButtons.SaveImageOnly); base.RenderButton(ToolbarButtons.AttachFile); if (!flag || !this.isSMimeEditForm) { base.RenderButton(ToolbarButtons.InsertImage); } base.RenderButton(ToolbarButtons.AddressBook); base.RenderButton(ToolbarButtons.CheckNames); base.RenderButton(ToolbarButtons.ImportanceHigh, (this.importance == Importance.High) ? ToolbarButtonFlags.Pressed : ToolbarButtonFlags.None); base.RenderButton(ToolbarButtons.ImportanceLow, (this.importance == Importance.Low) ? ToolbarButtonFlags.Pressed : ToolbarButtonFlags.None); if (flag && (this.isSMimeControlMustUpdate || this.isSMimeEditForm)) { ToolbarButtonFlags flags2 = this.isSMimeControlMustUpdate ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None; base.RenderButton(ToolbarButtons.MessageDigitalSignature, flags2); base.RenderButton(ToolbarButtons.MessageEncryptContents, flags2); } if (base.UserContext.IsFeatureEnabled(Feature.Signature)) { base.RenderButton(ToolbarButtons.InsertSignature); } if (flag) { ToolbarButtonFlags flags3 = base.UserContext.IsFeatureEnabled(Feature.SpellChecker) ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; base.RenderButton(ToolbarButtons.SpellCheck, flags3, new Toolbar.RenderMenuItems(base.RenderSpellCheckLanguageDialog)); } if (this.IsComplianceButtonAllowedInForm && base.UserContext.ComplianceReader.IsComplianceFeatureEnabled(base.UserContext.IsIrmEnabled, this.isIrmProtected, CultureInfo.CurrentUICulture)) { if (this.isComplianceButtonEnabledInForm) { base.RenderButton(ToolbarButtons.Compliance); } else { base.RenderButton(ToolbarButtons.Compliance, ToolbarButtonFlags.Disabled); } } base.RenderButton(ToolbarButtons.MessageOptions); base.RenderHtmlTextToggle((this.initialMarkup == Markup.Html) ? "0" : "1", this.isSMimeEditForm || this.isNotOwner); base.RenderButton(ToolbarButtons.MailTips); }
protected override void RenderButtons() { ToolbarButtonFlags flags = ItemUtility.UserCanDeleteItem(this.distributionList) ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; ToolbarButtonFlags flags2 = ItemUtility.UserCanEditItem(this.distributionList) ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; base.RenderButton(ToolbarButtons.NewMessageToDistributionList); if (base.UserContext.IsFeatureEnabled(Feature.Calendar)) { base.RenderButton(ToolbarButtons.NewMeetingRequestToContact); } base.RenderButton(ToolbarButtons.Delete, flags); if (!this.isInDeleteItems) { base.RenderButton(ToolbarButtons.Flag, flags2); } base.RenderButton(ToolbarButtons.Categories, flags2); }
// Token: 0x060020EE RID: 8430 RVA: 0x000BDA3C File Offset: 0x000BBC3C protected override void RenderButtons() { if (!this.isOrganizer) { MeetingMessageType meetingMessageType = this.meetingMessageType; if (meetingMessageType > MeetingMessageType.FullUpdate) { if (meetingMessageType != MeetingMessageType.InformationalUpdate) { if (meetingMessageType == MeetingMessageType.Outdated) { base.RenderButton(ToolbarButtons.MeetingOutOfDate); return; } if (meetingMessageType != MeetingMessageType.PrincipalWantsCopy) { return; } } base.RenderButton(ToolbarButtons.MeetingNoResponseRequired); return; } if (meetingMessageType != MeetingMessageType.NewMeetingRequest && meetingMessageType != MeetingMessageType.FullUpdate) { return; } ToolbarButtonFlags toolbarButtonFlags = ToolbarButtonFlags.None; if (this.isInArchiveMailbox) { toolbarButtonFlags |= ToolbarButtonFlags.Disabled; } if (!this.isResponseRequested) { base.RenderButton(ToolbarButtons.MeetingAccept, toolbarButtonFlags); base.RenderButton(ToolbarButtons.MeetingTentative, toolbarButtonFlags); base.RenderButton(ToolbarButtons.MeetingDecline, toolbarButtonFlags); return; } base.RenderButton(ToolbarButtons.MeetingAcceptMenu, toolbarButtonFlags, new Toolbar.RenderMenuItems(this.RenderMeetingResponseMenuItems)); base.RenderButton(ToolbarButtons.MeetingTentativeMenu, toolbarButtonFlags, new Toolbar.RenderMenuItems(this.RenderMeetingResponseMenuItems)); base.RenderButton(ToolbarButtons.MeetingDeclineMenu, toolbarButtonFlags, new Toolbar.RenderMenuItems(this.RenderMeetingResponseMenuItems)); return; } }
// Token: 0x060020A0 RID: 8352 RVA: 0x000BCF40 File Offset: 0x000BB140 protected override void RenderButtons() { ToolbarButtonFlags flags = ToolbarButtonFlags.None; if (this.item != null && !ItemUtility.UserCanEditItem(this.item)) { flags = ToolbarButtonFlags.Disabled; } ToolbarButtonFlags flags2 = ToolbarButtonFlags.None; if (this.item != null && !ItemUtility.UserCanDeleteItem(this.item)) { flags2 = ToolbarButtonFlags.Disabled; } base.RenderButton(ToolbarButtons.SaveAndClose, flags); base.RenderButton(ToolbarButtons.NewMessageToContact); base.RenderButton(ToolbarButtons.Delete, flags2); base.RenderButton(ToolbarButtons.AttachFile, flags); base.RenderButton(ToolbarButtons.Flag, flags); base.RenderButton(ToolbarButtons.Categories, flags); }
protected void RenderButton(ToolbarButton button, ToolbarButtonFlags flags, Toolbar.RenderMenuItems renderMenuItems, SanitizedHtmlString addtionalMarkup) { if (button == null) { throw new ArgumentNullException("button"); } flags |= button.Flags; bool flag = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.BigSize); bool isDisabled = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.Disabled); bool flag2 = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.AlwaysPressed); bool isPressed = flag2 || ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.Pressed); bool isComboMenu = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.ComboMenu); bool flag3 = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.ComboDropDown); bool flag4 = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.NoAction); bool renderBigButtonWrapper = this.HasBigButton && (!flag3 || !flag); bool hasDropdown = (flags & ToolbarButtonFlags.Menu) != ToolbarButtonFlags.None || ((flags & ToolbarButtonFlags.CustomMenu) != ToolbarButtonFlags.None && ToolbarButtonFlags.None == (flags & ToolbarButtonFlags.ComboMenu)); bool isShareButton = false; if (button.TextId == 2009299861 || button.TextId == -1011044205 || button.TextId == -1230529569 || button.TextId == -142048603) { isShareButton = true; } this.InternalRenderButtonStart(button, flags, renderMenuItems, flag, isDisabled, isPressed, flag3, flag4, renderBigButtonWrapper, isComboMenu, hasDropdown, isShareButton); if (!flag4) { this.InternalRenderLinkStart(button, flags, flag2, isPressed, flag3, renderBigButtonWrapper); } this.InternalRenderButtonBody(button, flags, addtionalMarkup, flag, flag3, hasDropdown); if (!flag4) { this.InternalRenderLinkEnd(); } if ((flags & ToolbarButtonFlags.Radio) != ToolbarButtonFlags.None) { RenderingUtilities.RenderDropShadows(this.writer, this.sessionContext); } this.InternalRenderMenu(button, flags, renderMenuItems); this.InternalRenderButtonEnd(button, flags, renderMenuItems, flag, renderBigButtonWrapper, isComboMenu); }
// Token: 0x0600254E RID: 9550 RVA: 0x000D7F30 File Offset: 0x000D6130 protected override void RenderButtons() { base.RenderHelpButton(HelpIdsLight.DefaultLight.ToString(), string.Empty); base.RenderButton(ToolbarButtons.PostReply); base.RenderButton(ToolbarButtons.Reply); base.RenderButton(ToolbarButtons.Forward); bool flag = ItemUtility.UserCanEditItem(this.item); ToolbarButtonFlags flags = (flag && !this.isEmbeddedItem) ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; base.RenderButton(ToolbarButtons.Flag, flags); base.RenderButton(ToolbarButtons.Categories, flags); base.RenderButton(ToolbarButtons.Print); bool flag2 = ItemUtility.UserCanDeleteItem(this.item); ToolbarButtonFlags flags2 = (flag2 && !this.isEmbeddedItem) ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; base.RenderButton(ToolbarButtons.Delete, flags2); ToolbarButtonFlags toolbarButtonFlags = this.isEmbeddedItem ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None; base.RenderButton(ToolbarButtons.Move, toolbarButtonFlags); ToolbarButtonFlags flags3 = toolbarButtonFlags; base.RenderButton(ToolbarButtons.Previous, flags3); base.RenderButton(ToolbarButtons.Next, flags3); }
// Token: 0x060020A2 RID: 8354 RVA: 0x000BCFE0 File Offset: 0x000BB1E0 protected override void RenderButtons() { ToolbarButtonFlags flags = ToolbarButtonFlags.None; if (this.item != null && !ItemUtility.UserCanEditItem(this.item)) { flags = ToolbarButtonFlags.Disabled; } ToolbarButtonFlags flags2 = ToolbarButtonFlags.None; if (this.item != null && !ItemUtility.UserCanDeleteItem(this.item)) { flags2 = ToolbarButtonFlags.Disabled; } base.RenderButton(ToolbarButtons.SaveAndClose, flags); base.RenderButton(ToolbarButtons.NewMessageToDistributionList); if (base.UserContext.IsFeatureEnabled(Feature.Calendar)) { base.RenderButton(ToolbarButtons.NewMeetingRequestToContact); } base.RenderButton(ToolbarButtons.Delete, flags2); base.RenderButton(ToolbarButtons.Flag, flags); base.RenderButton(ToolbarButtons.Categories, flags); }
public ToolbarButton(string command, ToolbarButtonFlags flags, Strings.IDs textId, ThemeFileId image) : this(command, flags, textId, image, textId) { }
// Token: 0x0600254B RID: 9547 RVA: 0x000D7AD0 File Offset: 0x000D5CD0 protected override void RenderButtons() { ToolbarButtonFlags flags = this.isEmbeddedItem ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None; bool flag = Utilities.IsPublic(this.message); bool flag2 = Utilities.IsOtherMailbox(this.message); base.RenderHelpButton(ObjectClass.IsSmsMessage(this.message.ClassName) ? HelpIdsLight.DefaultLight.ToString() : HelpIdsLight.MailLight.ToString(), string.Empty); if (ItemUtility.ShouldRenderSendAgain(this.message, this.isEmbeddedItem) && !flag2) { base.RenderButton(ToolbarButtons.SendAgain, flag ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None); } if (this.isInJunkEmailFolder && base.UserContext.IsJunkEmailEnabled && !this.isSuspectedPhishingItem) { base.RenderButton(ToolbarButtons.NotJunk); } ToolbarButtonFlags flags2 = ToolbarButtonFlags.None; ToolbarButtonFlags flags3 = ToolbarButtonFlags.None; if (this.isInJunkEmailFolder || (this.isSuspectedPhishingItem && !this.isLinkEnabled)) { flags2 = ToolbarButtonFlags.Disabled; flags3 = ToolbarButtonFlags.Disabled; } if (!base.UserContext.IsFeatureEnabled(Feature.Tasks) && ObjectClass.IsOfClass(this.message.ClassName, "IPM.Task")) { flags2 = ToolbarButtonFlags.Disabled; flags3 = ToolbarButtonFlags.Disabled; } bool flag3 = ReadMessageToolbar.IsReplySupported(this.message); bool flag4 = base.UserContext.IsSmsEnabled && ObjectClass.IsSmsMessage(this.message.ClassName); if (this.isReplyRestricted) { flags2 = ToolbarButtonFlags.Disabled; } if (this.isReplyAllRestricted) { flags3 = ToolbarButtonFlags.Disabled; } if (flag3) { base.RenderButton(flag4 ? ToolbarButtons.ReplySms : ToolbarButtons.Reply, flags2); base.RenderButton(flag4 ? ToolbarButtons.ReplyAllSms : ToolbarButtons.ReplyAll, flags3); } ToolbarButtonFlags flags4 = ToolbarButtonFlags.None; if (ObjectClass.IsOfClass(this.message.ClassName, "IPM.Note.Microsoft.Approval.Request") || this.isForwardRestricted || this.isInJunkEmailFolder || (this.isSuspectedPhishingItem && !this.isLinkEnabled)) { flags4 = ToolbarButtonFlags.Disabled; } if (!ObjectClass.IsOfClass(this.message.ClassName, "IPM.Conflict.Message")) { base.RenderButton(flag4 ? ToolbarButtons.ForwardSms : ToolbarButtons.Forward, flags4); } bool flag5 = this.message is CalendarItemBase; bool flag6 = ItemUtility.UserCanEditItem(this.message); if (base.UserContext.IsInstantMessageEnabled() && (!flag5 || (flag5 && flag3))) { base.RenderButton(ToolbarButtons.Chat, ToolbarButtonFlags.Disabled); } MessageItem messageItem = this.message as MessageItem; bool flag7 = messageItem != null && messageItem.IsDraft; ToolbarButtonFlags flags5 = (flag6 && !flag7) ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; if (!this.isEmbeddedItem && base.UserContext.ExchangePrincipal.RecipientTypeDetails == RecipientTypeDetails.DiscoveryMailbox) { base.RenderButton(ToolbarButtons.MessageNoteInToolbar); } if (!flag5 && !this.isInDeleteItems && !this.isEmbeddedItem) { base.RenderButton(ToolbarButtons.Flag, flags5); } ToolbarButtonFlags flags6 = flag6 ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled; if (!this.isEmbeddedItem) { bool flag8 = true; if (flag5) { CalendarItemBase calendarItemBase = (CalendarItemBase)this.message; flag8 = (CalendarItemType.Occurrence != calendarItemBase.CalendarItemType && CalendarItemType.Exception != calendarItemBase.CalendarItemType); } if (flag8) { base.RenderButton(ToolbarButtons.Categories, flags6); } } if (!flag5) { base.RenderButton(ToolbarButtons.MessageDetails); } base.RenderButton(ToolbarButtons.Print, this.isPrintRestricted ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None); if (base.UserContext.IsFeatureEnabled(Feature.Rules) && this.isMessageReadForm && !flag2 && !this.isEmbeddedItem) { base.RenderButton(ToolbarButtons.CreateRule, (base.UserContext.IsWebPartRequest || flag) ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None); } bool flag9; if (flag5) { flag9 = CalendarUtilities.UserCanDeleteCalendarItem((CalendarItemBase)this.message); } else { flag9 = ItemUtility.UserCanDeleteItem(this.message); } ToolbarButtonFlags flags7 = (!flag9 || this.isEmbeddedItem) ? ToolbarButtonFlags.Disabled : ToolbarButtonFlags.None; base.RenderButton(ToolbarButtons.Delete, flags7); if (!this.isEmbeddedItem && !flag5) { base.RenderButton(ToolbarButtons.Move); } if (!flag5) { base.RenderButton(ToolbarButtons.Previous, flags); base.RenderButton(ToolbarButtons.Next, flags); } }
public void RenderButton(ToolbarButton button, ToolbarButtonFlags flags) { flags |= button.Flags; bool flag = ToolbarButtonFlags.Tab == (flags & ToolbarButtonFlags.Tab); bool flag2 = ToolbarButtonFlags.NoAction == (flags & ToolbarButtonFlags.NoAction); if (flag2) { this.writer.Write("<td nowrap><div class=\"divNoRR\">"); if ((flags & ToolbarButtonFlags.Image) != (ToolbarButtonFlags)0U) { this.writer.Write("<img src=\""); this.userContext.RenderThemeFileUrl(this.writer, button.Image); this.writer.Write("\""); if ((flags & ToolbarButtonFlags.Text) != (ToolbarButtonFlags)0U) { this.writer.Write(" alt=\"\">"); this.writer.Write(' '); } else { if (button.TextId != -1018465893) { this.writer.Write(" alt=\""); if (button.ToolTip == null) { this.writer.Write(LocalizedStrings.GetHtmlEncoded(button.TextId)); } else { this.writer.Write(button.ToolTip); } this.writer.Write("\""); } this.writer.Write(">"); } } else { this.writer.Write("<img class=\"noSrc\" src=\""); this.userContext.RenderThemeFileUrl(this.writer, ThemeFileId.Clear); this.writer.Write("\" alt=\"\">"); } if ((flags & ToolbarButtonFlags.Text) != (ToolbarButtonFlags)0U) { this.writer.Write(LocalizedStrings.GetHtmlEncoded(button.TextId)); } this.writer.Write("</div></td>"); return; } if (flag) { this.writer.Write("<td class=\"tabhk\"><img src=\""); this.userContext.RenderThemeFileUrl(this.writer, ThemeFileId.Clear1x1); this.writer.Write("\"></td>"); } this.writer.Write("<td"); if ((flags & ToolbarButtonFlags.Sticky) != (ToolbarButtonFlags)0U) { this.writer.Write(" id=\"{0}\"", button.Command); if ((flags & ToolbarButtonFlags.Selected) != (ToolbarButtonFlags)0U) { this.writer.Write(" class=\"sl\""); } } if (flag) { this.writer.Write(" class=\"tab\""); } this.writer.Write(" nowrap>"); if (flag) { this.writer.Write("<div class=\"tabbrd\">"); } string arg = string.Empty; if (flag) { this.writer.Write("<a class="); arg = "tab"; } else { this.writer.Write("<a href=\"#\" onClick=\"return onClkTb('"); this.writer.Write(button.Command); this.writer.Write("');\" class="); } if ((flags & ToolbarButtonFlags.NoHover) == (ToolbarButtonFlags)0U) { this.writer.Write("\"btn{0}\"", arg); } else { this.writer.Write("\"noHv\""); } if (button.TextId != -1018465893) { this.writer.Write(" title=\""); if (button.ToolTip == null) { this.writer.Write(LocalizedStrings.GetHtmlEncoded(button.TextId)); } else { this.writer.Write(button.ToolTip); } this.writer.Write("\""); } this.writer.Write(" id=\""); if (this.isHeader) { this.writer.Write("lnkHdr"); } else { this.writer.Write("lnkFtr"); } this.writer.Write(button.Command); this.writer.Write("\">"); if ((flags & ToolbarButtonFlags.Image) != (ToolbarButtonFlags)0U) { this.writer.Write("<img src=\""); this.userContext.RenderThemeFileUrl(this.writer, button.Image); this.writer.Write("\""); if ((flags & ToolbarButtonFlags.Text) != (ToolbarButtonFlags)0U) { this.writer.Write(" alt=\"\">"); this.writer.Write(' '); } else { if (button.TextId != -1018465893) { this.writer.Write(" alt=\""); if (button.ToolTip == null) { this.writer.Write(LocalizedStrings.GetHtmlEncoded(button.TextId)); } else { this.writer.Write(button.ToolTip); } this.writer.Write("\""); } this.writer.Write(">"); } } else { this.writer.Write("<img class=\"noSrc\" src=\""); this.userContext.RenderThemeFileUrl(this.writer, ThemeFileId.Clear); this.writer.Write("\" alt=\"\">"); } if ((flags & ToolbarButtonFlags.Text) != (ToolbarButtonFlags)0U) { this.writer.Write(LocalizedStrings.GetHtmlEncoded(button.TextId)); } if (flag2) { this.writer.Write("</div>"); } else { this.writer.Write("</a>"); } if (flag) { this.writer.Write("</div>"); } this.writer.Write("</td>"); }
public ToolbarButton(string command, ToolbarButtonFlags flags) : this(command, flags, -1018465893, ThemeFileId.None) { }
private void InternalRenderLinkStart(ToolbarButton button, ToolbarButtonFlags flags, bool isAlwaysPressed, bool isPressed, bool isComboDropDown, bool renderBigButtonWrapper) { this.writer.Write("<a _tbb=1 class=\"tba\" id=\""); this.writer.Write(button.Command); if (isComboDropDown) { this.writer.Write("d"); } this.writer.Write("\" name=\"lnkB\""); if (renderBigButtonWrapper) { this.writer.Write(" _fBig=\"1\""); } if (isPressed) { this.writer.Write(" _pushed=\"1\""); } if (isAlwaysPressed) { this.writer.Write(" _alwaysPushed=\"1\""); } if ((flags & ToolbarButtonFlags.Sticky) != ToolbarButtonFlags.None || (flags & ToolbarButtonFlags.Menu) != ToolbarButtonFlags.None) { this.writer.Write(" _stky=\"1\""); } if ((flags & ToolbarButtonFlags.Radio) != ToolbarButtonFlags.None) { this.writer.Write(" _radio=\"1\""); } if (button.SwapWithButtons != null) { this.writer.Write(" _swp=\""); for (int i = 0; i < button.SwapWithButtons.Length; i++) { if (0 < i) { this.writer.Write(";"); } this.writer.Write(button.SwapWithButtons[i].Command); } this.writer.Write("\""); } if (button.ToggleWithButtons != null) { this.writer.Write(" _tgl=\""); for (int j = 0; j < button.ToggleWithButtons.Length; j++) { if (0 < j) { this.writer.Write(";"); } this.writer.Write(button.ToggleWithButtons[j].Command); } this.writer.Write("\""); } if ((flags & ToolbarButtonFlags.Menu) != ToolbarButtonFlags.None) { this.writer.Write(" _sbMnu=\"tbl"); this.writer.Write(button.Command); this.writer.Write("Mnu\""); } if (isComboDropDown) { this.writer.Write(" _ovr=\""); this.writer.Write(button.Command); this.writer.Write("\""); } if ((flags & ToolbarButtonFlags.ComboMenu) != ToolbarButtonFlags.None) { this.writer.Write(" _twsy=\""); this.writer.Write(button.Command); this.writer.Write("d\""); } this.writer.Write(" href=\"#\">"); }
private void InternalRenderButtonBody(ToolbarButton button, ToolbarButtonFlags flags, SanitizedHtmlString addtionalMarkup, bool isBig, bool isComboDropDown, bool hasDropdown) { if ((flags & ToolbarButtonFlags.HasInnerControl) != ToolbarButtonFlags.None) { button.RenderControl(this.writer); } if (!isBig) { bool flag = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.Text); bool flag2 = (flags & ToolbarButtonFlags.Image) != ToolbarButtonFlags.None && button.Image != ThemeFileId.None; bool flag3 = ToolbarButtonFlags.None != (flags & ToolbarButtonFlags.ImageAfterText); List <Toolbar.ButtonComponents> list = new List <Toolbar.ButtonComponents>(4); if (flag3) { list.Add(Toolbar.ButtonComponents.Text); list.Add(Toolbar.ButtonComponents.Image); } else { if (flag2) { list.Add(Toolbar.ButtonComponents.Image); } if (flag) { list.Add(Toolbar.ButtonComponents.Text); } } if (addtionalMarkup != null) { list.Add(Toolbar.ButtonComponents.AdditionalMarkup); } if (hasDropdown) { list.Add(Toolbar.ButtonComponents.DropDown); } for (int i = 0; i < list.Count; i++) { Toolbar.ButtonComponents buttonComponents = list[i]; bool flag4 = i > 0; bool flag5 = i < list.Count - 1; string text = string.Empty; if (buttonComponents == Toolbar.ButtonComponents.Image || buttonComponents == Toolbar.ButtonComponents.Text) { if (flag4 && flag5) { text = "tbLh tbBtwn"; } else if (!flag4 && flag5) { text = "tbLh tbBefore"; } else if (flag4 && !flag5) { text = "tbLh tbBtwn tbAfter"; } else if ((flags & ToolbarButtonFlags.Radio) != ToolbarButtonFlags.None) { text = "tbLh tbRadioBefore tbRadioAfter"; } else { text = "tbLh tbBefore tbAfter"; } } switch (buttonComponents) { case Toolbar.ButtonComponents.Image: this.sessionContext.RenderThemeImage(this.writer, button.Image, text, new object[] { "id=\"imgToolbarButtonIcon\"" }); break; case Toolbar.ButtonComponents.Text: this.writer.Write("<span class=\""); this.writer.Write(text); this.writer.Write("\">"); this.RenderButtonText(this.writer, button.TextId); this.writer.Write("</span>"); break; case Toolbar.ButtonComponents.AdditionalMarkup: this.writer.Write(addtionalMarkup); break; case Toolbar.ButtonComponents.DropDown: if (flag4) { this.sessionContext.RenderThemeImage(this.writer, ThemeFileId.AlertBarDropDownArrow, "tbBtwnDD", new object[] { "id=\"imgToolbarButtonDropdownIcon\"" }); } else { this.sessionContext.RenderThemeImage(this.writer, ThemeFileId.AlertBarDropDownArrow, "ddSp", new object[] { "id=\"imgToolbarButtonDropdownIcon\"" }); } break; } } return; } if (isComboDropDown) { this.sessionContext.RenderThemeImage(this.writer, ThemeFileId.AlertBarDropDownArrow, "tbImgBigDD", new object[] { "id=\"imgToolbarButtonDropdownIcon\"" }); return; } this.sessionContext.RenderThemeImage(this.writer, button.Image, "tbImgBig", new object[0]); }
private void InternalRenderButtonStart(ToolbarButton button, ToolbarButtonFlags flags, Toolbar.RenderMenuItems renderMenuItems, bool isBig, bool isDisabled, bool isPressed, bool isComboDropDown, bool isNoAction, bool renderBigButtonWrapper, bool isComboMenu, bool hasDropdown, bool isShareButton) { if (renderBigButtonWrapper) { this.writer.Write("<div class=\"tbBigWrap "); this.RenderFloatCssClass(); this.writer.Write("\""); if ((flags & ToolbarButtonFlags.Hidden) != ToolbarButtonFlags.None) { this.writer.Write(" style=\"display:none;\""); } this.writer.Write(">"); } if (this.IsRightAligned && !isBig && isComboMenu) { this.RenderComboDropDown(button, flags, renderMenuItems); } this.writer.Write("<div id=\"divToolbarButton"); this.writer.Write(button.Command); this.writer.Write("\" class=\""); if (isBig) { if (isComboDropDown) { this.writer.Write("tbfBigDD"); } else if ((flags & ToolbarButtonFlags.ComboMenu) != ToolbarButtonFlags.None) { this.writer.Write("tbfBigCMB"); } else { this.writer.Write("tbfBig"); } } else { this.writer.Write("tbf"); if (!this.HasBigButton) { this.writer.Write(" "); this.RenderFloatCssClass(); } } if (isNoAction) { this.writer.Write(" tbfNA"); } else { if (isDisabled && isPressed) { this.writer.Write(" tbfD tbfP"); } else if (isDisabled) { this.writer.Write(" tbfD"); } else if (isPressed) { this.writer.Write(" tbfP"); } else if (isShareButton) { this.writer.Write(" tbfShareHvr"); } else { this.writer.Write(" tbfHvr"); } if (isComboDropDown && !isBig) { this.writer.Write(" tbfDd"); } } if (hasDropdown && !isComboDropDown) { this.writer.Write(" tbfMnuDd"); } if (isComboMenu) { this.writer.Write(" tbfCmb"); } if (!this.HasBigButton && (flags & ToolbarButtonFlags.Hidden) != ToolbarButtonFlags.None) { this.writer.Write("\" style=\"display:none;"); } if (((flags & ToolbarButtonFlags.Tooltip) != ToolbarButtonFlags.None || (flags & ToolbarButtonFlags.Text) == ToolbarButtonFlags.None) && button.TooltipId != -1018465893) { this.writer.Write("\" title=\""); this.writer.Write(SanitizedHtmlString.FromStringId(button.TooltipId)); } this.writer.Write("\">"); }
protected override void RenderButtons() { base.RenderHelpButton(HelpIdsLight.CalendarLight.ToString(), string.Empty); if (this.isMeeting) { if (this.isNew || !this.meetingRequestWasSent) { if (this.isPublicItem) { base.RenderButton(ToolbarButtons.SaveAndClose); } else { base.RenderButton(ToolbarButtons.Send); base.RenderButton(ToolbarButtons.SaveImageOnly); base.RenderButton(ToolbarButtons.SaveAndClose, ToolbarButtonFlags.Hidden); } } else { if (this.isPublicItem) { base.RenderButton(ToolbarButtons.SaveAndClose); } else { base.RenderButton(ToolbarButtons.SendUpdate); base.RenderButton(ToolbarButtons.SendCancelation, ToolbarButtonFlags.Hidden); base.RenderButton(ToolbarButtons.SaveAndCloseImageOnly); } if (this.isPublicItem) { base.RenderButton(ToolbarButtons.ReplyImageOnly, ToolbarButtonFlags.Disabled); base.RenderButton(ToolbarButtons.ReplyAllImageOnly, ToolbarButtonFlags.Disabled); } else { base.RenderButton(ToolbarButtons.ReplyAllImageOnly); } } } else { base.RenderButton(ToolbarButtons.SaveAndClose); base.RenderButton(ToolbarButtons.Send, ToolbarButtonFlags.Hidden); base.RenderButton(ToolbarButtons.SaveImageOnly, ToolbarButtonFlags.Hidden); } base.RenderButton(ToolbarButtons.AttachFile); base.RenderButton(ToolbarButtons.InsertImage); ToolbarButtonFlags flags = ToolbarButtonFlags.None; if (CalendarItemType.Occurrence == this.calendarItemType || CalendarItemType.Exception == this.calendarItemType) { flags = ToolbarButtonFlags.Disabled; } base.RenderButton(ToolbarButtons.RecurrenceImageOnly, flags); if (!this.isPublicItem) { base.RenderButton(ToolbarButtons.CheckNames, this.isMeeting ? ToolbarButtonFlags.None : ToolbarButtonFlags.Hidden); } if (base.UserContext.BrowserType == BrowserType.IE) { base.RenderButton(ToolbarButtons.SpellCheck, base.UserContext.IsFeatureEnabled(Feature.SpellChecker) ? ToolbarButtonFlags.None : ToolbarButtonFlags.Disabled, new Toolbar.RenderMenuItems(base.RenderSpellCheckLanguageDialog)); } if (!this.isPublicItem && (!this.isMeeting || (this.isMeeting && !this.meetingRequestWasSent))) { base.RenderButton(ToolbarButtons.CancelInvitation, this.isMeeting ? ToolbarButtonFlags.None : ToolbarButtonFlags.Hidden); base.RenderButton(ToolbarButtons.InviteAttendees, this.isMeeting ? ToolbarButtonFlags.Hidden : ToolbarButtonFlags.None); } base.RenderButton(ToolbarButtons.ImportanceHigh, (this.importance == Importance.High) ? ToolbarButtonFlags.Pressed : ToolbarButtonFlags.None); base.RenderButton(ToolbarButtons.ImportanceLow, (this.importance == Importance.Low) ? ToolbarButtonFlags.Pressed : ToolbarButtonFlags.None); if (CalendarItemType.Occurrence != this.calendarItemType && CalendarItemType.Exception != this.calendarItemType) { base.RenderButton(ToolbarButtons.Categories); } this.RenderDeleteButton(); base.RenderButton(ToolbarButtons.Print); if (this.initialMarkup == Markup.Html) { base.RenderHtmlTextToggle("0"); } else { base.RenderHtmlTextToggle("1"); } base.RenderButton(ToolbarButtons.MailTips); }
protected void RenderButton(ToolbarButton button, ToolbarButtonFlags flags, Toolbar.RenderMenuItems renderMenuItems) { this.RenderButton(button, flags, renderMenuItems, null); }
protected void RenderButton(ToolbarButton button, ToolbarButtonFlags flags) { this.RenderButton(button, flags, null, null); }
private void RenderNonNewButton(ToolbarButton button, ToolbarButtonFlags flags) { base.RenderButton(button, flags | this.flagsForNonNewButton); }