예제 #1
0
        private static SanitizedHtmlString BuildCancelRecurringTable(CalendarItemType type, ExDateTime cancelFromDate)
        {
            SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>("<table class=\"caltm\" cellpadding=\"0\" cellspacing=\"0\">");

            if (type == CalendarItemType.Single)
            {
                throw new ArgumentException("Unhandled calendar item type.");
            }
            bool flag = true;

            if (type == CalendarItemType.Exception || type == CalendarItemType.Occurrence)
            {
                sanitizingStringBuilder.Append("<tr><td class=\"rb\"><input class=\"rb\" type=\"radio\" name=\"delprompt\" checked=\"checked\" id=\"delocc\" value=\"0\" />\n<label class=\"lb\" for=\"delocc\">");
                sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-673339501));
                sanitizingStringBuilder.Append("</label></td></tr>");
                flag = false;
            }
            sanitizingStringBuilder.Append("<tr><td><input class=\"rb\" type=\"radio\" name=\"delprompt\" ");
            sanitizingStringBuilder.Append(flag ? "checked " : string.Empty);
            sanitizingStringBuilder.Append("id=\"delfwd\" value=\"1\" />\n<label class=\"lb\" for=\"delfwd\">");
            sanitizingStringBuilder.Append(string.Format(LocalizedStrings.GetNonEncoded(-1062918861), string.Empty));
            sanitizingStringBuilder.Append("</label></td>");
            using (SanitizingStringWriter <OwaHtml> sanitizingStringWriter = new SanitizingStringWriter <OwaHtml>())
            {
                CalendarUtilities.RenderDateTimeTable(sanitizingStringWriter, "seldel", cancelFromDate, DateTimeUtilities.GetLocalTime().Year, null, string.Empty, "onSelDelTm(this);", null);
                sanitizingStringBuilder.Append("<td>");
                sanitizingStringBuilder.Append <SanitizedHtmlString>(sanitizingStringWriter.ToSanitizedString <SanitizedHtmlString>());
                sanitizingStringBuilder.Append("</td></tr>");
            }
            sanitizingStringBuilder.Append("<tr><td><input class=\"rb\" type=\"radio\" name=\"delprompt\" id=\"delall\" value=\"2\" />\n<label class=\"lb\" for=\"delall\">");
            sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1631668395));
            sanitizingStringBuilder.Append("</label></td></tr></table>");
            return(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>());
        }
        // Token: 0x0600313B RID: 12603 RVA: 0x001229A8 File Offset: 0x00120BA8
        private static void ProcessFreeBusyStatus(PersonalAutoAttendant pAA, ref bool isFirst, StringBuilder builder)
        {
            if (!isFirst)
            {
                builder.Append("\r\n");
                builder.Append(LocalizedStrings.GetHtmlEncoded(-56156833));
            }
            else
            {
                isFirst = false;
            }
            List <string> list = new List <string>();

            if ((pAA.FreeBusy & FreeBusyStatusEnum.Busy) != FreeBusyStatusEnum.None)
            {
                list.Add(LocalizedStrings.GetNonEncoded(1864090954));
            }
            if ((pAA.FreeBusy & FreeBusyStatusEnum.Free) != FreeBusyStatusEnum.None)
            {
                list.Add(LocalizedStrings.GetNonEncoded(-575819061));
            }
            if ((pAA.FreeBusy & FreeBusyStatusEnum.Tentative) != FreeBusyStatusEnum.None)
            {
                list.Add(LocalizedStrings.GetNonEncoded(-559850781));
            }
            if ((pAA.FreeBusy & FreeBusyStatusEnum.OutOfOffice) != FreeBusyStatusEnum.None)
            {
                list.Add(LocalizedStrings.GetNonEncoded(-856091954));
            }
            builder.Append(Utilities.HtmlEncode(string.Format(CultureInfo.CurrentCulture, LocalizedStrings.GetNonEncoded(1058580864), new object[]
            {
                string.Join(LocalizedStrings.GetNonEncoded(53305273), list.ToArray())
            })));
        }
예제 #3
0
        // Token: 0x06002978 RID: 10616 RVA: 0x000E9D34 File Offset: 0x000E7F34
        protected void RenderExpiringPasswordNotificationInfobar(Infobar infobar, int daysUntilExpiration)
        {
            SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>();

            sanitizingStringBuilder.Append("<div class=\"divIBTxt\">");
            if (daysUntilExpiration == 0)
            {
                sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(352263686));
            }
            else
            {
                sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-2025544575), new object[]
                {
                    daysUntilExpiration
                });
            }
            sanitizingStringBuilder.Append("</div>");
            sanitizingStringBuilder.Append("<div class=\"divIBTxt\"><a href=# id=\"lnkChgPwd\">");
            sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-1273337393));
            sanitizingStringBuilder.Append("</a></div>");
            sanitizingStringBuilder.Append("<div class=\"divIBTxt\"><a href=# id=\"lnkRmvPwdIB\" _sRmvId=\"divPwdIB\">");
            sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1496915101));
            sanitizingStringBuilder.Append("</a></div>");
            infobar.AddMessage(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational, "divPwdIB");
        }
예제 #4
0
        public override void RenderLocation(TextWriter writer)
        {
            bool flag = (this.ChangeHighlight & 8) != 0;

            writer.Write("<div id=\"divMtgTbWhere\"><div id=\"divLocationL\" class=\"roWellLabel pvwLabel");
            if (flag)
            {
                writer.Write(" updNew");
            }
            writer.Write("\">");
            writer.Write(LocalizedStrings.GetNonEncoded(1666265192));
            writer.Write("</div><div id=\"divLoc\">");
            writer.Write("<div");
            if (flag)
            {
                writer.Write(" class=\"updNew\"");
            }
            writer.Write(">");
            writer.Write(this.Location);
            writer.Write("</div>");
            if (flag && this.OldLocation.Length > 0)
            {
                writer.Write("<div class=\"updOld\">");
                writer.Write(this.MeetingPageUserContext.DirectionMark);
                writer.Write("(");
                writer.Write(this.OldLocation);
                writer.Write(")");
                writer.Write(this.MeetingPageUserContext.DirectionMark);
                writer.Write("</div>");
            }
            writer.Write("</div>");
            writer.Write("</div>");
        }
예제 #5
0
 private void RenderSendPublishLinksDialog(InvalidSharingRecipientsException e)
 {
     this.SanitizingWriter.Write("<div id=\"divInvalidRecipient\">");
     this.SanitizingWriter.Write("<p>");
     this.SanitizingWriter.Write(SanitizedHtmlString.Format(LocalizedStrings.GetNonEncoded(-1620770268), new object[]
     {
         "<a class=\"publishUrl\" target=\"_blank\" href=\"",
         e.InvalidRecipientsResolution.BrowseUrl,
         "\">",
         "</a>"
     }));
     this.SanitizingWriter.Write("</p>");
     this.SanitizingWriter.Write("<div id=\"divInvalidRecipientList\">");
     foreach (InvalidRecipient invalidRecipient in e.InvalidRecipients)
     {
         this.SanitizingWriter.Write("<div>");
         this.SanitizingWriter.Write(invalidRecipient.SmtpAddress);
         this.SanitizingWriter.Write("</div>");
     }
     this.SanitizingWriter.Write("</div>");
     this.SanitizingWriter.Write("<p>");
     this.SanitizingWriter.Write(LocalizedStrings.GetNonEncoded(-1455565968));
     this.SanitizingWriter.Write("</p>");
     this.SanitizingWriter.Write("</div>");
 }
예제 #6
0
        private void GetDataAndUpdateCommonViewIfNecessary(bool needGetColor)
        {
            NavigationNodeCollection navigationNodeCollection = null;

            NavigationNodeFolder[] array = null;
            if (Utilities.IsWebPartDelegateAccessRequest(OwaContext.Current) || (!needGetColor && this.FolderId.Equals(this.UserContext.CalendarFolderOwaId)) || !this.TryGetNodeFoldersFromNavigationTree(out array, out navigationNodeCollection))
            {
                base.CalendarTitle = ((this.folder != null) ? this.folder.DisplayName : string.Empty);
                this.CalendarColor = -2;
                return;
            }
            this.CalendarColor = CalendarColorManager.GetCalendarFolderColor(this.UserContext, navigationNodeCollection, array);
            OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromNavigationNodeFolder(this.UserContext, array[0]);

            if (owaStoreObjectId.IsArchive)
            {
                base.CalendarTitle = string.Format(LocalizedStrings.GetNonEncoded(-83764036), array[0].Subject, Utilities.GetMailboxOwnerDisplayName((MailboxSession)owaStoreObjectId.GetSession(this.UserContext)));
            }
            else
            {
                base.CalendarTitle = array[0].Subject;
            }
            foreach (NavigationNodeFolder navigationNodeFolder in array)
            {
                if (!navigationNodeFolder.IsGSCalendar && navigationNodeFolder.IsPrimarySharedCalendar)
                {
                    navigationNodeFolder.UpgradeToGSCalendar();
                }
                if (this.olderExchangeCalendarTypeInNode == NavigationNodeFolder.OlderExchangeCalendarType.Unknown)
                {
                    this.olderExchangeCalendarTypeInNode = navigationNodeFolder.OlderExchangeSharedCalendarType;
                }
            }
        }
예제 #7
0
        protected void CreateOutOfOfficeNotification()
        {
            this.shouldShowOofDialog = ((base.UserContext.MailboxSession.Mailbox.TryGetProperty(MailboxSchema.MailboxOofState) as bool?) ?? false);
            if (!this.shouldShowOofDialog || base.UserContext.IsWebPartRequest)
            {
                return;
            }
            UserOofSettings userOofSettings = null;

            try
            {
                userOofSettings = UserOofSettings.GetUserOofSettings(base.UserContext.MailboxSession);
            }
            catch (QuotaExceededException ex)
            {
                ExTraceGlobals.CoreTracer.TraceDebug <string>(0L, "BasicMessageView.CreateOutOfOfficeNotification: Failed. Exception: {0}", ex.Message);
                return;
            }
            switch (userOofSettings.OofState)
            {
            case OofState.Enabled:
                this.shouldShowOofDialog = base.UserContext.MessageViewFirstRender;
                break;

            case OofState.Scheduled:
            {
                this.shouldShowOofDialog = false;
                if (RenderingFlags.HideOutOfOfficeInfoBar(base.UserContext))
                {
                    return;
                }
                DateTime utcNow = DateTime.UtcNow;
                DateTime t      = DateTime.MinValue;
                DateTime t2     = DateTime.MinValue;
                if (userOofSettings.Duration != null)
                {
                    t  = userOofSettings.Duration.StartTime;
                    t2 = userOofSettings.Duration.EndTime;
                }
                if (utcNow > t && t2 > utcNow)
                {
                    ExDateTime exDateTime = new ExDateTime(base.UserContext.TimeZone, userOofSettings.Duration.EndTime);
                    SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>();
                    sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-1261886615), new object[]
                        {
                            exDateTime.ToLongDateString() + " " + exDateTime.ToString(base.UserContext.UserOptions.TimeFormat)
                        });
                    sanitizingStringBuilder.Append(" <a href=# onclick=\"onClkHdOof()\">");
                    sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1303059585));
                    sanitizingStringBuilder.Append("</a>");
                    base.Infobar.AddMessageHtml(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational);
                }
                return;
            }

            default:
                this.shouldShowOofDialog = false;
                return;
            }
        }
예제 #8
0
        // Token: 0x06002EB5 RID: 11957 RVA: 0x0010BEBC File Offset: 0x0010A0BC
        private void OpenOtherUserCalendar(RecipientInfoAC recipientInfo)
        {
            ExchangePrincipal exchangePrincipal = null;

            if (base.UserContext.DelegateSessionManager.TryGetExchangePrincipal(recipientInfo.RoutingAddress, out exchangePrincipal))
            {
                if (string.Equals(base.UserContext.MailboxSession.MailboxOwnerLegacyDN, exchangePrincipal.LegacyDn, StringComparison.OrdinalIgnoreCase))
                {
                    throw new OwaEventHandlerException("Cannot open own folder", LocalizedStrings.GetNonEncoded(-1770024075), true);
                }
                try
                {
                    NavigationNodeCollection.AddGSCalendarToSharedFoldersGroup(base.UserContext, exchangePrincipal);
                    OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromGSCalendarLegacyDN(exchangePrincipal.LegacyDn);
                    NavigationHost.RenderFavoritesAndNavigationTrees(this.Writer, base.UserContext, owaStoreObjectId, new NavigationNodeGroupSection[]
                    {
                        NavigationNodeGroupSection.Calendar
                    });
                    this.RenderOpenOtherUserFolderReponse("IPF.Appointment", owaStoreObjectId);
                    return;
                }
                catch (OwaSharedFromOlderVersionException)
                {
                    throw new OwaEventHandlerException(LocalizedStrings.GetNonEncoded(995407892), LocalizedStrings.GetNonEncoded(1354015881), true);
                }
            }
            throw new OwaEventHandlerException("Cannot get the exchange principal of the target user when open other user's calendar", LocalizedStrings.GetNonEncoded(1988379659), true);
        }
예제 #9
0
 private void RenderSearchModule()
 {
     this.writer.Write("<table id=\"tblSch\" cellspacing=0 cellpadding=0><caption>");
     this.writer.Write(LocalizedStrings.GetHtmlEncoded(656259478));
     this.writer.Write("</caption><tr>");
     this.RenderSearchInputBox();
     this.writer.Write("<td><select id=\"selSch\"");
     if (this.isInSearch)
     {
         this.writer.Write(" onChange=\"onChgSch();\"");
     }
     this.writer.Write(" onKeyPress=\"return onEOSch(event);\">");
     if (OptionsBar.SearchModule.Mail == this.searchModule || OptionsBar.SearchModule.Calendar == this.searchModule)
     {
         this.RenderMailSearchOptions();
         this.RenderAddressBookSearchOption(string.Empty, false, LocalizedStrings.GetNonEncoded(1139489555), true);
         this.RenderContactSearchOption(true);
     }
     else
     {
         this.RenderContactSearchOption(false);
         this.RenderAddressBookSearchOptions();
     }
     this.writer.Write("</select></td>");
     this.RenderSearchAndClearButtons();
     this.writer.Write("</tr></table>");
 }
예제 #10
0
        // Token: 0x06002476 RID: 9334 RVA: 0x000D3DEC File Offset: 0x000D1FEC
        internal void SendNotificationMessage()
        {
            string text = this.CapturePrintMeetingMarkup();

            text = string.Format("<div style=\"font-size: 70%; font-family:'{0}'\">{1}</div><br>{2}", Utilities.GetDefaultFontName(), LocalizedStrings.GetHtmlEncoded(PrincipalNotificationMessage.NotificationMessages[(int)this.messageType]), text);
            using (MessageItem messageItem = MessageItem.Create(this.userContext.MailboxSession, this.userContext.DraftsFolderId))
            {
                messageItem.Subject = LocalizedStrings.GetNonEncoded(PrincipalNotificationMessage.NotificationMessageTitles[(int)this.titleType]);
                BodyConversionUtilities.SetBody(messageItem, text, Markup.Html, StoreObjectType.Message, this.userContext);
                messageItem[ItemSchema.ConversationIndexTracking] = true;
                IExchangePrincipal folderOwnerExchangePrincipal = Utilities.GetFolderOwnerExchangePrincipal(this.folderId, this.userContext);
                Participant        participant = new Participant(folderOwnerExchangePrincipal);
                messageItem.Recipients.Add(participant, RecipientItemType.To);
                try
                {
                    messageItem.SendWithoutSavingMessage();
                }
                catch
                {
                    ExTraceGlobals.MailTracer.TraceDebug((long)this.GetHashCode(), "Error sending principal notification message.");
                    throw;
                }
            }
            if (Globals.ArePerfCountersEnabled)
            {
                OwaSingleCounters.ItemsCreated.Increment();
                OwaSingleCounters.MessagesSent.Increment();
            }
        }
예제 #11
0
        private string GetWorkAmountNonEncodedString(Work work)
        {
            StringBuilder stringBuilder = new StringBuilder(32);

            stringBuilder.Append(work.WorkAmount);
            stringBuilder.Append(" ");
            switch (work.WorkUnit)
            {
            case DurationUnit.Minutes:
                stringBuilder.Append(LocalizedStrings.GetNonEncoded(-178797907));
                break;

            case DurationUnit.Hours:
                stringBuilder.Append(LocalizedStrings.GetNonEncoded(-1483270941));
                break;

            case DurationUnit.Days:
                stringBuilder.Append(LocalizedStrings.GetNonEncoded(-1872639189));
                break;

            case DurationUnit.Weeks:
                stringBuilder.Append(LocalizedStrings.GetNonEncoded(-1893458757));
                break;
            }
            return(stringBuilder.ToString());
        }
예제 #12
0
 private void ThrowIfWebPartsCannotActAsOwner()
 {
     if (base.UserContext.IsWebPartRequest && !base.UserContext.CanActAsOwner)
     {
         throw new OwaAccessDeniedException(LocalizedStrings.GetNonEncoded(1622692336), true);
     }
 }
예제 #13
0
 public PrintCalendarVisual(ISessionContext sessionContext, double left, double top, double width, double height, int index, ICalendarDataSource dataSource)
 {
     if (sessionContext == null)
     {
         throw new ArgumentNullException("userContext");
     }
     if (dataSource == null)
     {
         throw new ArgumentNullException("dataSource");
     }
     this.SessionContext = sessionContext;
     this.Left           = left;
     this.Top            = top;
     this.Width          = width;
     this.Height         = height;
     this.BusyType       = dataSource.GetWrappedBusyType(index);
     this.IsPrivate      = dataSource.IsPrivate(index);
     if (this.IsPrivate && dataSource.SharedType != SharedType.None)
     {
         this.Subject = LocalizedStrings.GetNonEncoded(840767634);
     }
     else
     {
         this.Subject   = dataSource.GetSubject(index);
         this.Location  = dataSource.GetLocation(index);
         this.Organizer = (dataSource.IsMeeting(index) ? dataSource.GetOrganizerDisplayName(index) : null);
     }
     this.HasAttachment  = dataSource.HasAttachment(index);
     this.RecurrenceType = dataSource.GetWrappedItemType(index);
     this.CssClass       = dataSource.GetCssClassName(index);
     this.StartTime      = dataSource.GetStartTime(index);
     this.EndTime        = dataSource.GetEndTime(index);
 }
 // Token: 0x06000435 RID: 1077 RVA: 0x00023FD4 File Offset: 0x000221D4
 protected void RenderAttachmentForm()
 {
     base.SanitizingResponse.Write("<div><form name=\"addFrm\" action=\"?ae=Dialog&t=Attach&a=Add\" enctype=\"multipart/form-data\" method=\"POST\">");
     base.SanitizingResponse.Write("<table cellpadding=4 class=\"attchfrm\"><caption>");
     base.SanitizingResponse.Write(LocalizedStrings.GetNonEncoded(-1286941817));
     base.SanitizingResponse.Write("</caption><tr><td class=\"txt\">");
     base.SanitizingResponse.Write("<input type=\"hidden\" name=\"{0}\" value=\"{1}\">", "hidid", this.messageIdString);
     base.SanitizingResponse.Write("<input type=\"hidden\" name=\"{0}\" value=\"{1}\">", "hidchk", this.changeKeyString);
     base.SanitizingResponse.Write(LocalizedStrings.GetNonEncoded(935002604), "<b>", "</b>");
     base.SanitizingResponse.Write("</td></tr>");
     base.SanitizingResponse.Write("<tr><td align=\"right\">");
     base.SanitizingResponse.Write("<input type=\"file\" size=\"35\" name=\"attach\" id=\"attach\" alt=\"Attachment\">");
     base.SanitizingResponse.Write("</td></tr>");
     base.SanitizingResponse.Write("<tr><td align=\"right\">");
     base.SanitizingResponse.Write("<input class=\"btn\" type=\"button\" name=\"attachbtn\" id=\"attachbtn\" alt=\"");
     base.SanitizingResponse.Write(LocalizedStrings.GetNonEncoded(-60366385));
     base.SanitizingResponse.Write("\" value=\"");
     base.SanitizingResponse.Write(LocalizedStrings.GetNonEncoded(-547159221));
     base.SanitizingResponse.Write("\" onclick=\"durUp('");
     base.SanitizingResponse.Write("lstArId");
     base.SanitizingResponse.Write("','remove');\">");
     base.SanitizingResponse.Write("</td></tr>");
     base.SanitizingResponse.Write("</table>");
     Utilities.RenderCanaryHidden(base.SanitizingResponse, base.UserContext);
     base.SanitizingResponse.Write("</form></div>");
 }
예제 #15
0
 // Token: 0x0600259D RID: 9629 RVA: 0x000D9BF4 File Offset: 0x000D7DF4
 public void RenderPublishLinks(TextWriter writer, bool isReadonly)
 {
     if (this.sharingMessage.IsDraft)
     {
         this.RenderSettingsStart(writer, isReadonly, "divPublishSetting", -836489933, ThemeFileId.WebCalendarBig);
         writer.Write("<div class=\"shareOptionItem\">");
         if (this.sharingMessage.IsSharedFolderPrimary)
         {
             writer.Write(SanitizedHtmlString.Format(LocalizedStrings.GetNonEncoded(2104451722), new object[]
             {
                 this.sharingMessage.InitiatorName
             }));
         }
         else
         {
             writer.Write(SanitizedHtmlString.Format(LocalizedStrings.GetNonEncoded(-1568709809), new object[]
             {
                 this.sharingMessage.InitiatorName,
                 this.sharingMessage.SharedFolderName
             }));
         }
         writer.Write("</div>");
         this.RenderPublishItem(writer, "divViewAddrL", 1987785664, this.sharingMessage.BrowseUrl);
         this.RenderPublishItem(writer, "divSubscribeAddrL", -1797397441, this.sharingMessage.ICalUrl);
         this.RenderSettingsEnd(writer);
     }
 }
예제 #16
0
        private void RenderAddressBookSearchOptions()
        {
            string base64Guid = this.userContext.GlobalAddressListInfo.ToAddressBookBase().Base64Guid;
            string text       = "Ad" + ';' + base64Guid;
            string b          = null;

            if (OptionsBar.SearchModule.Contacts != this.searchModule)
            {
                if (this.IsFlagSet(OptionsBar.RenderingFlags.ShowSearchContext) && this.addressBookSearchViewState != null)
                {
                    b = this.addressBookSearchViewState.SearchLocation;
                }
                else
                {
                    b = text;
                }
            }
            this.RenderAddressBookSearchOption(text, text == b, LocalizedStrings.GetNonEncoded(1139489555), false);
            if (this.userContext.IsFeatureEnabled(Feature.AddressLists))
            {
                foreach (AddressBookBase addressBookBase in DirectoryAssistance.GetAllAddressBooks(this.userContext))
                {
                    if (addressBookBase.Base64Guid != base64Guid)
                    {
                        string text2 = "Ad" + ';' + addressBookBase.Base64Guid;
                        this.RenderAddressBookSearchOption(text2, text2 == b, ". " + addressBookBase.DisplayName, false);
                    }
                }
            }
        }
예제 #17
0
 protected void RenderFileUploadButtonText()
 {
     Strings.IDs localizedId;
     Strings.IDs localizedId2;
     if (this.IsInline)
     {
         localizedId  = 1319799963;
         localizedId2 = 695427503;
     }
     else
     {
         localizedId  = -1952546783;
         localizedId2 = -547159221;
     }
     Strings.IDs localizedId3;
     if (base.UserContext.BrowserType == BrowserType.IE || base.UserContext.BrowserType == BrowserType.Firefox)
     {
         localizedId3 = 1698608150;
     }
     else
     {
         localizedId3 = 1368786137;
     }
     base.SanitizingResponse.Write(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(1264365152), new object[]
     {
         LocalizedStrings.GetNonEncoded(localizedId),
         LocalizedStrings.GetNonEncoded(localizedId3),
         LocalizedStrings.GetNonEncoded(localizedId2)
     }));
 }
예제 #18
0
 // Token: 0x060028BD RID: 10429 RVA: 0x000E7534 File Offset: 0x000E5734
 protected void RenderTitle()
 {
     if (this.IsSharingInvitation)
     {
         string subject;
         if (this.IsDefaultFolderToBeShared)
         {
             subject = string.Format(base.UserContext.UserCulture, LocalizedStrings.GetNonEncoded(this.isPublishing ? 1155246534 : 1285974930), new object[]
             {
                 base.UserContext.MailboxSession.DisplayName
             });
         }
         else
         {
             subject = string.Format(base.UserContext.UserCulture, LocalizedStrings.GetNonEncoded(this.isPublishing ? -198640513 : -2052624973), new object[]
             {
                 base.UserContext.MailboxSession.DisplayName,
                 this.sharingMessage.SharedFolderName
             });
         }
         RenderingUtilities.RenderSubject(base.Response.Output, subject, string.Empty);
         return;
     }
     base.RenderSubject(true);
 }
예제 #19
0
        private void CreateExpiringPasswordNotification()
        {
            int num;

            if (!Utilities.ShouldRenderExpiringPasswordInfobar(base.UserContext, out num))
            {
                return;
            }
            SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>();

            sanitizingStringBuilder.Append("<table cellpadding=0 cellspacing=0><tr><td class=tdMvIBSe>");
            if (num == 0)
            {
                sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(352263686));
            }
            else
            {
                sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-2025544575), new object[]
                {
                    num
                });
            }
            sanitizingStringBuilder.Append("</td>");
            sanitizingStringBuilder.Append("<td class=tdMvIBSe><a href=# onClick=\"return onPwdNtf('yes');\">");
            sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-1273337393));
            sanitizingStringBuilder.Append("</a></td>");
            sanitizingStringBuilder.Append("<td class=tdMvIBSe><a href=# onClick=\"return onPwdNtf('no');\">");
            sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1496915101));
            sanitizingStringBuilder.Append("</a></td>");
            sanitizingStringBuilder.Append("</tr></table>");
            base.Infobar.AddMessageHtml(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational);
        }
예제 #20
0
        // Token: 0x060026ED RID: 9965 RVA: 0x000DE56C File Offset: 0x000DC76C
        protected void RenderAboutDetails()
        {
            string       s            = null;
            string       text         = null;
            bool         flag         = false;
            AboutDetails aboutDetails = new AboutDetails(base.OwaContext);

            for (int i = 0; i < aboutDetails.Count; i++)
            {
                Strings.IDs localizedId;
                aboutDetails.GetDetails(i, out localizedId, out s, out text, out flag);
                base.SanitizingResponse.Write("<div id=\"optAb\"><span class=\"lbl\">");
                if (flag)
                {
                    base.SanitizingResponse.Write("&nbsp; &nbsp; &nbsp;");
                }
                base.SanitizingResponse.Write(LocalizedStrings.GetNonEncoded(localizedId));
                if (base.UserContext.IsRtl)
                {
                    base.SanitizingResponse.Write("&#x200F;");
                }
                base.SanitizingResponse.Write(":</span> <span id=\"id\">");
                if (text != null)
                {
                    base.SanitizingResponse.Write("<span id=\"");
                    base.SanitizingResponse.Write(text);
                    base.SanitizingResponse.Write("\"></span>");
                }
                else
                {
                    Utilities.RenderDirectionEnhancedValue(base.SanitizingResponse, Utilities.SanitizeHtmlEncode(s), base.UserContext.IsRtl);
                }
                base.SanitizingResponse.Write("</span></div>");
            }
        }
예제 #21
0
        private SanitizedHtmlString GetBusyTypeHtml(BusyType busyType)
        {
            SanitizingStringWriter <OwaHtml> sanitizingStringWriter = new SanitizingStringWriter <OwaHtml>();

            switch (busyType)
            {
            case BusyType.Free:
                this.sessionContext.RenderThemeImage(sanitizingStringWriter, ThemeFileId.Available, "free", new object[0]);
                sanitizingStringWriter.Write(LocalizedStrings.GetNonEncoded(-971703552));
                goto IL_DC;

            case BusyType.Busy:
                this.sessionContext.RenderThemeImage(sanitizingStringWriter, ThemeFileId.Busy, "busy", new object[0]);
                sanitizingStringWriter.Write(LocalizedStrings.GetNonEncoded(2052801377));
                goto IL_DC;

            case BusyType.OOF:
                this.sessionContext.RenderThemeImage(sanitizingStringWriter, ThemeFileId.OutOfOffice, "oof", new object[0]);
                sanitizingStringWriter.Write(LocalizedStrings.GetNonEncoded(2047193656));
                goto IL_DC;
            }
            this.sessionContext.RenderThemeImage(sanitizingStringWriter, ThemeFileId.Tentative, "tntv", new object[0]);
            sanitizingStringWriter.Write(LocalizedStrings.GetNonEncoded(1797669216));
IL_DC:
            return(sanitizingStringWriter.ToSanitizedString <SanitizedHtmlString>());
        }
예제 #22
0
        // Token: 0x06001FD2 RID: 8146 RVA: 0x000B8228 File Offset: 0x000B6428
        protected override void RenderMenuItems(TextWriter output)
        {
            if (output == null)
            {
                throw new ArgumentNullException("output");
            }
            SearchScope searchScope = this.userContext.UserOptions.GetSearchScope(this.outlookModule);

            base.RenderMenuItem(output, 1749416719, (searchScope == SearchScope.SelectedFolder) ? ThemeFileId.Search : ThemeFileId.None, "divFS" + DefaultSearchScopeMenu.selectedFolder, "d" + DefaultSearchScopeMenu.selectedFolder, false);
            base.RenderMenuItem(output, -1578460849, (searchScope == SearchScope.SelectedAndSubfolders) ? ThemeFileId.Search : ThemeFileId.None, "divFS" + DefaultSearchScopeMenu.selectedAndSubFolders, "d" + DefaultSearchScopeMenu.selectedAndSubFolders, false);
            if (this.outlookModule == OutlookModule.Tasks || this.outlookModule == OutlookModule.Contacts)
            {
                Strings.IDs displayString = (this.outlookModule == OutlookModule.Tasks) ? -464657744 : -1237143503;
                base.RenderMenuItem(output, displayString, (searchScope == SearchScope.AllItemsInModule) ? ThemeFileId.Search : ThemeFileId.None, "divFS" + DefaultSearchScopeMenu.allItemsInModule, "d" + DefaultSearchScopeMenu.allItemsInModule, false);
                return;
            }
            string text;

            if (!string.IsNullOrEmpty(this.archiveName))
            {
                text = string.Format(CultureInfo.InvariantCulture, LocalizedStrings.GetNonEncoded(-1597765325), new object[]
                {
                    this.archiveName
                });
            }
            else
            {
                text = LocalizedStrings.GetNonEncoded(591328129);
            }
            base.RenderMenuItem(output, text, (searchScope == SearchScope.AllFoldersAndItems) ? ThemeFileId.Search : ThemeFileId.None, "divFS" + DefaultSearchScopeMenu.allFolders, "d" + DefaultSearchScopeMenu.allFolders, false, null, null);
        }
예제 #23
0
 // Token: 0x06002ED5 RID: 11989 RVA: 0x0010D5AC File Offset: 0x0010B7AC
 private static bool HandleUMException(Exception exception)
 {
     if (exception is InvalidObjectIdException)
     {
         throw new OwaEventHandlerException("Failed to play greeting", LocalizedStrings.GetNonEncoded(982875461));
     }
     if (exception is DialingRulesException)
     {
         throw new OwaEventHandlerException("Failed to play greeting", LocalizedStrings.GetNonEncoded(852800569));
     }
     if (exception is IPGatewayNotFoundException)
     {
         throw new OwaEventHandlerException("Failed to play greeting", LocalizedStrings.GetNonEncoded(-600244331));
     }
     if (exception is UMServerNotFoundException)
     {
         throw new OwaEventHandlerException("Failed to play greeting", LocalizedStrings.GetNonEncoded(-620095015));
     }
     if (exception is TransportException)
     {
         throw new OwaEventHandlerException("Failed to play greeting", LocalizedStrings.GetNonEncoded(-2078057245));
     }
     if (exception is InvalidPhoneNumberException)
     {
         throw new OwaEventHandlerException("Failed to play greeting", LocalizedStrings.GetNonEncoded(-74757282));
     }
     if (exception is InvalidSipUriException)
     {
         throw new OwaEventHandlerException("Failed to play greeting", LocalizedStrings.GetNonEncoded(-74757282));
     }
     return(false);
 }
예제 #24
0
        // Token: 0x06000573 RID: 1395 RVA: 0x0002B388 File Offset: 0x00029588
        protected void SetInfobarMessages()
        {
            if (!this.isCalendarItem)
            {
                RenderingUtilities.RenderReplyForwardMessageStatus(base.Item, base.Infobar, base.UserContext);
                if (this.isDelegated)
                {
                    base.Infobar.AddMessageText(string.Format(LocalizedStrings.GetNonEncoded(this.delegateMessage), MeetingUtilities.GetReceivedOnBehalfOfDisplayName((MeetingMessage)base.Item)), InfobarMessageType.Informational);
                }
            }
            object obj = base.Item.TryGetProperty(MessageItemSchema.IsDraft);

            if (obj is bool && (bool)obj)
            {
                if (ObjectClass.IsMeetingResponse(this.ItemType))
                {
                    base.Infobar.AddMessageLocalized(-1981719796, InfobarMessageType.Informational);
                }
            }
            else
            {
                InfobarMessageBuilder.AddImportance(base.Infobar, base.Item);
                InfobarMessageBuilder.AddSensitivity(base.Infobar, base.Item);
            }
            InfobarMessageBuilder.AddFlag(base.Infobar, base.Item, base.UserContext);
        }
        // Token: 0x0600313A RID: 12602 RVA: 0x00122920 File Offset: 0x00120B20
        private static void ProcessTimeOfDay(PersonalAutoAttendant pAA, ref bool isFirst, StringBuilder builder, UserContext userContext)
        {
            if (!isFirst)
            {
                builder.Append("\r\n");
                builder.Append(LocalizedStrings.GetHtmlEncoded(-56156833));
            }
            else
            {
                isFirst = false;
            }
            string s = string.Empty;

            switch (pAA.TimeOfDay)
            {
            case TimeOfDayEnum.WorkingHours:
                s = LocalizedStrings.GetNonEncoded(1604545240);
                break;

            case TimeOfDayEnum.NonWorkingHours:
                s = LocalizedStrings.GetNonEncoded(955250317);
                break;

            case TimeOfDayEnum.Custom:
                s = UnifiedMessagingUtilities.GetCustomWorkingHours(pAA, userContext);
                break;
            }
            builder.Append(Utilities.HtmlEncode(s));
        }
예제 #26
0
        // Token: 0x06002A6E RID: 10862 RVA: 0x000ED57C File Offset: 0x000EB77C
        private void RenderMemberLink(ADObjectId id, string displayName, RecipientType recipientType)
        {
            string s;

            if (Utilities.IsADDistributionList(recipientType))
            {
                s = "ADDistList";
            }
            else
            {
                s = "AD.RecipientType.User";
            }
            if (string.IsNullOrEmpty(displayName))
            {
                displayName = LocalizedStrings.GetNonEncoded(-808148510);
            }
            string base64StringFromADObjectId = Utilities.GetBase64StringFromADObjectId(id);
            string handlerCode = string.Format("openItmRdFm(\"{0}\",\"{1}\");", Utilities.JavascriptEncode(s), Utilities.JavascriptEncode(base64StringFromADObjectId));

            base.Response.Write("<a class=lnk ");
            base.Response.Write(Utilities.GetScriptHandler("onclick", handlerCode));
            base.Response.Write(">");
            Utilities.HtmlEncode(displayName, base.Response.Output);
            base.Response.Write("</a>");
        }
        // Token: 0x06003134 RID: 12596 RVA: 0x001222DC File Offset: 0x001204DC
        public static SanitizedHtmlString GetUMSender(UserContext userContext, MessageItem message, string id, SenderDisplayMode senderDisplayMode)
        {
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }
            Participant from = message.From;

            if (from == null)
            {
                return(SanitizedHtmlString.Empty);
            }
            string text = message.TryGetProperty(MessageItemSchema.SenderTelephoneNumber) as string;

            if (string.IsNullOrEmpty(text) && string.IsNullOrEmpty(from.DisplayName))
            {
                return(RenderingUtilities.GetSender(userContext, from, id, LocalizedStrings.GetNonEncoded(786269816), true, senderDisplayMode));
            }
            if (!string.IsNullOrEmpty(from.DisplayName))
            {
                return(RenderingUtilities.GetSender(userContext, from, id, from.DisplayName, true, senderDisplayMode));
            }
            if (string.IsNullOrEmpty(Utilities.NormalizePhoneNumber(text)))
            {
                return(RenderingUtilities.GetSender(userContext, from, id, text, true, senderDisplayMode));
            }
            return(RenderingUtilities.GetSender(userContext, from, id, text, text, true, senderDisplayMode));
        }
예제 #28
0
        protected override void RenderMeetingInfoHeader(TextWriter writer)
        {
            writer.Write("<div id=\"divMtgInfoHeader\">");
            MeetingInfoHeaderToolbar meetingInfoHeaderToolbar = new MeetingInfoHeaderToolbar(this.meetingResponse.ResponseType);

            meetingInfoHeaderToolbar.Render(writer);
            string value  = string.Empty;
            string value2 = string.Empty;

            switch (this.meetingResponse.ResponseType)
            {
            case ResponseType.Tentative:
                value  = "respTentative";
                value2 = LocalizedStrings.GetNonEncoded(1798747159);
                break;

            case ResponseType.Accept:
                value  = "respAccept";
                value2 = LocalizedStrings.GetNonEncoded(988533680);
                break;

            case ResponseType.Decline:
                value  = "respDecline";
                value2 = LocalizedStrings.GetNonEncoded(884780479);
                break;
            }
            writer.Write("<div id=\"divMtgHeaderTxt\" class=\"");
            writer.Write(value);
            writer.Write("\">");
            writer.Write(value2);
            writer.Write("</div>");
            writer.Write("</div>");
        }
예제 #29
0
        // Token: 0x060022D2 RID: 8914 RVA: 0x000C74DC File Offset: 0x000C56DC
        public static void AddIrmInformation(Infobar infobar, ItemPart itemPart, bool addRemoveLink)
        {
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            if (itemPart == null)
            {
                throw new ArgumentNullException("itemPart");
            }
            if (!itemPart.IrmInfo.IsRestricted || itemPart.IrmInfo.DecryptionStatus.Failed)
            {
                return;
            }
            SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>();
            string str = string.Format(LocalizedStrings.GetNonEncoded(-500320626), itemPart.IrmInfo.TemplateName, itemPart.IrmInfo.TemplateDescription);

            sanitizingStringBuilder.Append(str);
            if (addRemoveLink)
            {
                sanitizingStringBuilder.Append(" <a id=\"aIbRR\" href=\"#\">");
                sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(540836651));
                sanitizingStringBuilder.Append("</a>");
            }
            infobar.AddMessage(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational, "divCmplIB");
        }
예제 #30
0
 private static bool ParseDateTimeRange(HttpRequest request, CalendarItemBase calendarItem, bool isAllDayEvent, bool autoFixEndDate, out string errorMessage, out EditCalendarItemHelper.CalendarItemUpdateFlags updateFlags, UserContext userContext)
 {
     updateFlags  = EditCalendarItemHelper.CalendarItemUpdateFlags.None;
     errorMessage = null;
     if (!string.IsNullOrEmpty(Utilities.GetFormParameter(request, "selSM", false)))
     {
         ExDateTime exDateTime  = CalendarUtilities.ParseDateTimeFromForm(request, "selSY", "selSM", "selSD", isAllDayEvent ? null : "selST", userContext);
         ExDateTime exDateTime2 = CalendarUtilities.ParseDateTimeFromForm(request, "selEY", "selEM", "selED", isAllDayEvent ? null : "selET", userContext);
         if (isAllDayEvent)
         {
             exDateTime2 = exDateTime2.IncrementDays(1);
         }
         if (exDateTime > exDateTime2)
         {
             if (!autoFixEndDate)
             {
                 errorMessage = LocalizedStrings.GetNonEncoded(107113300);
                 return(false);
             }
             exDateTime2 = exDateTime.AddMinutes(60.0);
         }
         if (!exDateTime.Equals(calendarItem.StartTime))
         {
             updateFlags           |= EditCalendarItemHelper.CalendarItemUpdateFlags.TimeChanged;
             calendarItem.StartTime = exDateTime;
         }
         if (!exDateTime2.Equals(calendarItem.EndTime))
         {
             updateFlags         |= EditCalendarItemHelper.CalendarItemUpdateFlags.TimeChanged;
             calendarItem.EndTime = exDateTime2;
         }
     }
     return(true);
 }